This project is read-only.

Remove Marker

Oct 7, 2009 at 4:09 PM

Hi, is there  a sample how to remove markers when click on them ?

Oct 20, 2009 at 2:06 PM

Not sure if have found a way to do this. But I found that the easiest way to do this is to do the following.  Please let me know if is a better way.

function OnMarkerClick(point) {
 var index;
 var title;
 var marker;
 for (index in GoogleMap1.Markers) {
  marker = GoogleMap1.Markers[index];
  if (marker.Latitude == point.lat() && marker.Longitude == point.lng()) {
   marker.hide();
   break;
  }
}