Deconstruct all the way to coords

This commit is contained in:
2021-09-06 16:19:35 +02:00
parent 06fc0a8291
commit 8c8c21b432
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
},