maplibre / maplibre-gl-js

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

Zoom not focusing on mouse in Terrain3D at 85 deg pitch #4947

Open wipfli opened 4 weeks ago

wipfli commented 4 weeks ago

maplibre-gl-js version:

4.7.1

browser:

chrome on linux

Steps to Trigger Behavior

  1. Go to https://jsbin.com/kobuhuposi/edit?html,output
  2. Put mouse cursor on top of "Eiger" mountain
  3. Zoom in

Link to Demonstration

https://jsbin.com/kobuhuposi/edit?html,output

https://github.com/user-attachments/assets/147f4f5f-1427-4244-a0ce-c4a91a8fa770

Expected Behavior

Zoom should go to mouse

Actual Behavior

Zoom goes to middle of the screen maybe, but not to mouse

HarelM commented 4 weeks ago

I think this is a duplicate of #4946 ?

NathanMOlson commented 4 weeks ago

I think this is a duplicate of #4946 ?

To me, these seem slightly different but related. #4946 is "bad zoom behavior when mouse is above horizon", this one looks like "mouse-above-horizon zoom behavior is happening even when the mouse is on terrain (when the terrain is above the horizon)".

HarelM commented 4 weeks ago

Fair enough. Thanks for the input!