Remove marker in Google Maps Api v3

后端 未结 2 1341
醉酒成梦
醉酒成梦 2020-12-18 23:38

I\'m using this function to add a new marker (and polyline) to a map:

 function addMarker(location) {

    path = poly.getPath();
    path.push(location);
           


        
2条回答
  •  半阙折子戏
    2020-12-19 00:03

    RemovingOverlays

    markersArray[markersArray.length-1].setMap(null);
    

    ... for path:

    path = poly.getPath();
    path.pop();
    

    PolylineOptions, MVCArray.

提交回复
热议问题