From de7390c66ef3e3fe316e804495a78d05a01f0160 Mon Sep 17 00:00:00 2001 From: yangdelong <828900aaa> Date: 星期六, 29 五月 2021 18:39:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop --- src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue index 091d523..96388b5 100644 --- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue +++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue @@ -35,7 +35,8 @@ LongLatPos: { longPos: '', latPos: '' - } + }, + marker: null } }, methods: { @@ -48,14 +49,14 @@ // console.log(as) window.map.setView(as, 17) pulseEffect(as) - const marker = window.L.marker(as, { + this.marker = window.L.marker(as, { icon: window.L.icon({ iconUrl: iconUrl, iconSize: [30, 30], iconAnchor: [15, 15] }) }) - window.map.addLayer(marker) + window.map.addLayer(this.marker) window.map.off('click') }) }, @@ -65,19 +66,21 @@ // console.log(as) window.map.setView(as, 17) pulseEffect(as) - const marker = window.L.marker(as, { + this.marker = window.L.marker(as, { icon: window.L.icon({ iconUrl: iconUrl, iconSize: [30, 30], iconAnchor: [15, 15] }) }) - window.map.addLayer(marker) + window.map.addLayer(this.marker) this.LongLatPos.latPos = '' this.LongLatPos.longPos = '' }, // 鐐瑰嚮纭鎸夐挳浜嬩欢 confirm () { + window.mapManager.clearHighlight() + window.map.removeLayer(this.marker) eventBus.$emit('location-setChange', true) this.LongLatPos.longPos = '' this.LongLatPos.latPos = '' -- Gitblit v1.8.0