You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After adding terrain to a maplibre map in 3d mode, the map camera elevation changes during movement, seemingly following terrain elevation.
This bug was observed and resolved over at react-map-gl at v8 (see visgl/react-map-gl#2211) while Kepler is currently using v7.
The weird thing is when I tested the bug with react-map-gl directly, I was only able to reproduce it with react-map-gl v7 + maplibre-gl-js v2.
Kepler is currently dependent on MaplibreGL 3.6.2, which according to my tests should only jitter on "moveend".
I'll summarize the versions and bug behavior:
react-map-gl
maplibre-gl-js
Bug behavior
8.1.1
2.4.0 / 3.6.2
no issue
7.1.6
3.6.2
jitter on moveend
7.1.6
2.4.0
jitter during move
To Reproduce
Move the map to somewhere with a lot of mountains then move around.
I've created a minimal repo to reproduce this issue with Kepler: https://github.com/leverglowh/keplergl-terrain-jitter
Steps are the usual: git clone, npm install, add .env file, npm run dev (starts at port 5668)
Only relevant code is in /src/App.tsx.
To test react-map-gl with maplibre-gl-js all I did was:
Expected behavior
Given the current dependencies, I would expect Kepler's map to jitter on moveend, and not during move.
Would be nice if it didn't jitter at all.
Would also be nice if we could upgrade to react-map-gl v8, but that requires some work since export paths and types changed.
Screenshots
Screen.Recording.2026-04-29.at.19.24.58.mov
Desktop (please complete the following information):
OS: both macOS and Windows
Browser: chrome, safari, firefox
Version: tested from 3.2.0 to latest 3.2.6, didn't try earlier versions
Additional context
I'll link some resources I bumped into while investigating this:
Describe the bug
After adding terrain to a maplibre map in 3d mode, the map camera elevation changes during movement, seemingly following terrain elevation.
This bug was observed and resolved over at
react-map-glat v8 (see visgl/react-map-gl#2211) while Kepler is currently using v7.The weird thing is when I tested the bug with
react-map-gldirectly, I was only able to reproduce it withreact-map-glv7 +maplibre-gl-jsv2.Kepler is currently dependent on MaplibreGL 3.6.2, which according to my tests should only jitter on "moveend".
I'll summarize the versions and bug behavior:
react-map-glmaplibre-gl-jsTo Reproduce
Move the map to somewhere with a lot of mountains then move around.
I've created a minimal repo to reproduce this issue with Kepler: https://github.com/leverglowh/keplergl-terrain-jitter
Steps are the usual:
git clone,npm install, add.envfile,npm run dev(starts at port5668)Only relevant code is in
/src/App.tsx.To test
react-map-glwithmaplibre-gl-jsall I did was:package.json. Note: import path changes between v8 and v7, see import changesapp.jsxto include terrain: update line 17 to be:npm installnpm run startExpected behavior
Given the current dependencies, I would expect Kepler's map to jitter on moveend, and not during move.
Would be nice if it didn't jitter at all.
Would also be nice if we could upgrade to
react-map-glv8, but that requires some work since export paths and types changed.Screenshots
Screen.Recording.2026-04-29.at.19.24.58.mov
Desktop (please complete the following information):
Additional context
I'll link some resources I bumped into while investigating this:
transformCameraUpdatethat could potentially let you override the elevation (I think, it didn't work for me) https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#transformcameraupdatesetCenterClampedToGroundhttps://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#setcenterclampedtogroundmaxPitchoption it could be