Does Google Maps API V3 support touch event?

Yaqub Ahmad picture Yaqub Ahmad · Apr 23, 2013 · Viewed 8.8k times · Source

We are experiencing an issue related to GoogleMaps. The issue is mainly related to touch screens. We were trying to resolve the issue, but so far no success.

We found in this article that the Google Maps API V3 does not supports touch event? Is this is true or false?

UPDATE

This issue was handled in the bug

https://issuetracker.google.com/issues/35824421

and was solved in version 3.27 of Google Maps JavaScript API in December 2016.

Answer

tim picture tim · Apr 24, 2013

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...