徐景良 2023-10-19 17:03:04 +08:00
commit 591c154722
4 changed files with 18 additions and 18 deletions

View File

@ -149,14 +149,14 @@ export default {
//
this.$emit('onload', map)
//
map.openFlyAnimation({
// duration1:4,
// easingFunction1: Cesium.EasingFunction.QUINTIC_IN_OUT,
callback: function () {
//
},
})
//
// map.openFlyAnimation({
// // duration1:4,
// // easingFunction1: Cesium.EasingFunction.QUINTIC_IN_OUT,
// callback: function () {
// //
// },
// })
},
//widget使widget

View File

@ -60,8 +60,8 @@ export const getRouterFunc = (params, method = 'all') => {
// solution 为多条线路的数组,现在先用第一条线路 solution.path[0]
let gdRoute = solution.path[0]
let postgisParams = {
startlng: gdRoute.endCoordinates[0],
startlat: gdRoute.endCoordinates[1],
startlng: startlng,
startlat: startlat,
endlng: endlng,
endlat: endlat,
areaname: localStorage.getItem("areaName"),
@ -202,7 +202,7 @@ export const getRouterByPostGis = (params) => {
if (res.data == null || res.data.length < 1) {
//没有找到路线,返回空
console.log('PostGIS未找到合适了路线')
resolve(parse(null))
resolve([])
} else {
let LineString = []
res.data.map(r=>{
@ -213,11 +213,11 @@ export const getRouterByPostGis = (params) => {
}
} else {
console.log('PostGIS未找到合适了路线')
resolve(parse(null))
resolve([])
}
}).catch(err => {
console.log('PostGIS寻路算法服务端错误')
resolve(parse(null))
resolve([])
})
})
}
@ -242,8 +242,8 @@ export const drawRouterFunc = (pathObject) => {
} else {
// 导航数据路段
let pathGraphic = drawLineFlowEntity(allCoordinates, 'CYAN')
let gdPathGraphic = drawLineFlowEntity(gdRoute, 'YELLOW')
let postgisPathGraphic = drawLineFlowEntity(postGisRoute, 'YELLOW')
// let gdPathGraphic = drawLineFlowEntity(gdRoute, 'YELLOW')
// let postgisPathGraphic = drawLineFlowEntity(postGisRoute, 'BLUE')
//开始的路段
let startPathGraphic = drawPolylineDashEntity([startLngLat, startRouterLngLat], 'YELLOW')

View File

@ -136,7 +136,7 @@ import { getRouterFunc, drawRouterFunc, clearRouterFunc } from '../lib/routePath
endlat: parseFloat(endCoor[1]),
areaname: localStorage.getItem("areaName"),
};
getRouterFunc(params,).then(res => {
getRouterFunc(params,'postgis').then(res => {
drawRouterFunc(res)
}).catch(err => {
clearRouterFunc()

View File

@ -440,12 +440,12 @@ export default {
graphic.addDynamicPosition(Cesium.Cartesian3.fromDegrees(parseFloat(item.lng),parseFloat(item.lat)),0);
}else{
//
console.log("------------更新数据");
// console.log("------------");
this.markGraphicLayer.eachGraphic((graphicEvent) => {
if (graphicEvent.isPrivate) {
return
}
console.log("graphicEvent",graphicEvent);
// console.log("graphicEvent",graphicEvent);
if(graphicEvent.options.userId == obj.createId){
graphicEvent.addDynamicPosition(Cesium.Cartesian3.fromDegrees(parseFloat(item.lng),parseFloat(item.lat)),5);
}