| | |
| | | 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 |
| | | } |
| | |
| | | if (kmlStr) { |
| | | kmlRes = kmlStr |
| | | } else { |
| | | kmlRes = await analyzeKmzFile(fileUrl) |
| | | const fileRes = await analyzeKmzFile(fileUrl) |
| | | kmlRes = await fileRes.content |
| | | } |
| | | // 所有航点 |
| | | kmlPoints = getKmlParams(kmlRes, false, { |
| | |
| | | if (kmlStr) { |
| | | kmlRes = kmlStr |
| | | } else { |
| | | await analyzeKmzFile(fileUrl) |
| | | const fileRes = await analyzeKmzFile(fileUrl) |
| | | kmlRes = await fileRes.content |
| | | } |
| | | // 所有航点 |
| | | const points = getKmlParams(kmlRes, false, { |