From 225fab98ed3666d4542ed45eca514558d033384d Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 03 Dec 2024 13:44:58 +0800
Subject: [PATCH] 应急空间调整
---
src/pages/map/components/scomponents/layersControl.vue | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index b226603..d8efb83 100644
--- a/src/pages/map/components/scomponents/layersControl.vue
+++ b/src/pages/map/components/scomponents/layersControl.vue
@@ -449,7 +449,32 @@
backgroundIcon: VITE_APP_BASE + 'img/mapicon/psk.png',
className: 'xfs-box',
showPanel: false,
- layerName: 'psk'
+ layerName: 'psk',
+ incident: (e) => {
+ const { attrParams } = e.overlay
+ // 删除
+ destroyPop()
+ if (!attrParams.firmName) {
+ return
+ }
+ addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
+ window.$viewer.addLayer(addPopLayers[attrParams.id])
+ let iconEl = `<div class="marsBlueGradientPnl">
+ <div>${attrParams.firmName}</div>
+ <div>${attrParams.mainFuncName}</div>
+ </div>`
+ let divIcon = new DC.DivIcon(
+ new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
+ `<div class="public-map-popup-two">
+ ${iconEl}
+ </div>`
+ )
+ let incident = () => {
+ destroyPop()
+ }
+ divIcon.on(DC.MouseEventType.CLICK, incident)
+ addPopLayers[attrParams.id].addOverlay(divIcon)
+ }
},
// {
// id: '3-11',
--
Gitblit v1.9.3