maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.61k stars 712 forks source link

Undefined Zoom behavior with cursor above horizon (high pitch) #4946

Open birkskyum opened 1 week ago

birkskyum commented 1 week ago

In an example like simple-map.html

If the pitch is high (set maxPitch: 85), and the cursor is somewhere above the horizon, then the scroll zoom moves the camera in quite unexpected ways.

If the cursor is high enough on the horizon, the zoom direction is even reversed.

https://github.com/user-attachments/assets/7196def9-da5b-4603-b0e6-6b26e7adb1b3

HarelM commented 1 week ago

CC: @NathanMOlson

birkskyum commented 1 week ago

It's a problem with globe projection too actually, so both 2d, 2d+terrain, globe has issues with this.