| | |
| | | const isPointListOpen = ref<boolean>(false) |
| | | const tragetPointArr = ref<Cesium.Cartesian3[]>([]) |
| | | const selectedPoint = ref<number | null>(null) |
| | | const tPointIdList = ref<string[]>([]) |
| | | |
| | | onMounted(() => { |
| | | const parent = document.getElementsByClassName('scrollbar').item(0)?.parentNode as HTMLDivElement |
| | |
| | | const cartesianArr: any[] = [] |
| | | for (let i = 0; i < kmlEntityArr.length; i++) { |
| | | const entity = kmlEntityArr[i] |
| | | tPointIdList.value.push(entity._id) |
| | | const billboard = createBillboard(`${i + 1}`, '#2D8CF0') |
| | | entity._id = 'tragetPoint' + i |
| | | entity.billboard = new Cesium.BillboardGraphics({ |
| | |
| | | if (getEntityById('clickBox')) { |
| | | removeById('clickBox') |
| | | } |
| | | kmlDataSource.entities._entities._array.forEach((entity: { _id: string; billboard: Cesium.BillboardGraphics }, i: number) => { |
| | | entity.billboard = new Cesium.BillboardGraphics({ |
| | | image: createBillboard(`${i}`, entity._id === `tragetPoint${index}` ? '#FF9900' : '#2D8CF0'), |
| | | pixelOffset: new Cesium.Cartesian2(0, -20) |
| | | }) |
| | | }) |
| | | // 创建盒子 |
| | | const entity = { |
| | | id: 'clickBox', |