聊天记录

This commit is contained in:
2023-11-30 15:26:26 +08:00
parent d7d4b7e41c
commit 4a702750d8
3 changed files with 25 additions and 26 deletions

View File

@@ -397,7 +397,7 @@ export default {
_url = _url + this.navigationStartPoint[1] + ";"
_url = _url + this.navigationEndPoint[0] + ","
_url = _url + this.navigationEndPoint[1]
_url = _url + "?" + "overview=false&alternatives=true&steps=true";
_url = _url + "?" + "alternatives=true&steps=true&geometries=geojson";
axios({
@@ -409,25 +409,23 @@ export default {
}).then(res => {
console.log("================================获取到了导航结果")
res=res.data;
res = res.data;
/*
console.log(res)
if (res.code != "OK") {
return false;
}else {
console.log("================================获取到了导航结果,开始步行导航")
}
*/
/*
console.log(res)
if (res.code != "OK") {
return false;
}else {
console.log("================================获取到了导航结果,开始步行导航")
}
*/
let pathList = [startPoint];
const steps=res.routes[0].legs[0].steps
const coordinates = res.routes[0].geometry.coordinates
steps.map(item0=>{
item0.intersections.map(item1=>{
const _point = ol.proj.transform(item1.location,'EPSG:4326', 'EPSG:3857');
pathList.push(_point)
})
coordinates.map(item1 => {
const _point = ol.proj.transform(item1, 'EPSG:4326', 'EPSG:3857');
pathList.push(_point)
})
// let _list=res.route[0].legs[0].steps[0].intersections