Disable click behavior of POI markers in Google Maps JS API

前端 未结 5 931
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 10:17

As of Google Maps API v3.6, maps now include \"points of interest\", which are gray markers embedded into a map. When the user clicks on this icon, an InfoWindow appears wi

5条回答
  •  广开言路
    2020-12-06 11:11

    A couple of things to be aware of:

    1) If your map is high traffic, you may find yourself in violation of the Google Maps TOS. You're supposed to use an official version. If it's your own blog or something else low traffic, nobody will notice or care.

    2) This is only conjecture on my part, but I noticed these POI's myself and got annoyed by them. I am pretty sure these are paid-for "inline ads", so to speak. Some gas stations and diner chains have them, so you will soon see Google maps being spammed with these POI markers. If they allow those to be turned off in the API, it kind of goes against the business interests of those who paid for the POI icon... so I highly doubt that you will be able to remove them.

    If you do find a way,please please DO POST the solution! Thanks.

提交回复
热议问题