2

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.

holyredbeard
  • 19,619
  • 32
  • 105
  • 171
  • 1
    Do you actually mean [markers](http://www.softpress.com/kb/images/Google%20Maps%20Marker%20Action%20in%20use.png), don't you mean [POIs](http://searchengineland.com/figz/wp-content/seloads/2009/08/picture-37.png)? because for markers it is a trivial question (wonder why you asked..), while for POIs, [it is much more complicated and interesting](http://stackoverflow.com/q/7950030/684229). – Tomas Feb 03 '13 at 10:58

1 Answers1

7

Apparently there are two possible ways to achieve this

  1. by using the property setClickable(flag:boolean); see http://code.google.com/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.

Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
  • Thanks a lot. Worked like a charm! – holyredbeard Feb 03 '13 at 12:27
  • if there's already an event attached to the marker. Using the 2nd technique would cause both the previous method and the new method to run. In case you want to get rid of previous event and replace it with a new one. – Jabran Saeed Mar 18 '15 at 07:31