diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index fde0c80..cceb737 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -132,7 +132,7 @@ datas.location = lngLat; })(); - const _keys = ["rain_water_pump_station_info1", "sewage_pump_station_info1",'rainwater_pipeline_quality_area1','clickPoint','temporary','sewage_pipeline_quality1',"雨水系统流向"]; + const _keys = ["rain_water_pump_station_info1", "sewage_pump_station_info1",'rainwater_pipeline_quality_area1','clickPoint','temporary','sewage_pipeline_quality1']; console.log("properties", properties, layerId); // 图层点击事件 @@ -149,7 +149,7 @@ (() => { setHighlight_(properties); - ysFlow(); + // ysFlow(); newfiberMap.getLayers().filter((i) => i.newfiberId == "村域边界")[0].setData(turf.featureCollection([])); busEmit(removeMapDatas.key, _keys.filter(i => i != (properties || {}).type)); @@ -159,6 +159,7 @@ town.prevId = null; } + // clearRouteMethod(); /* if (psfq.prevIds.length && !([psfq.key,point.key].includes(layerId))) { districtMask(); const isOne = psfq.prevIds.length == 1?1:2 @@ -382,7 +383,6 @@ } function ys_flow(properties, visible) { - debugger; const keys = ["雨水系统流向", "雨水系统流向1"]; if(!visible) return keys.forEach((key) => busEmit(setLayerVisible.key, { layername: key, isCheck: visible })); const layerSplit = properties.c_layer.split("_"); @@ -440,7 +440,7 @@ const { removeMapDatas } = events_params; const _keys = ['污水系统流向1','污水系统流向',"1_泵站","1_污水处理厂",'排口流向', '排口流向1', 'rainwater_pipeline_quality1',"sewage_pump_station_info1"]; busEmit(removeMapDatas.key, [_keys[2],_keys[0],_keys[4],_keys[6]]); - newfiberMap.getLayers().filter(i => i.newfiberId == _keys[1])[0].setData(turf.featureCollection([])); + newfiberMap.getLayers().filter(i => [_keys[1],_keys[5]].includes(i.newfiberId)).forEach(i => i.setData(turf.featureCollection([]))); } function setHighlight_(properties = {}) {