Google 地图 - 覆盖多边形的标记
抱歉,标题含糊不清,这就是问题:我有一个带有多边形的谷歌地图(美国各州)。多边形是可点击的并链接到另一个页面。一切都很好。但是,地图上也有一些标记没有附加任何事件,因此单击它们不会执行任何操作。
问题是,它们覆盖了一些多边形,因此很难单击多边形,因为标记位于多边形前面。我的问题是,有什么方法可以允许“通过”标记单击多边形吗?换句话说,我需要以视觉方式表示标记,但在涉及任何点击时将其忽略。
sorry about the vague title, this is the issue: I have a google map with polygons (USA states). The polygons are clickable and link to another page. That all works fine. However, there are also markers on the map that don't have any events attached to them, so clicking on them doesn't do anything.
The problem is, they cover some of the polygons so it's hard to click the polygon because the markers are in front of it so to speak. My question is, is there any way to allow clicking the polygon "through" markers? In other words, I need markers to be visually represented but disregarded when there's any clicking involved.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道当前的 Google Maps API 是否可行,但我猜解决方案将涉及点击事件的转发:
最难的部分可能是 3。同样,这只是一个猜测。
I don’t know whether it’s possible with the current Google Maps API, but I guess the solution would involve forwarding of click events:
The hardest part is probably 3. Again, this is just a guess.