Uncaught RangeError: out of range source coordinates for DEM data, new in 2.4.0
@SnailBones is already working on this.
Since Jan 5, 2022.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 2.4.0
**browser**: Chrome 92.0.4515.131, also happens on Edge and Safari
### Steps to Trigger Behavior
1. Switch from 2D to 3D map view.
2. Attempt to edit an existing route using Mapbox Draw.
3. 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
1. Got to www.deepzoom.com (use desktop, not mobile device)
2. Select the "Kayak Cordova" demo.
3. Let the demo run for a moment, then click the stop animation button. Click the "Exit Demos" button.
4. 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

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.