Skip to content

Pinch-to-zoom broken when first touch is on a marker on touch devices #9675

@levelsio

Description

@levelsio

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/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions