且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Google Maps API V3是否支持触摸事件?

更新时间:2023-02-14 13:05:08

In my experience, the mousedown, mouseup, dragstart, dragend events work fine in place of touchstart, touchmove, touchend.

google.maps.event.addListener(myMap, "mousedown", function(event){...});

I'm pretty sure that gesture events are not going to be supported, since those are used for pinch-zoom functionality.

If you need gestures, you'd have to build your own recognizer by tracking mousedown events, storing them in an array, then tracking positions to determine angles, distances etc...

相关阅读

技术问答最新文章