From a312e0dd96d8f7e96fb3341f1a55561b12394405 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期日, 30 五月 2021 12:29:48 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue index a96d691..709627b 100644 --- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue +++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue @@ -37,7 +37,8 @@ return { // 鐐瑰嚮瀹氫綅缁戝畾鏁版嵁 clickLocation: '', - searchList: [] + searchList: [], + marker: null } }, methods: { @@ -88,7 +89,7 @@ // iconSize: 16 // }) const htmls = '<div><ul><li>' + val.name + '</li> <br/> <li>' + val.address + '</li> <br/> <li>' + val.phone + '</li></ul></div>' - const marker = window.L.marker([ps[1], ps[0]], { + this.marker = window.L.marker([ps[1], ps[0]], { icon: window.L.icon({ iconUrl: iconUrl, iconSize: [30, 30], @@ -103,12 +104,14 @@ sticky: true, className: '' }) - window.map.addLayer(marker) + window.map.addLayer(this.marker) window.map.setView([ps[1], ps[0]], 17) pulseEffect([ps[1], ps[0]]) }, // 鐐瑰嚮纭鎸夐挳浜嬩欢 confirm () { + window.mapManager.clearHighlight() + window.map.removeLayer(this.marker) this.searchList = [] this.clickLocation = '' eventBus.$emit('location-setChange', true) -- Gitblit v1.8.0