mirror of
https://github.com/KevinMidboe/nova-map-fields.git
synced 2026-02-13 04:59:06 +00:00
Deconstruct all the way to coords
This commit is contained in:
2
dist/js/field.js
vendored
2
dist/js/field.js
vendored
File diff suppressed because one or more lines are too long
@@ -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`;
|
const URL = `https://api.mapbox.com/directions/v5/mapbox/driving/${cords}?geometries=geojson&access_token=pk.eyJ1Ijoia2V2aW5taWRib2UiLCJhIjoiY2pydWhlamQyMHJ2NTRhdGN1em5ndXVyMyJ9.Ejdo_3iuuGOD662Bh6es4w`;
|
||||||
return fetch(URL)
|
return fetch(URL)
|
||||||
.then((resp) => resp.json())
|
.then((resp) => resp.json())
|
||||||
.then((response) => response.routes[0].geometry)
|
.then((response) => response.routes[0].geometry.coordinates)
|
||||||
.then(this.mapNavigationRoute);
|
.then(this.mapNavigationRoute);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user