admin管理员组

文章数量:1320661

If one click on a marker, information about the spot (e.g the coordinates) is shown. I want to disable this, so the markers aren't clickable. How can I do that?

I've looked around everywhere but haven't been able to find information about how that can be done.

If one click on a marker, information about the spot (e.g the coordinates) is shown. I want to disable this, so the markers aren't clickable. How can I do that?

I've looked around everywhere but haven't been able to find information about how that can be done.

Share Improve this question asked Feb 3, 2013 at 10:41 holyredbeardholyredbeard 21.3k32 gold badges111 silver badges174 bronze badges 1
  • 1 Do you actually mean markers, don't you mean POIs? because for markers it is a trivial question (wonder why you asked..), while for POIs, it is much more plicated and interesting. – Tomas Commented Feb 3, 2013 at 10:58
Add a ment  | 

1 Answer 1

Reset to default 7

Apparently there are two possible ways to achieve this

  1. by using the property setClickable(flag:boolean); see http://code.google./apis/maps/documentation/v3/reference.html#Marker

  2. Remove the listener off the marker. It will look something similar to this google.maps.event.addListener(marker, "click", function(etc)

Reference

Also, if you work on the map in Collaborate mode, at the upper right of the left frame (with the locations listed), there's an Edit button. Click it.

Then go to the location you want to remove in the list on the left and click it to open it's information window on the map (expanding from the droplet-shaped marker). Inside that information box is a "delete" link, and that removes the location.

本文标签: javascriptDisable clicking on markersStack Overflow