Google 地图 v3,折线鼠标事件
是否可以检测鼠标何时进入和退出 Google 地图 v3 中的折线区域?
作为一个特定的用例,我想当鼠标悬停在折线上方时更改折线的颜色。折线允许注册“mousemove”事件,但似乎不允许通知鼠标悬停/移出事件。在我看来,这是一个非常基本的实用工具。做这种事情有什么解决方案吗?这是折线的不当使用吗?
Is it possible to detect when the mouse has entered and exited a polyline region in Google Maps v3?
As a particular use-case, I would like to change the color of a polyline when then mouse is hovering over it. Polylines allow registration of a "mousemove" event, but it doesn't seem to allow notification of mouse over/out events. This strikes me as a pretty basic bit of utility. Are there any solutions for doing this sort of thing? Is this an inappropriate use of polylines?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自 2010 年 4 月 26 日起,Google 地图团队已为折线添加了鼠标悬停事件(Google 地图 Javascript API V3)。
The Google Maps team has added a mouseover event for polylines as of Apr 26, 2010 (Google Maps Javascript API V3).