|
|
|
@ -358,7 +358,7 @@ export default { |
|
|
|
const backendUrl = process.env.VUE_APP_BACKEND_URL || ''; |
|
|
|
return backendUrl + cleanPath; |
|
|
|
}, |
|
|
|
//正式航线渲染函数(style 可选:waypoint { pixelSize, color, outlineColor, outlineWidth },line { style, width, color, gapColor, dashLength }) |
|
|
|
//正式航线渲染函数 |
|
|
|
renderRouteWaypoints(waypoints, routeId = 'default', platformId, platform, style) { |
|
|
|
if (!waypoints || waypoints.length < 1) return; |
|
|
|
// 清理旧线 |
|
|
|
@ -367,6 +367,12 @@ export default { |
|
|
|
if (existingLine) { |
|
|
|
this.viewer.entities.remove(existingLine); |
|
|
|
} |
|
|
|
// 清理属于该航线的旧平台图标 |
|
|
|
const platformBillboardId = `route-platform-${routeId}`; |
|
|
|
const existingPlatform = this.viewer.entities.getById(platformBillboardId); |
|
|
|
if (existingPlatform) { |
|
|
|
this.viewer.entities.remove(existingPlatform); |
|
|
|
} |
|
|
|
// 清理所有属于该航线的旧点 |
|
|
|
waypoints.forEach((wp,index) => { |
|
|
|
const waypointEntityId = `wp_${routeId}_${wp.id}`; |
|
|
|
|