From a51171f691ec516929fbb29356ad9074d0439b6e Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Thu, 07 Mar 2024 17:32:45 +0800
Subject: [PATCH] update: 右键新增航线、事件编辑、kmz文件编辑
---
src/utils/cesium/use-map-draw.ts | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/utils/cesium/use-map-draw.ts b/src/utils/cesium/use-map-draw.ts
index 3734bd9..c088045 100644
--- a/src/utils/cesium/use-map-draw.ts
+++ b/src/utils/cesium/use-map-draw.ts
@@ -123,7 +123,8 @@
let cartesianArr: Cesium.Cartesian3[] = []
// 绘制路线
- const drawWayline = async (entities: Cesium.Entity[], kmlStr: string) => {
+ const drawWayline = async (entities?: Cesium.Entity[], kmlStr?: string) => {
+ console.log(kmlStr)
if (!entities && !kmlStr) {
dataSource.show = false
}
@@ -137,7 +138,8 @@
if (kmlStr) {
kmlRes = kmlStr
} else {
- kmlRes = await analyzeKmzFile(fileUrl)
+ const fileRes = await analyzeKmzFile(fileUrl)
+ kmlRes = await fileRes.content
}
// 所有航点
kmlPoints = getKmlParams(kmlRes, false, {
@@ -293,7 +295,8 @@
if (kmlStr) {
kmlRes = kmlStr
} else {
- await analyzeKmzFile(fileUrl)
+ const fileRes = await analyzeKmzFile(fileUrl)
+ kmlRes = await fileRes.content
}
// 所有航点
const points = getKmlParams(kmlRes, false, {
--
Gitblit v1.9.3