mirror of
https://github.com/KevinMidboe/nova-map-fields.git
synced 2025-10-29 17:50:27 +00:00
Deconstruct all the way to coords
This commit is contained in:
@@ -41,7 +41,7 @@ export default {
|
||||
const URL = `https://api.mapbox.com/directions/v5/mapbox/driving/${cords}?geometries=geojson&access_token=pk.eyJ1Ijoia2V2aW5taWRib2UiLCJhIjoiY2pydWhlamQyMHJ2NTRhdGN1em5ndXVyMyJ9.Ejdo_3iuuGOD662Bh6es4w`;
|
||||
return fetch(URL)
|
||||
.then((resp) => resp.json())
|
||||
.then((response) => response.routes[0].geometry)
|
||||
.then((response) => response.routes[0].geometry.coordinates)
|
||||
.then(this.mapNavigationRoute);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user