Is it possible to disable rotation but keep zoom on the touchZoomRotate handler? #2108
-
Basically, I want to do this: I need to disable rotation, but allow the user to still zoom in and out by double tapping and dragging. (this functionality) Here is an example that replicates exactly what I need to accomplish: https://docs.mapbox.com/mapbox-gl-js/example/disable-rotation/ Currently it seems like the touchZoomRotate prop only accepts: Is it possible to I also noticed this old/closed PR that seemed to attempt this. Would the maintainers be open to accepting another PR adding these props if there is no other way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can access the underlying |
Beta Was this translation helpful? Give feedback.
You can access the underlying
Map
instance by ref: https://visgl.github.io/react-map-gl/docs/api-reference/map#getmap