diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 21ebc8e..6ca769f 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -474,6 +474,43 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "pipeLineLabel", + "key": "hn_kf_hm_pipeline", + "source-layer": "hn_kf_hm_pipeline", + "type": "symbol", + "filter": [ + "in", + "类型", + "" + ], + "layout": { + "text-field": [ + "get", + "管径" + ], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], + "text-rotation-alignment": "map", + "text-size": 15, + "text-transform": "uppercase", + "symbol-placement": "line", + "text-offset": [ + 0, + -0.5 + ], + "text-allow-overlap": true, + "text-letter-spacing": 1.1 + }, + "paint": { + "text-color": "rgba(255, 255, 255, 1)", + "text-halo-color": "rgba(36, 94, 122, 1)", + "text-halo-width": 2 + }, + "mType": "mvt", + "columns": "起始点号,连接点号,类型,管径,st_asText(geometrys) as geometry" + }, + { "id": "hn_kf_hm_dltb", "key": "hn_kf_hm_dltb", "source-layer": "hn_kf_hm_dltb", @@ -748,6 +785,9 @@ "pipeline_point" ], [ + "pipeLineLabel" + ], + [ "poi_label" ], [ @@ -767,7 +807,8 @@ "wsLine1": { "layerName": [ "pipeline_info", - "pipeline_point" + "pipeline_point", + "pipeLineLabel" ], "filter": [ [ @@ -775,13 +816,17 @@ ], [ "ws" + ], + [ + "ws" ] ] }, "hsLine1": { "layerName": [ "pipeline_info", - "pipeline_point" + "pipeline_point", + "pipeLineLabel" ], "filter": [ [ @@ -789,13 +834,17 @@ ], [ "hs" + ], + [ + "hs" ] ] }, "ysLine1": { "layerName": [ "pipeline_info", - "pipeline_point" + "pipeline_point", + "pipeLineLabel" ], "filter": [ [ @@ -803,6 +852,9 @@ ], [ "ys" + ], + [ + "ys" ] ] }, diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 21ebc8e..6ca769f 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -474,6 +474,43 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "pipeLineLabel", + "key": "hn_kf_hm_pipeline", + "source-layer": "hn_kf_hm_pipeline", + "type": "symbol", + "filter": [ + "in", + "类型", + "" + ], + "layout": { + "text-field": [ + "get", + "管径" + ], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], + "text-rotation-alignment": "map", + "text-size": 15, + "text-transform": "uppercase", + "symbol-placement": "line", + "text-offset": [ + 0, + -0.5 + ], + "text-allow-overlap": true, + "text-letter-spacing": 1.1 + }, + "paint": { + "text-color": "rgba(255, 255, 255, 1)", + "text-halo-color": "rgba(36, 94, 122, 1)", + "text-halo-width": 2 + }, + "mType": "mvt", + "columns": "起始点号,连接点号,类型,管径,st_asText(geometrys) as geometry" + }, + { "id": "hn_kf_hm_dltb", "key": "hn_kf_hm_dltb", "source-layer": "hn_kf_hm_dltb", @@ -748,6 +785,9 @@ "pipeline_point" ], [ + "pipeLineLabel" + ], + [ "poi_label" ], [ @@ -767,7 +807,8 @@ "wsLine1": { "layerName": [ "pipeline_info", - "pipeline_point" + "pipeline_point", + "pipeLineLabel" ], "filter": [ [ @@ -775,13 +816,17 @@ ], [ "ws" + ], + [ + "ws" ] ] }, "hsLine1": { "layerName": [ "pipeline_info", - "pipeline_point" + "pipeline_point", + "pipeLineLabel" ], "filter": [ [ @@ -789,13 +834,17 @@ ], [ "hs" + ], + [ + "hs" ] ] }, "ysLine1": { "layerName": [ "pipeline_info", - "pipeline_point" + "pipeline_point", + "pipeLineLabel" ], "filter": [ [ @@ -803,6 +852,9 @@ ], [ "ys" + ], + [ + "ys" ] ] }, diff --git a/src/views/gisMapPage/gisMapBox1.vue b/src/views/gisMapPage/gisMapBox1.vue index d90e881..2de4619 100644 --- a/src/views/gisMapPage/gisMapBox1.vue +++ b/src/views/gisMapPage/gisMapBox1.vue @@ -164,7 +164,7 @@ tiles: [config.params.mvt + `/v1/${mType}/${item.key}/{z}/{x}/{y}` + params], tileSize: 512, scheme: 'xyz', - maxzoom: 14, + maxzoom: 24, minzoom: 1, }); } @@ -214,11 +214,11 @@ const setLayerVisible = ({ layername, isCheck }) => { if (!!!window.newfiberMapbox) return; - console.log('layername---', layername); if (((config || {}).filter || {})[layername]) { config.filter[layername].layerName.forEach((name, index) => { let filter = map.getFilter(name); let fValues = config.filter[layername].filter[index]; + console.log('fValues---', fValues); isCheck ? filter.push(...fValues) : (filter = filter.filter(i => !fValues.includes(i))); map.setFilter(name, filter); });