'mapbox-gl-js route is not accurate
I'm new with map box and java scripts, i have try route mapping system but its not accurate. i don't know if routing map using map box-gl-js is normally its become like this or my code cause that problem. i follow the tutorial from https://docs.mapbox.com/help/tutorials/getting-started-directions-api/ .
Solution 1:[1]
I had the same problem and I found the answer in another Stackoverflow question (Does Mapbox Directions API limit the number or precision of coordinates in a response?):
You can use the overview=full
which is an optional parameter in your queries to get the most detailed geometry, so your queries would look something like this:
Query 1
Query 2
If you put them in the API playground, you should see a more detailed route for your 2nd Query.
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 |