Close InfoWindow for local business marker

后端 未结 1 1271
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 00:48

I have a new google map app using v3 of the API. On it I have a few custom markers with info windows. I use a global variable to ensure only one info window opens at any o

相关标签:
1条回答
  • 2020-12-04 01:01

    Sounds like you want the "Points of Interest" (AKA POI) on the map to not be clickable (or to be able to capture the click on them).

    This was tracked as an FR in the issue tracker and was recently implemented using a new property clickableIcons in MapOptions

    If you set it to false, POI features will no longer be clickable. You can also use the get/setClickableIcons methods on the Map object to change this dynamically.

    One other way to deal with them is to remove POIs from the map (using styled maps), if you don't want to have the infowindow open when they are clicked.

    Here (How to remove certain places on a map ) is one discussion on the v3 API group about using styled maps to remove them.

    And here (Disabling POI's InfoWindows - workaround found) is another.

    At least now it doesn't cost more to do that (styled maps used to be more expensive than normal maps).

    0 讨论(0)
提交回复
热议问题