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/ .
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.