'MapBox Navigation camera angles depending on the guidance
I would like to know if there is a way to integrate different camera angles + zoom depending on the guidance (ex: Highway=40° / National=30° / Departmental=20° / city=10°) and if it is integrated by default in the MapBox sdk and thanks
Solution 1:[1]
I'm not sure I fully understand your question. But yes, you are able to assign different zoom and pitch (angle) for your map instance.
When you say 'guidance', I'm interpreting that as scope or level. You're asking if at different levels you can assign different zooms and pitches.
To update these simply call:
map.setZoom(zoom_value);
map.setPitch(pitch_value);
Always using the same zoom and pitch for a level can be tricky though. Think about using the same zoom for USA as you would for Sri Lanka. Or compare city sizes like Reno, Nevada, USA and Mexico City.
However there is no default to handle these by default.
You would probably be better suited to use fitBounds. However you'll still need to manually adjust pitch because fitBounds doesn't do anything to it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | nemo |
