diff --git a/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue b/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue index 6ed17014a..4b64c27f0 100644 --- a/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue +++ b/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue @@ -447,11 +447,11 @@ export default { //加载地图数据 loadMap () { if (this.isfirstInit) { - this.agencyInfo.level = 'agency' + // this.agencyInfo.level = 'agency' //mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray this.$refs.map.loadMap(this.agencyInfo, this.polygonList, null, this.distributionsList, this.iconUrlArray, null) } else { - this.$refs.map.refreshMap(this.polygonList, this.distributionsList) + this.$refs.map.refreshMap(this.agencyInfo, this.polygonList, this.distributionsList) } }, @@ -613,6 +613,9 @@ export default { if (!this.agencyInfo.level) { this.agencyInfo.level = 'street' } + if (!this.agencyInfo.agencyLevel) { + this.agencyInfo.agencyLevel = 'street' + } } else { this.$message.error(msg); } diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue index f0fed3819..302d82539 100644 --- a/src/views/modules/visual/components/screen-map/index.vue +++ b/src/views/modules/visual/components/screen-map/index.vue @@ -265,9 +265,15 @@ const vueGis = { this.polygonArray = [] this.polygonArray = polygonArray this.iconArrays = iconArrays - iconSource.clear() - polygonSource.clear() - polIconSource.clear() + if (iconSource) { + iconSource.clear() + } + if (polygonSource) { + polygonSource.clear() + } + if (polIconSource) { + polIconSource.clear() + } this.initPolIconLayer() if (this.showPolygonLayer) { @@ -608,7 +614,7 @@ const vueGis = { }) }), new Style({ - // text: createTextStyle(feature) // 报错 暂时注掉 zty 2022.05.19 + // text: createTextStyle(feature) // 报错 暂时注掉 zhaotongyao 2022.05.19 }) ]; styles['MultiPolygon'] = styles['Polygon'];