mapbox / mapbox/mapbox-gl-js

Map Jumps on setFreeCameraOptions if altitude changes from above ~10k to below

Open
#13,256 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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**: 3.6.0

**browser**: Chrome newest version on Mac

### Steps to Trigger Behavior

I am using your script:
https://github.com/mapbox/impact-tools/blob/master/journey-animation-sequence/js/fly-in-and-rotate.js

```
await flyInAndRotate({
map: map,
targetLngLat: {lng: 11.007019, lat: 46.967396},
duration: 10000,
startAltitude: 7500000,
endAltitude: 10000,
startBearing: 40,
endBearing: 0,
startPitch: 0,
endPitch: 61,
prod: true
});
```

However, when the altitude crosses the 10.000m line, the map suddenly jumps to a lower altitude. The altitude is calculated correctly (it is after all your own code). I tried roadmap and satellite style, same incorrect behaviour.

Thank you!

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.

Research direction

Start by running the linked impact-tools journey-animation-sequence/js/fly-in-and-rotate.js example with setFreeCameraOptions and the reported altitude range. Inspect the camera behavior as altitude crosses 10,000 m; done means the animation no longer jumps to a lower altitude while transitioning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.