mapbox / mapbox/mapbox-gl-js

Uncaught RangeError: out of range source coordinates for DEM data, new in 2.4.0

Open
#10,927 15 comments 0 reactions 1 assignee View on GitHub

@SnailBones is already working on this.

Since Jan 5, 2022.

bug :lady_beetle: needs investigation :mag:
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
![Capture](https://user-images.githubusercontent.com/1607323/129160286-59cd4fe3-c36b-4943-9e42-64937bd62a36.PNG)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.