diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index f06424f..2a2f78a 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1165,10 +1165,10 @@ ], "text-size": 13, "text-justify": "left", - "text-anchor": "top", + "text-anchor": "bottom", "text-line-height": 1.3, "text-max-width": 10, - "text-offset": [0,1.5], + "text-offset": [4.5,-2.0], "text-optional": true }, "mType": "geojson" diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index f06424f..2a2f78a 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1165,10 +1165,10 @@ ], "text-size": 13, "text-justify": "left", - "text-anchor": "top", + "text-anchor": "bottom", "text-line-height": 1.3, "text-max-width": 10, - "text-offset": [0,1.5], + "text-offset": [4.5,-2.0], "text-optional": true }, "mType": "geojson" diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index 2f568dc..1927438 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -84,6 +84,7 @@ }, psfq: { key: "排水分区", + text_key:"排水分区_text", prevIds: [], children: { WS: { key: "污水分区" }, @@ -131,7 +132,7 @@ // 图层点击事件 if (properties) { if(properties.type == _keys[4])properties.type = properties.pointType - bus.emit("FenQuClick", {properties,layerId}); + bus.emit("FenQuClick", {properties,layerId:layerId.split('_')[0]}); } clearTrajectory(); // clearTemporaryData(); @@ -176,6 +177,11 @@ ["outlet_info2",'排口流向','排口流向1','rainwater_pipeline_quality1',_keys[2]].forEach(k => busEmit(setLayerVisible.key, {layername:k, isCheck: true})); areaToMap(properties); }, + [psfq.text_key]: () => { + ['雨水系统流向','雨水系统流向1'].forEach(k => busEmit(setLayerVisible.key, {layername:k, isCheck: false})); + ["outlet_info2",'排口流向','排口流向1','rainwater_pipeline_quality1',_keys[2]].forEach(k => busEmit(setLayerVisible.key, {layername:k, isCheck: true})); + areaToMap({...properties,geometry:Terraformer.WKT.convert(JSON.parse(properties.geometrys))}); + }, [town.key]: () => { newfiberMap.getLayers().filter((i) => i.newfiberId == "村域边界")[0].setData(turf.featureCollection(newfiberMap.map.getSource("hb_wh_gxq_cun2")._data.features.filter((i) => i.properties.type == properties.name))); busEmit(setLayerVisible.key, { layername: town.key, isCheck: false });