I'm using google map API v3. I want to disable click action on default google landmark/poi. For example, when I zoom to UCLA, the school icon shows up (that's fine) but I don't want user to click and view details of that location. Which API function should I use?
相关问题
- How do you change the color of the dotted line on
- Add HTML class/ID to Google Maps Marker (API V3)
- Google maps how to force marker on the nearest roa
- Google Maps API v3 Hiding and showing a circle bou
- google maps adding overlay layer above UI and mark
相关文章
- Avoiding “Sorry, we have no imagery here” with Goo
- Cursor disappears in Google Maps application
- How to draw a proper polylines on google maps [clo
- Draw a rectangle arround a polygon when given in c
- Disable 'use strict' in Google Maps Drawin
- Unable to rotate kml layer
- Opening only a infobox at a time when multiple mar
- How to change strokeColor between points when usin
I understand that the OP wants a solution that persists the labels/icons but suspends the click events. I'm not sure this is possible; please star this issue
However, some of us are drawing shapes sans Drawing Manager and labels/icons are obstructing the additions of new points. If it meets your requirements, you can temporarily remove the icons/labels. I've found that transit, poi, and landscape all need to be toggled:
And the usage:
add this option to mapOption clickableIcons: false
this is more options i think you will
This issue has been logged with google at:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3866
Please star and comment your needs on this issue there.
Google has exposed an option for this. See
clickableIcons
ofgoogle.maps.MapOptions
in the docs.Example initialization code:
I encountered this same problem. Google appears to have recently changed their api to make the base map labels "clickable" and there is not yet a simple API call to disable their clickablility. http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/f1ac9ad4da3606fe
I would like to see google add a simple map option like this, but alas it doesn't exist yet
The following solution works, but because it relies on custom styled map tiles, free maps are limited to (2,500 maps loads per day) - See Google Maps FAQ.
I understand that this question is old, but maybe this answer will help others:
I'm not sure if this is legal, but I ended up exploring the code and made this:
It worked for me, no infoWindow showing up, while preserving all the icons. Anyone who has an idea enhancing the code is welcome, the infoWindow is showing up just a bit the first time it is about to open, after that first one, it is completely gone.