简体   繁体   English

您如何使用Google Maps API收听POI点击?

[英]How do you listen for clicks on POI using Google Maps API?

By default a Google Map embedded using the API (V3) has all sorts of points of interest scattered across it, just like on maps.google.com. 默认情况下,使用API​​(V3)嵌入的Google地图会分散各种各样的兴趣点,就像在maps.google.com上一样。 These are mostly for parks, businesses, schools etc. Like a Marker you can click them to reveal an info window, but unlike a marker I don't have a reference to them as I didn't create them myself. 这些主要用于公园,企业,学校等。像标记一样,你可以点击它们来显示一个信息窗口,但不像标记我没有参考它们,因为我没有自己创建它们。 That being the case, is there a way to listen for click events on these elements? 既然如此,有没有办法监听这些元素上的点击事件?

After looking into this some more and searching through the entire Maps API reference it seems this is indeed unsupported, at least in the current API version (3.8) 在对此进行了更多研究并搜索完整的Maps API参考后 ,似乎确实不支持这种情况,至少在当前的API版本中是这样(3.8)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 您如何使用 react google maps api 平移到您当前的位置 - How do you panTo your current location using react google maps api 如何从使用api返回的JSON对象初始化google.maps.DirectionsResult? - How do you initialize a google.maps.DirectionsResult from a JSON object returned using the api? 如何使用Google Maps API v3监控多边形点击次数 - How do I monitor for clicks on polygons with Google Maps API v3 使用 google maps JS api,如何打开用户单击地图的信息窗口? 那可能吗? - Using google maps JS api, how can I open an infowindow where the user clicks on the map? Is that possible? Google Maps API:在提交之前,如何确保Google Maps自动填充文字是实际地址? - Google Maps API: How do you ensure that the Google Maps Autocomplete text is an actual address before submitting? 如何在没有外部库的情况下收听Google Maps API事件? - How to listen to Google Maps API events without an external library? 如何在 JavaScript 中监听三次点击? - How do I listen for triple clicks in JavaScript? 如何使用Google Maps API搜索? - How do I search using the Google Maps API? 如何使用Google Maps API显示商户信息? - How do I display business information using Google Maps API? 您如何居中Google Maps InfoBox - How do you center a Google Maps InfoBox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM