Reputation: 185
I have been looking to disable the one finger zoom gesture in mapbox.
With this feature, you can zoom with one finger by double tapping and dragging. On the second tap,you hold the finger down and drag up or down to zoom in or out.
Explained briefly https://docs.mapbox.com/mapbox-gl-js/api/handlers/#touchzoomrotatehandler#enable
The issue is that you can disable this feature as per the link above by using the following call.
map.touchZoomRotate.disable();
But if i disable that feature the two finger zoom feature also dissappears. Is there any way to disable the one finger gesture alone? Thanks!!!
Upvotes: 5
Views: 630
Reputation: 41
The following code will disable the one finger tap and hold zoom.
map.touchZoomRotate['_tapDragZoom']['_enabled'] = false;
Upvotes: 4