mapbox / mapbox/mapbox-gl-directions

Inconsistent Zooms Level

Open
#264 0 comments 0 reactions 0 assignees View on GitHub
auto-triaged question
Dominant language
JavaScript
Stars
255
Forks
130
PR merge metrics
No merged PRs in 30d

Description

There is inconsistent zoom level on different routes and I am unable to fix it to a particular level. I'm using the following options:

```
const directions = new MapboxDirections({
accessToken: environment.mapbox.accessToken,
unit: "metric",
profile: "mapbox/driving",
flyTo: true,
interactive: false,
controls: {
inputs: false,
instructions: false,
profileSwitcher: false,
},
styles: directionStyles,
zoom: 6,
});
```

Any help will be appreciated.

Contributor guide

Open the contributing guide

Research direction

Start at the MapboxDirections configuration entry point and reproduce the reported behavior with flyTo enabled and zoom set to 6. Compare the resulting zoom level across different routes, then verify whether the behavior is consistent with the documented options and identify a testable expected zoom outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.