Merge branch 'master' of http://123.132.248.154:10000/xujingliang/Lin_Ye_Fang_Huo
commit
591c154722
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue