-
I figured out that in v5 the behavior of rotating the map using the mouse is weird / seems broken. It's hard to create a nice bug report for that because I can't really describe the new behavior yet. Sometimes it just doesn't do what I'd expect. Here are some comparison videos. Left side is v5, right side is v4. Btw: it happens in pure maplibre and in maplibre+react-map-gl. GitHub_Maplibre_Rotate_Bug.mp4GitHub_Maplibre_Rotate_Bug_2.mp4GitHub_Maplibre_Rotate_Bug_3.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
I don't think we changed the behavior as part of version 5. |
Beta Was this translation helpful? Give feedback.
-
You can patch this behavior away using patch-package to get closer to the old behavior. This is the line where the default value of maplibre-gl-js/src/ui/handler/mouse.ts Line 55 in 11b34aa Steps:
d=function({enable:e,clickTolerance:i,aroundCenter:r=!0 // <--- change this
Tested on maplibre 5.0.1 |
Beta Was this translation helpful? Give feedback.
-
I found that you can disable this new behaviour by passing
or with
This option is not in the typings, so you will need to cast in TypeScript, but the same options object gets passed down all the way to |
Beta Was this translation helpful? Give feedback.
I found that you can disable this new behaviour by passing
aroundCenter: false
in theMap
constructor options, i.e.or with
react-map-gl
:This option is not in the typings, so you will need to cast in TypeScript, but the same options object gets passed down all the way to
new HandlerManager(...)
which trickles down togenerateMouseRotationHandler()
.