谷歌地图拖尾事件 v3
目前我的谷歌地图上有这个侦听器事件:
google.maps.event.addListener(map, 'dragend', function() { checkBounds(); });
但是我发现然后我“抛出”地图(即在iPhone上拍摄并单击地图向上滚动),拖尾发生在地图完成移动之前;给了我一个错误的边界。有没有一种方法可以优雅地知道边界何时停止移动?我知道我可以继续一遍又一遍地使用bounds_changed进行检查;但想知道是否有更干净的方法来做到这一点。
干杯
Currently I have this listener event on my google maps:
google.maps.event.addListener(map, 'dragend', function() { checkBounds(); });
However I find that then I "throw" the map (ie on an iPhone taking and clicking the map up to scroll) the dragend happens before the map is done moving; giving me a false boundary. Is there a way to know when the bounds have stopped moving that is graceful? I know i can continue to check using the bounds_changed over and over; however was wondering if there was a cleaner way of doing this.
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请尝试使用空闲侦听器,尽管它也会在缩放后触发。
Try the idle listener instead, although that will also fire after a zoom.