Uncaught RangeError: out of range source coordinates for DEM data, new in 2.4.0
Author: jayboCreated Aug 12, 2021Updated Sep 28, 2026
Labelsbug :lady_beetle:needs investigation :mag:
mapbox-gl-js version: 2.4.0
browser: Chrome 92.0.4515.131, also happens on Edge and Safari
Steps to Trigger Behavior
- Switch from 2D to 3D map view.
- Attempt to edit an existing route using Mapbox Draw.
- A stream of "Uncaught RangeError: out of range source coordinates for DEM data" are thrown preventing editing the route, and sometimes even moving the map.
Link to Demonstration
- Got to www.deepzoom.com (use desktop, not mobile device)
- Select the "Kayak Cordova" demo.
- Let the demo run for a moment, then click the stop animation button. Click the "Exit Demos" button.
- Go to the "Route" tab. Click the "Edit" button. A stream of the following errors will appear:
Uncaught RangeError: out of range source coordinates for DEM data
at dh._idx (vendor.5a8c0eaf.js:19)
at dh.get (vendor.5a8c0eaf.js:19)
at wh.getElevationAt (vendor.5a8c0eaf.js:19)
at circle.queryIntersectsFeature (vendor.5a8c0eaf.js:19)
at vendor.5a8c0eaf.js:19
at Ah.loadMatchingFeature (vendor.5a8c0eaf.js:19)
at Ah.query (vendor.5a8c0eaf.js:19)
at eh.queryRenderedFeatures (vendor.5a8c0eaf.js:19)
at ke (vendor.5a8c0eaf.js:19)
at jt.queryRenderedFeatures (vendor.5a8c0eaf.js:19)
5. This problem did NOT exist in mapbox gl V2.3.1 or earlier versions.
6. The issue is perhaps related to the steep terrain in this area? It doesn't seem to trigger as easily in other locations.Expected Behavior
Actual Behavior
Source: mapbox/mapbox-gl-js