Zoom scroll can land inside the terrain
Author: HarelMCreated Sep 23, 2026Updated Sep 23, 2026
maplibre-gl-js version: 6.11.1
browser: chrome
Steps to Trigger Behavior
- Go to the terrain example here: https://maplibre.org/maplibre-gl-js/docs/examples/3d-terrain/
- scroll zoom into the mountain
- See that it's possible
Link to Demonstration
See above
Expected Behavior
Don't allow zooming into the mountain/terrain
Actual Behavior
I can see the white parts below the terrain and then it jumps back.
Additional information
Recent changes improved the terrain jumps at the end of movement, but I think brought back this issue. This was mentioned in a comment here:
As mentioned there, the current mechanism of avoiding getting into the terrain relies on the camera transform update. And while the original solution was elegant to utilize this, I think this should not be using it to avoid all kind of problems.
Source: maplibre/maplibre-gl-js