Skip to content Skip to sidebar Skip to footer

Remove All Markers Google Map V3

In my first click event all markers are shown in google map, I want to remove them in the second click. when I execute my code, only the last marker is removed. this is my javascr

Solution 1:

else {
alert("false");
showmarkers = true;
  for(var lp=0;lp<markers.length;lp++){
            markers[lp].setMap(null);
  }
}

Post a Comment for "Remove All Markers Google Map V3"