更新时间:2023-02-14 12:51:27
以我的经验,mousedown
、mouseup
、dragstart
、dragend
事件可以很好地代替 touchstart
、touchmove
、touchend
.
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){...});
我很确定将不支持 gesture
事件,因为它们用于双指缩放功能.
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...