Mapbox-gl-js: Pinch-to-zoom broken when first touch is on a marker on touch devices

Created on 10 May 2020  路  2Comments  路  Source: mapbox/mapbox-gl-js

Since upgrading to v1.10.0, when a user uses a touch device (iPhone) and pinches to zoom on a map but there is a marker on their first touch (e.g. a marker is in the way), zoom will not happen at all. Only if user pinches to zoom outside the marker, the map will zoom.

This is new behavior and not expected I believe. Especially on a map with lots of markers (like my site: nomadlist.com/map), pinch zooming becomes very difficult as the user has to position both fingers outside any marker. It's also not how any other map API or app does it (e.g. Gmaps).

Example from Mapbox itself, open on a touch device like iPhone, zoom out, and try pinch zooming while first touch is on a marker:
https://docs.mapbox.com/mapbox-gl-js/example/custom-marker-icons/

bug release blocker

Most helpful comment

@levelsio we have a fix for this issue that will be available as part of v1.10.1, thanks for the report!

All 2 comments

Thanks for the details @levelsio , I looked at your map at nomadlist.com/map, and this would definitely be more of a problem there considering the marker density. I tested the behavior on iOS and confirm this is a regression from our custom-marker-icons page. @ansis would there any event canceling the gestures when we touch a marker?

@levelsio we have a fix for this issue that will be available as part of v1.10.1, thanks for the report!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronlidman picture aaronlidman  路  3Comments

foundryspatial-duncan picture foundryspatial-duncan  路  3Comments

aendrew picture aendrew  路  3Comments

stevage picture stevage  路  3Comments

samanpwbb picture samanpwbb  路  3Comments