diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 8128565..ea5cc9d 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1146,6 +1146,7 @@ "泵车在线", "泵车在线", "waterlog_community", "渍水点扎点@2x", "clickPoint", "selectedLocation", + "temporary", "selectedLocation", "tran" ], "icon-allow-overlap": true, diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 8128565..ea5cc9d 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1146,6 +1146,7 @@ "泵车在线", "泵车在线", "waterlog_community", "渍水点扎点@2x", "clickPoint", "selectedLocation", + "temporary", "selectedLocation", "tran" ], "icon-allow-overlap": true, diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index c882008..e198505 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -125,16 +125,17 @@ newfiberMap.popup1.setLngLat(lngLat).addTo(newfiberMap.map); datas.location = lngLat; })(); + const _keys = ["rain_water_pump_station_info1", "sewage_pump_station_info1",'rainwater_pipeline_quality_area1','clickPoint','temporary']; console.log("properties", properties, layerId); // 图层点击事件 - if (properties) bus.emit("FenQuClick", {properties,layerId}); + if (properties) properties.type = (properties.type == _keys[4]) && properties.pointType,bus.emit("FenQuClick", {properties,layerId}); clearTrajectory(); // clearTemporaryData(); proxy.$emit("map-click1", lngLat, properties, layerId); const { town, hupo, gangqu, hb_wh_dhgx_merge,psfq,point } = default_params; const { setLayerVisible, setHighlight, setGeoJSON, removeMapDatas } = events_params; - const _keys = ["rain_water_pump_station_info1", "sewage_pump_station_info1",'rainwater_pipeline_quality_area1','clickPoint']; + (() => { setHighlight_(properties); @@ -656,7 +657,7 @@ "temporary", "highlight_linestring", "highlight_polygon", - "highlight_point" + "highlight_point",'clickPoint' ]; clearRouteMethod(); const hideKeys = ["雨水系统流向", "雨水系统流向1","排水分区_close"]; diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 8128565..ea5cc9d 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1146,6 +1146,7 @@ "泵车在线", "泵车在线", "waterlog_community", "渍水点扎点@2x", "clickPoint", "selectedLocation", + "temporary", "selectedLocation", "tran" ], "icon-allow-overlap": true, diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index c882008..e198505 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -125,16 +125,17 @@ newfiberMap.popup1.setLngLat(lngLat).addTo(newfiberMap.map); datas.location = lngLat; })(); + const _keys = ["rain_water_pump_station_info1", "sewage_pump_station_info1",'rainwater_pipeline_quality_area1','clickPoint','temporary']; console.log("properties", properties, layerId); // 图层点击事件 - if (properties) bus.emit("FenQuClick", {properties,layerId}); + if (properties) properties.type = (properties.type == _keys[4]) && properties.pointType,bus.emit("FenQuClick", {properties,layerId}); clearTrajectory(); // clearTemporaryData(); proxy.$emit("map-click1", lngLat, properties, layerId); const { town, hupo, gangqu, hb_wh_dhgx_merge,psfq,point } = default_params; const { setLayerVisible, setHighlight, setGeoJSON, removeMapDatas } = events_params; - const _keys = ["rain_water_pump_station_info1", "sewage_pump_station_info1",'rainwater_pipeline_quality_area1','clickPoint']; + (() => { setHighlight_(properties); @@ -656,7 +657,7 @@ "temporary", "highlight_linestring", "highlight_polygon", - "highlight_point" + "highlight_point",'clickPoint' ]; clearRouteMethod(); const hideKeys = ["雨水系统流向", "雨水系统流向1","排水分区_close"]; diff --git a/src/views/pictureOnMap/inputSearch.vue b/src/views/pictureOnMap/inputSearch.vue index 9c9d27e..0c96a6a 100644 --- a/src/views/pictureOnMap/inputSearch.vue +++ b/src/views/pictureOnMap/inputSearch.vue @@ -69,10 +69,18 @@ // 值改变后的操作 function selectchange(value) { if(value){ - let feature = turf.feature(Terraformer.WKT.parse(value)); + let arr = SelectList.value.filter(item => { + return item.geometry == value; + }); + if (arr && arr[0]) { + getItem.value = arr[0]; + } + selectmodel.value = getItem.value.name; + let feature = turf.feature(Terraformer.WKT.parse(value),_.cloneDeep(getItem.value)); bus.emit('setHighlight',feature); newfiberMap.map.easeTo({center:turf.getCoords(turf.center(feature)),zoom:15}); - busEmit(events_params.setGeoJSON.key, { json: turf.featureCollection([feature]), key: 'clickPoint' }); + debugger; + bus.emit('setGeoJSON', { json: turf.featureCollection([feature]), key: 'temporary' }); } /* if (value) { @@ -98,6 +106,8 @@ } else { filterList.value = SelectList.value; } + + // bus.emit('removeMapDatas',['temporary']); },500) onMounted(() => {