diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 961ce31..9393cb4 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -2,9 +2,14 @@ "params": { "basemap": "https://supermap2.wh-nf.cn:8090/bm", "mvt": "https://supermap0.wh-nf.cn:8090/vt", - "sprites": ["/static/libs/mapbox/style/sprite/sprite5"], + "sprites": [ + "/static/libs/mapbox/style/sprite/sprite5" + ], "init": { - "center": [114.315, 34.852], + "center": [ + 114.315, + 34.852 + ], "zoom": 10.4, "pitch": 10, "style": "/static/libs/mapbox/style/customs/whiteMapStyle.json" @@ -29,7 +34,16 @@ "params": { "id": "newfiber-XYZLayer", "url": "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=a603e07a17766447f9e74f14c5454efa", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"], + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], "minZoom": 1, "maxZoom": 19, "tileType": "" @@ -37,7 +51,9 @@ "methods": [ { "name": "addTo", - "params": ["''||map"] + "params": [ + "''||map" + ] }, { "name": "hide", @@ -51,7 +67,16 @@ "params": { "id": "newfiber-WMTSLayer", "url": "https://t{s}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=5095c97223409ac114493d71ecb9cd87", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"] + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] }, "methods": [] }, @@ -60,7 +85,12 @@ "type": "CanvasLayer", "params": { "id": "newfiber-CanvasLayer", - "bbox": [110.98300209463804, 32.415967161418266, 111.34992583909221, 32.599933881244255], + "bbox": [ + 110.98300209463804, + 32.415967161418266, + 111.34992583909221, + 32.599933881244255 + ], "width": 3000, "height": 1172, "images": "''||Array(16).fill().map((i,idx)=> `https://server1.wh-nf.cn:9000/newfiber-standard/2024/01/06/step${idx+1}.png`)" @@ -91,7 +121,9 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "color", @@ -133,15 +165,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -186,19 +224,28 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(236,223,25,1.0)"] + "params": [ + "rgba(236,223,25,1.0)" + ] }, { "name": "size", - "params": ["size", "''||function(v){return v}"] + "params": [ + "size", + "''||function(v){return v}" + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -222,15 +269,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -275,19 +328,27 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(255,0,0,1.0)"] + "params": [ + "rgba(255,0,0,1.0)" + ] }, { "name": "size", - "params": [10] + "params": [ + 10 + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -311,17 +372,24 @@ "methods": [ { "name": "shape", - "params": ["map_selected"] + "params": [ + "map_selected" + ] }, { "name": "size", - "params": [30] + "params": [ + 30 + ] }, { "name": "style", "params": [ { - "offsets": [0, 0] + "offsets": [ + 0, + 0 + ] } ] } @@ -338,15 +406,21 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "size", - "params": [2] + "params": [ + 2 + ] }, { "name": "color", - "params": ["rgba(189, 209, 150,1)"] + "params": [ + "rgba(189, 209, 150,1)" + ] } ] } @@ -371,9 +445,26 @@ "key": "hn_kf_hm_pipeline", "source-layer": "hn_kf_hm_pipeline", "type": "line", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { - "line-color": ["match", ["get", "类型"], "ys", "#1b76ff", "ws", "#ff4c61", "hs", "#EAA333", "#000000"], + "line-color": [ + "match", + [ + "get", + "类型" + ], + "ys", + "#1b76ff", + "ws", + "#ff4c61", + "hs", + "#EAA333", + "#000000" + ], "line-width": 2 }, "layout": {}, @@ -383,13 +474,119 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "hn_kf_hm_dltb", + "key": "hn_kf_hm_dltb", + "source-layer": "hn_kf_hm_dltb", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "dlmc" + ], + "水浇地", + "#fbe5ab", + "果园", + "#d4a9cb", + "水田", + "#f8d072", + "旱地", + "#ffffc8", + "乔木林地", + "#32963c", + "灌木林地", + "#55b464", + "其他林地", + "#97cfb2", + "其他草地", + "#b7dca0", + "物流仓储用地", + "#f3ae4a", + "商业服务业设施用地", + "#ffc200", + "工业用地", + "#c59a8c", + "采矿用地", + "#c59a8c", + "城镇住宅用地", + "#f06e7d", + "公用设施用地", + "#ffaac8", + "公园与绿地", + "#81c35d", + "广场用地", + "#81c35d", + "机关团体新闻出版用地", + "#ffaac8", + "科教文卫用地", + "#ffaac8", + "高教用地", + "#ffaac8", + "特殊用地", + "#e77844", + "铁路用地", + "#d1cfd6", + "公路用地", + "#d2d8c9", + "城镇村道路用地", + "#d2d8c9", + "交通服务场站用地", + "#c2c1c1", + "农村道路", + "#aaa9a9", + "管道运输用地", + "#e9817b", + "河流水面", + "#a3d6f5", + "坑塘水面", + "#90aacf", + "养殖坑塘", + "#90aacf", + "内陆滩涂", + "#d7ffff", + "沟渠", + "#e68264", + "水工建筑用地", + "#e68264", + "空闲地", + "#e1dce1", + "设施农用地", + "#dcb482", + "裸土地", + "#dcb482", + "水库水面", + "#a3d6f5", + "农村宅基地", + "#f06e7d", + "湖泊水面", + "#a3d6f5", + "#ffffff" + ] + }, + "layout": { + "visibility": "none" + }, + "minzoom": 0, + "maxzoom": 24, + "mType": "mvt", + "columns": "dlmc,st_asText(geometrys) as geometry" + }, + { "id": "city_boundary", "key": "hubei_xiaogan_hm_city_boundary", "source-layer": "hubei_xiaogan_hm_city_boundary", "type": "fill", - "filter": ["in", "name", ""], + "filter": [ + "in", + "name", + "" + ], "paint": { - "fill-color": ["get", "fill_color"] + "fill-color": [ + "get", + "fill_color" + ] }, "layout": {}, "minzoom": 10, @@ -402,9 +599,16 @@ "key": "hubei_xiaogan_hm_psfq", "source-layer": "hubei_xiaogan_hm_psfq", "type": "fill", - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { - "fill-color": ["get", "fill_color"], + "fill-color": [ + "get", + "fill_color" + ], "fill-opacity": 0.4 }, "layout": {}, @@ -418,17 +622,36 @@ "key": "hn_kf_hm_pipeline_point", "source-layer": "hn_kf_hm_pipeline_point", "type": "symbol", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", "text-halo-width": 2 }, "layout": { - "icon-image": ["match", ["get", "类型"], "ys", "ysj", "ws", "wsj", "hs", "hsj", "ysbz"], + "icon-image": [ + "match", + [ + "get", + "类型" + ], + "ys", + "ysj", + "ws", + "wsj", + "hs", + "hsj", + "ysbz" + ], "icon-size": 0.5, "text-field": "{管线点号}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 13, "text-line-height": 3, "text-anchor": "top" @@ -444,7 +667,11 @@ "type": "symbol", "minzoom": 0, "maxzoom": 24, - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", @@ -453,7 +680,10 @@ "layout": { "icon-image": [ "match", - ["get", "type"], + [ + "get", + "type" + ], "YSBZ", "rainBengZhan_icon", "WSBZ", @@ -483,85 +713,192 @@ "icon-anchor": "center", "icon-size": 0.8, "text-field": "{name}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 15, "text-line-height": 3, "text-anchor": "bottom", "text-max-width": 50, - "text-offset": [0, 3] + "text-offset": [ + 0, + 3 + ] }, "mType": "geojson" } ], "orders": [ - ["newfiber-XYZLayer"], - ["hubei_xiaogan_hm_psfq"], - ["city_boundary"], - ["all_boundary"], - ["pipeline_info"], - ["pipeline_point"], - ["poi_label"], - ["place_label_city"], - ["road_major_label"], - ["place_label_other"], - ["point"] + [ + "newfiber-XYZLayer" + ], + [ + "hubei_xiaogan_hm_psfq" + ], + [ + "city_boundary" + ], + [ + "all_boundary" + ], + [ + "pipeline_info" + ], + [ + "pipeline_point" + ], + [ + "poi_label" + ], + [ + "place_label_city" + ], + [ + "road_major_label" + ], + [ + "place_label_other" + ], + [ + "point" + ] ], "filter": { "wsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ws"], ["ws"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ws" + ], + [ + "ws" + ] + ] }, "hsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["hs"], ["hs"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "hs" + ], + [ + "hs" + ] + ] }, "ysLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ys"], ["ys"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ys" + ], + [ + "ys" + ] + ] }, "YSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["YS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "YS" + ] + ] }, "WSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["WS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "WS" + ] + ] }, "oldCity": { - "layerName": ["city_boundary"], - "filter": [["老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "老城区" + ] + ], "easeTo": { - "center": [113.933, 30.926], + "center": [ + 113.933, + 30.926 + ], "zoom": 13.6, "pitch": 55 } }, "southCity": { - "layerName": ["city_boundary"], - "filter": [["南城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "南城新区" + ] + ], "easeTo": { - "center": [113.933, 30.886], + "center": [ + 113.933, + 30.886 + ], "zoom": 13.6, "pitch": 55 } }, "newCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区" + ] + ], "easeTo": { - "center": [113.983, 30.896], + "center": [ + 113.983, + 30.896 + ], "zoom": 13.6, "pitch": 55 } }, "allCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区", "南城新区", "老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区", + "南城新区", + "老城区" + ] + ], "easeTo": { - "center": [113.953, 30.906], + "center": [ + 113.953, + 30.906 + ], "zoom": 13.6, "pitch": 55 } } } -} +} \ No newline at end of file diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 961ce31..9393cb4 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -2,9 +2,14 @@ "params": { "basemap": "https://supermap2.wh-nf.cn:8090/bm", "mvt": "https://supermap0.wh-nf.cn:8090/vt", - "sprites": ["/static/libs/mapbox/style/sprite/sprite5"], + "sprites": [ + "/static/libs/mapbox/style/sprite/sprite5" + ], "init": { - "center": [114.315, 34.852], + "center": [ + 114.315, + 34.852 + ], "zoom": 10.4, "pitch": 10, "style": "/static/libs/mapbox/style/customs/whiteMapStyle.json" @@ -29,7 +34,16 @@ "params": { "id": "newfiber-XYZLayer", "url": "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=a603e07a17766447f9e74f14c5454efa", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"], + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], "minZoom": 1, "maxZoom": 19, "tileType": "" @@ -37,7 +51,9 @@ "methods": [ { "name": "addTo", - "params": ["''||map"] + "params": [ + "''||map" + ] }, { "name": "hide", @@ -51,7 +67,16 @@ "params": { "id": "newfiber-WMTSLayer", "url": "https://t{s}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=5095c97223409ac114493d71ecb9cd87", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"] + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] }, "methods": [] }, @@ -60,7 +85,12 @@ "type": "CanvasLayer", "params": { "id": "newfiber-CanvasLayer", - "bbox": [110.98300209463804, 32.415967161418266, 111.34992583909221, 32.599933881244255], + "bbox": [ + 110.98300209463804, + 32.415967161418266, + 111.34992583909221, + 32.599933881244255 + ], "width": 3000, "height": 1172, "images": "''||Array(16).fill().map((i,idx)=> `https://server1.wh-nf.cn:9000/newfiber-standard/2024/01/06/step${idx+1}.png`)" @@ -91,7 +121,9 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "color", @@ -133,15 +165,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -186,19 +224,28 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(236,223,25,1.0)"] + "params": [ + "rgba(236,223,25,1.0)" + ] }, { "name": "size", - "params": ["size", "''||function(v){return v}"] + "params": [ + "size", + "''||function(v){return v}" + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -222,15 +269,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -275,19 +328,27 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(255,0,0,1.0)"] + "params": [ + "rgba(255,0,0,1.0)" + ] }, { "name": "size", - "params": [10] + "params": [ + 10 + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -311,17 +372,24 @@ "methods": [ { "name": "shape", - "params": ["map_selected"] + "params": [ + "map_selected" + ] }, { "name": "size", - "params": [30] + "params": [ + 30 + ] }, { "name": "style", "params": [ { - "offsets": [0, 0] + "offsets": [ + 0, + 0 + ] } ] } @@ -338,15 +406,21 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "size", - "params": [2] + "params": [ + 2 + ] }, { "name": "color", - "params": ["rgba(189, 209, 150,1)"] + "params": [ + "rgba(189, 209, 150,1)" + ] } ] } @@ -371,9 +445,26 @@ "key": "hn_kf_hm_pipeline", "source-layer": "hn_kf_hm_pipeline", "type": "line", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { - "line-color": ["match", ["get", "类型"], "ys", "#1b76ff", "ws", "#ff4c61", "hs", "#EAA333", "#000000"], + "line-color": [ + "match", + [ + "get", + "类型" + ], + "ys", + "#1b76ff", + "ws", + "#ff4c61", + "hs", + "#EAA333", + "#000000" + ], "line-width": 2 }, "layout": {}, @@ -383,13 +474,119 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "hn_kf_hm_dltb", + "key": "hn_kf_hm_dltb", + "source-layer": "hn_kf_hm_dltb", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "dlmc" + ], + "水浇地", + "#fbe5ab", + "果园", + "#d4a9cb", + "水田", + "#f8d072", + "旱地", + "#ffffc8", + "乔木林地", + "#32963c", + "灌木林地", + "#55b464", + "其他林地", + "#97cfb2", + "其他草地", + "#b7dca0", + "物流仓储用地", + "#f3ae4a", + "商业服务业设施用地", + "#ffc200", + "工业用地", + "#c59a8c", + "采矿用地", + "#c59a8c", + "城镇住宅用地", + "#f06e7d", + "公用设施用地", + "#ffaac8", + "公园与绿地", + "#81c35d", + "广场用地", + "#81c35d", + "机关团体新闻出版用地", + "#ffaac8", + "科教文卫用地", + "#ffaac8", + "高教用地", + "#ffaac8", + "特殊用地", + "#e77844", + "铁路用地", + "#d1cfd6", + "公路用地", + "#d2d8c9", + "城镇村道路用地", + "#d2d8c9", + "交通服务场站用地", + "#c2c1c1", + "农村道路", + "#aaa9a9", + "管道运输用地", + "#e9817b", + "河流水面", + "#a3d6f5", + "坑塘水面", + "#90aacf", + "养殖坑塘", + "#90aacf", + "内陆滩涂", + "#d7ffff", + "沟渠", + "#e68264", + "水工建筑用地", + "#e68264", + "空闲地", + "#e1dce1", + "设施农用地", + "#dcb482", + "裸土地", + "#dcb482", + "水库水面", + "#a3d6f5", + "农村宅基地", + "#f06e7d", + "湖泊水面", + "#a3d6f5", + "#ffffff" + ] + }, + "layout": { + "visibility": "none" + }, + "minzoom": 0, + "maxzoom": 24, + "mType": "mvt", + "columns": "dlmc,st_asText(geometrys) as geometry" + }, + { "id": "city_boundary", "key": "hubei_xiaogan_hm_city_boundary", "source-layer": "hubei_xiaogan_hm_city_boundary", "type": "fill", - "filter": ["in", "name", ""], + "filter": [ + "in", + "name", + "" + ], "paint": { - "fill-color": ["get", "fill_color"] + "fill-color": [ + "get", + "fill_color" + ] }, "layout": {}, "minzoom": 10, @@ -402,9 +599,16 @@ "key": "hubei_xiaogan_hm_psfq", "source-layer": "hubei_xiaogan_hm_psfq", "type": "fill", - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { - "fill-color": ["get", "fill_color"], + "fill-color": [ + "get", + "fill_color" + ], "fill-opacity": 0.4 }, "layout": {}, @@ -418,17 +622,36 @@ "key": "hn_kf_hm_pipeline_point", "source-layer": "hn_kf_hm_pipeline_point", "type": "symbol", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", "text-halo-width": 2 }, "layout": { - "icon-image": ["match", ["get", "类型"], "ys", "ysj", "ws", "wsj", "hs", "hsj", "ysbz"], + "icon-image": [ + "match", + [ + "get", + "类型" + ], + "ys", + "ysj", + "ws", + "wsj", + "hs", + "hsj", + "ysbz" + ], "icon-size": 0.5, "text-field": "{管线点号}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 13, "text-line-height": 3, "text-anchor": "top" @@ -444,7 +667,11 @@ "type": "symbol", "minzoom": 0, "maxzoom": 24, - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", @@ -453,7 +680,10 @@ "layout": { "icon-image": [ "match", - ["get", "type"], + [ + "get", + "type" + ], "YSBZ", "rainBengZhan_icon", "WSBZ", @@ -483,85 +713,192 @@ "icon-anchor": "center", "icon-size": 0.8, "text-field": "{name}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 15, "text-line-height": 3, "text-anchor": "bottom", "text-max-width": 50, - "text-offset": [0, 3] + "text-offset": [ + 0, + 3 + ] }, "mType": "geojson" } ], "orders": [ - ["newfiber-XYZLayer"], - ["hubei_xiaogan_hm_psfq"], - ["city_boundary"], - ["all_boundary"], - ["pipeline_info"], - ["pipeline_point"], - ["poi_label"], - ["place_label_city"], - ["road_major_label"], - ["place_label_other"], - ["point"] + [ + "newfiber-XYZLayer" + ], + [ + "hubei_xiaogan_hm_psfq" + ], + [ + "city_boundary" + ], + [ + "all_boundary" + ], + [ + "pipeline_info" + ], + [ + "pipeline_point" + ], + [ + "poi_label" + ], + [ + "place_label_city" + ], + [ + "road_major_label" + ], + [ + "place_label_other" + ], + [ + "point" + ] ], "filter": { "wsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ws"], ["ws"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ws" + ], + [ + "ws" + ] + ] }, "hsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["hs"], ["hs"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "hs" + ], + [ + "hs" + ] + ] }, "ysLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ys"], ["ys"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ys" + ], + [ + "ys" + ] + ] }, "YSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["YS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "YS" + ] + ] }, "WSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["WS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "WS" + ] + ] }, "oldCity": { - "layerName": ["city_boundary"], - "filter": [["老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "老城区" + ] + ], "easeTo": { - "center": [113.933, 30.926], + "center": [ + 113.933, + 30.926 + ], "zoom": 13.6, "pitch": 55 } }, "southCity": { - "layerName": ["city_boundary"], - "filter": [["南城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "南城新区" + ] + ], "easeTo": { - "center": [113.933, 30.886], + "center": [ + 113.933, + 30.886 + ], "zoom": 13.6, "pitch": 55 } }, "newCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区" + ] + ], "easeTo": { - "center": [113.983, 30.896], + "center": [ + 113.983, + 30.896 + ], "zoom": 13.6, "pitch": 55 } }, "allCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区", "南城新区", "老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区", + "南城新区", + "老城区" + ] + ], "easeTo": { - "center": [113.953, 30.906], + "center": [ + 113.953, + 30.906 + ], "zoom": 13.6, "pitch": 55 } } } -} +} \ No newline at end of file diff --git a/src/assets/geojson/kaifeng/oneCenter3.json b/src/assets/geojson/kaifeng/oneCenter3.json index 077ee11..805754c 100644 --- a/src/assets/geojson/kaifeng/oneCenter3.json +++ b/src/assets/geojson/kaifeng/oneCenter3.json @@ -1 +1 @@ -{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.29361882693021,34.766181588327946],[114.39325875654936,34.764991857825031]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.19159943630524,34.908354383426307],[114.34358750805265,34.90746208554912]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file +{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.30598421298961,34.751257846532106],[114.40562414260876,34.75006811602919]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.26493896741621,34.912618309653688],[114.41692703916362,34.911726011776501]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 961ce31..9393cb4 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -2,9 +2,14 @@ "params": { "basemap": "https://supermap2.wh-nf.cn:8090/bm", "mvt": "https://supermap0.wh-nf.cn:8090/vt", - "sprites": ["/static/libs/mapbox/style/sprite/sprite5"], + "sprites": [ + "/static/libs/mapbox/style/sprite/sprite5" + ], "init": { - "center": [114.315, 34.852], + "center": [ + 114.315, + 34.852 + ], "zoom": 10.4, "pitch": 10, "style": "/static/libs/mapbox/style/customs/whiteMapStyle.json" @@ -29,7 +34,16 @@ "params": { "id": "newfiber-XYZLayer", "url": "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=a603e07a17766447f9e74f14c5454efa", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"], + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], "minZoom": 1, "maxZoom": 19, "tileType": "" @@ -37,7 +51,9 @@ "methods": [ { "name": "addTo", - "params": ["''||map"] + "params": [ + "''||map" + ] }, { "name": "hide", @@ -51,7 +67,16 @@ "params": { "id": "newfiber-WMTSLayer", "url": "https://t{s}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=5095c97223409ac114493d71ecb9cd87", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"] + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] }, "methods": [] }, @@ -60,7 +85,12 @@ "type": "CanvasLayer", "params": { "id": "newfiber-CanvasLayer", - "bbox": [110.98300209463804, 32.415967161418266, 111.34992583909221, 32.599933881244255], + "bbox": [ + 110.98300209463804, + 32.415967161418266, + 111.34992583909221, + 32.599933881244255 + ], "width": 3000, "height": 1172, "images": "''||Array(16).fill().map((i,idx)=> `https://server1.wh-nf.cn:9000/newfiber-standard/2024/01/06/step${idx+1}.png`)" @@ -91,7 +121,9 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "color", @@ -133,15 +165,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -186,19 +224,28 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(236,223,25,1.0)"] + "params": [ + "rgba(236,223,25,1.0)" + ] }, { "name": "size", - "params": ["size", "''||function(v){return v}"] + "params": [ + "size", + "''||function(v){return v}" + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -222,15 +269,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -275,19 +328,27 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(255,0,0,1.0)"] + "params": [ + "rgba(255,0,0,1.0)" + ] }, { "name": "size", - "params": [10] + "params": [ + 10 + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -311,17 +372,24 @@ "methods": [ { "name": "shape", - "params": ["map_selected"] + "params": [ + "map_selected" + ] }, { "name": "size", - "params": [30] + "params": [ + 30 + ] }, { "name": "style", "params": [ { - "offsets": [0, 0] + "offsets": [ + 0, + 0 + ] } ] } @@ -338,15 +406,21 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "size", - "params": [2] + "params": [ + 2 + ] }, { "name": "color", - "params": ["rgba(189, 209, 150,1)"] + "params": [ + "rgba(189, 209, 150,1)" + ] } ] } @@ -371,9 +445,26 @@ "key": "hn_kf_hm_pipeline", "source-layer": "hn_kf_hm_pipeline", "type": "line", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { - "line-color": ["match", ["get", "类型"], "ys", "#1b76ff", "ws", "#ff4c61", "hs", "#EAA333", "#000000"], + "line-color": [ + "match", + [ + "get", + "类型" + ], + "ys", + "#1b76ff", + "ws", + "#ff4c61", + "hs", + "#EAA333", + "#000000" + ], "line-width": 2 }, "layout": {}, @@ -383,13 +474,119 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "hn_kf_hm_dltb", + "key": "hn_kf_hm_dltb", + "source-layer": "hn_kf_hm_dltb", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "dlmc" + ], + "水浇地", + "#fbe5ab", + "果园", + "#d4a9cb", + "水田", + "#f8d072", + "旱地", + "#ffffc8", + "乔木林地", + "#32963c", + "灌木林地", + "#55b464", + "其他林地", + "#97cfb2", + "其他草地", + "#b7dca0", + "物流仓储用地", + "#f3ae4a", + "商业服务业设施用地", + "#ffc200", + "工业用地", + "#c59a8c", + "采矿用地", + "#c59a8c", + "城镇住宅用地", + "#f06e7d", + "公用设施用地", + "#ffaac8", + "公园与绿地", + "#81c35d", + "广场用地", + "#81c35d", + "机关团体新闻出版用地", + "#ffaac8", + "科教文卫用地", + "#ffaac8", + "高教用地", + "#ffaac8", + "特殊用地", + "#e77844", + "铁路用地", + "#d1cfd6", + "公路用地", + "#d2d8c9", + "城镇村道路用地", + "#d2d8c9", + "交通服务场站用地", + "#c2c1c1", + "农村道路", + "#aaa9a9", + "管道运输用地", + "#e9817b", + "河流水面", + "#a3d6f5", + "坑塘水面", + "#90aacf", + "养殖坑塘", + "#90aacf", + "内陆滩涂", + "#d7ffff", + "沟渠", + "#e68264", + "水工建筑用地", + "#e68264", + "空闲地", + "#e1dce1", + "设施农用地", + "#dcb482", + "裸土地", + "#dcb482", + "水库水面", + "#a3d6f5", + "农村宅基地", + "#f06e7d", + "湖泊水面", + "#a3d6f5", + "#ffffff" + ] + }, + "layout": { + "visibility": "none" + }, + "minzoom": 0, + "maxzoom": 24, + "mType": "mvt", + "columns": "dlmc,st_asText(geometrys) as geometry" + }, + { "id": "city_boundary", "key": "hubei_xiaogan_hm_city_boundary", "source-layer": "hubei_xiaogan_hm_city_boundary", "type": "fill", - "filter": ["in", "name", ""], + "filter": [ + "in", + "name", + "" + ], "paint": { - "fill-color": ["get", "fill_color"] + "fill-color": [ + "get", + "fill_color" + ] }, "layout": {}, "minzoom": 10, @@ -402,9 +599,16 @@ "key": "hubei_xiaogan_hm_psfq", "source-layer": "hubei_xiaogan_hm_psfq", "type": "fill", - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { - "fill-color": ["get", "fill_color"], + "fill-color": [ + "get", + "fill_color" + ], "fill-opacity": 0.4 }, "layout": {}, @@ -418,17 +622,36 @@ "key": "hn_kf_hm_pipeline_point", "source-layer": "hn_kf_hm_pipeline_point", "type": "symbol", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", "text-halo-width": 2 }, "layout": { - "icon-image": ["match", ["get", "类型"], "ys", "ysj", "ws", "wsj", "hs", "hsj", "ysbz"], + "icon-image": [ + "match", + [ + "get", + "类型" + ], + "ys", + "ysj", + "ws", + "wsj", + "hs", + "hsj", + "ysbz" + ], "icon-size": 0.5, "text-field": "{管线点号}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 13, "text-line-height": 3, "text-anchor": "top" @@ -444,7 +667,11 @@ "type": "symbol", "minzoom": 0, "maxzoom": 24, - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", @@ -453,7 +680,10 @@ "layout": { "icon-image": [ "match", - ["get", "type"], + [ + "get", + "type" + ], "YSBZ", "rainBengZhan_icon", "WSBZ", @@ -483,85 +713,192 @@ "icon-anchor": "center", "icon-size": 0.8, "text-field": "{name}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 15, "text-line-height": 3, "text-anchor": "bottom", "text-max-width": 50, - "text-offset": [0, 3] + "text-offset": [ + 0, + 3 + ] }, "mType": "geojson" } ], "orders": [ - ["newfiber-XYZLayer"], - ["hubei_xiaogan_hm_psfq"], - ["city_boundary"], - ["all_boundary"], - ["pipeline_info"], - ["pipeline_point"], - ["poi_label"], - ["place_label_city"], - ["road_major_label"], - ["place_label_other"], - ["point"] + [ + "newfiber-XYZLayer" + ], + [ + "hubei_xiaogan_hm_psfq" + ], + [ + "city_boundary" + ], + [ + "all_boundary" + ], + [ + "pipeline_info" + ], + [ + "pipeline_point" + ], + [ + "poi_label" + ], + [ + "place_label_city" + ], + [ + "road_major_label" + ], + [ + "place_label_other" + ], + [ + "point" + ] ], "filter": { "wsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ws"], ["ws"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ws" + ], + [ + "ws" + ] + ] }, "hsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["hs"], ["hs"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "hs" + ], + [ + "hs" + ] + ] }, "ysLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ys"], ["ys"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ys" + ], + [ + "ys" + ] + ] }, "YSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["YS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "YS" + ] + ] }, "WSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["WS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "WS" + ] + ] }, "oldCity": { - "layerName": ["city_boundary"], - "filter": [["老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "老城区" + ] + ], "easeTo": { - "center": [113.933, 30.926], + "center": [ + 113.933, + 30.926 + ], "zoom": 13.6, "pitch": 55 } }, "southCity": { - "layerName": ["city_boundary"], - "filter": [["南城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "南城新区" + ] + ], "easeTo": { - "center": [113.933, 30.886], + "center": [ + 113.933, + 30.886 + ], "zoom": 13.6, "pitch": 55 } }, "newCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区" + ] + ], "easeTo": { - "center": [113.983, 30.896], + "center": [ + 113.983, + 30.896 + ], "zoom": 13.6, "pitch": 55 } }, "allCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区", "南城新区", "老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区", + "南城新区", + "老城区" + ] + ], "easeTo": { - "center": [113.953, 30.906], + "center": [ + 113.953, + 30.906 + ], "zoom": 13.6, "pitch": 55 } } } -} +} \ No newline at end of file diff --git a/src/assets/geojson/kaifeng/oneCenter3.json b/src/assets/geojson/kaifeng/oneCenter3.json index 077ee11..805754c 100644 --- a/src/assets/geojson/kaifeng/oneCenter3.json +++ b/src/assets/geojson/kaifeng/oneCenter3.json @@ -1 +1 @@ -{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.29361882693021,34.766181588327946],[114.39325875654936,34.764991857825031]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.19159943630524,34.908354383426307],[114.34358750805265,34.90746208554912]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file +{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.30598421298961,34.751257846532106],[114.40562414260876,34.75006811602919]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.26493896741621,34.912618309653688],[114.41692703916362,34.911726011776501]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 6397edb..36023f2 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -81,8 +81,8 @@ }, ]); const showTotalArea = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -120,8 +120,8 @@ }); }; const showCenterCity = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -159,8 +159,8 @@ }); }; const showBuiltCity = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -206,8 +206,8 @@ // }); }; const showOneCenterLayer = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'rainAreaLayer', //年经总量控制率 @@ -232,7 +232,7 @@ }, ]); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter', oneCenter); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1, 0, 2); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter2', oneCenter2); newfiberMapbox.map.easeTo({ center: [114.315, 34.852], @@ -255,28 +255,30 @@ // if (!newfiberMap.xdmWms) { // newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ // url: '/geoserver/demo/wms', - // layers: 'demo:hn_kf_hm_dilei', + // layers: 'hn_kf_hm_dltb', // visible: true, // }); // return; // } // let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; // imageryProvider.show = !!!imageryProvider.show; - newfiberMapBoxVectorLayer.addWMSLayer('demo:hn_kf_hm_dilei'); if (wmsVisibility.value) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'visible'); + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'visible'); } else { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } }; onMounted(() => { let mapboxTimer = setInterval(() => { if (!newfiberMapbox) return; + if (!newfiberMapbox.map.getLayer('kaifengWaterLabel1')) return; newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter', oneCenter); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1, 0, 2); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter2', oneCenter2); newfiberMapBoxVectorLayer.addLabelAlongLine('oneCenter3', oneCenter3); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel1', 'visibility', 'none'); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel2', 'visibility', 'none'); clearInterval(mapboxTimer); }); newfiberMapbox.map.easeTo({ diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 961ce31..9393cb4 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -2,9 +2,14 @@ "params": { "basemap": "https://supermap2.wh-nf.cn:8090/bm", "mvt": "https://supermap0.wh-nf.cn:8090/vt", - "sprites": ["/static/libs/mapbox/style/sprite/sprite5"], + "sprites": [ + "/static/libs/mapbox/style/sprite/sprite5" + ], "init": { - "center": [114.315, 34.852], + "center": [ + 114.315, + 34.852 + ], "zoom": 10.4, "pitch": 10, "style": "/static/libs/mapbox/style/customs/whiteMapStyle.json" @@ -29,7 +34,16 @@ "params": { "id": "newfiber-XYZLayer", "url": "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=a603e07a17766447f9e74f14c5454efa", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"], + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], "minZoom": 1, "maxZoom": 19, "tileType": "" @@ -37,7 +51,9 @@ "methods": [ { "name": "addTo", - "params": ["''||map"] + "params": [ + "''||map" + ] }, { "name": "hide", @@ -51,7 +67,16 @@ "params": { "id": "newfiber-WMTSLayer", "url": "https://t{s}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=5095c97223409ac114493d71ecb9cd87", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"] + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] }, "methods": [] }, @@ -60,7 +85,12 @@ "type": "CanvasLayer", "params": { "id": "newfiber-CanvasLayer", - "bbox": [110.98300209463804, 32.415967161418266, 111.34992583909221, 32.599933881244255], + "bbox": [ + 110.98300209463804, + 32.415967161418266, + 111.34992583909221, + 32.599933881244255 + ], "width": 3000, "height": 1172, "images": "''||Array(16).fill().map((i,idx)=> `https://server1.wh-nf.cn:9000/newfiber-standard/2024/01/06/step${idx+1}.png`)" @@ -91,7 +121,9 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "color", @@ -133,15 +165,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -186,19 +224,28 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(236,223,25,1.0)"] + "params": [ + "rgba(236,223,25,1.0)" + ] }, { "name": "size", - "params": ["size", "''||function(v){return v}"] + "params": [ + "size", + "''||function(v){return v}" + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -222,15 +269,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -275,19 +328,27 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(255,0,0,1.0)"] + "params": [ + "rgba(255,0,0,1.0)" + ] }, { "name": "size", - "params": [10] + "params": [ + 10 + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -311,17 +372,24 @@ "methods": [ { "name": "shape", - "params": ["map_selected"] + "params": [ + "map_selected" + ] }, { "name": "size", - "params": [30] + "params": [ + 30 + ] }, { "name": "style", "params": [ { - "offsets": [0, 0] + "offsets": [ + 0, + 0 + ] } ] } @@ -338,15 +406,21 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "size", - "params": [2] + "params": [ + 2 + ] }, { "name": "color", - "params": ["rgba(189, 209, 150,1)"] + "params": [ + "rgba(189, 209, 150,1)" + ] } ] } @@ -371,9 +445,26 @@ "key": "hn_kf_hm_pipeline", "source-layer": "hn_kf_hm_pipeline", "type": "line", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { - "line-color": ["match", ["get", "类型"], "ys", "#1b76ff", "ws", "#ff4c61", "hs", "#EAA333", "#000000"], + "line-color": [ + "match", + [ + "get", + "类型" + ], + "ys", + "#1b76ff", + "ws", + "#ff4c61", + "hs", + "#EAA333", + "#000000" + ], "line-width": 2 }, "layout": {}, @@ -383,13 +474,119 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "hn_kf_hm_dltb", + "key": "hn_kf_hm_dltb", + "source-layer": "hn_kf_hm_dltb", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "dlmc" + ], + "水浇地", + "#fbe5ab", + "果园", + "#d4a9cb", + "水田", + "#f8d072", + "旱地", + "#ffffc8", + "乔木林地", + "#32963c", + "灌木林地", + "#55b464", + "其他林地", + "#97cfb2", + "其他草地", + "#b7dca0", + "物流仓储用地", + "#f3ae4a", + "商业服务业设施用地", + "#ffc200", + "工业用地", + "#c59a8c", + "采矿用地", + "#c59a8c", + "城镇住宅用地", + "#f06e7d", + "公用设施用地", + "#ffaac8", + "公园与绿地", + "#81c35d", + "广场用地", + "#81c35d", + "机关团体新闻出版用地", + "#ffaac8", + "科教文卫用地", + "#ffaac8", + "高教用地", + "#ffaac8", + "特殊用地", + "#e77844", + "铁路用地", + "#d1cfd6", + "公路用地", + "#d2d8c9", + "城镇村道路用地", + "#d2d8c9", + "交通服务场站用地", + "#c2c1c1", + "农村道路", + "#aaa9a9", + "管道运输用地", + "#e9817b", + "河流水面", + "#a3d6f5", + "坑塘水面", + "#90aacf", + "养殖坑塘", + "#90aacf", + "内陆滩涂", + "#d7ffff", + "沟渠", + "#e68264", + "水工建筑用地", + "#e68264", + "空闲地", + "#e1dce1", + "设施农用地", + "#dcb482", + "裸土地", + "#dcb482", + "水库水面", + "#a3d6f5", + "农村宅基地", + "#f06e7d", + "湖泊水面", + "#a3d6f5", + "#ffffff" + ] + }, + "layout": { + "visibility": "none" + }, + "minzoom": 0, + "maxzoom": 24, + "mType": "mvt", + "columns": "dlmc,st_asText(geometrys) as geometry" + }, + { "id": "city_boundary", "key": "hubei_xiaogan_hm_city_boundary", "source-layer": "hubei_xiaogan_hm_city_boundary", "type": "fill", - "filter": ["in", "name", ""], + "filter": [ + "in", + "name", + "" + ], "paint": { - "fill-color": ["get", "fill_color"] + "fill-color": [ + "get", + "fill_color" + ] }, "layout": {}, "minzoom": 10, @@ -402,9 +599,16 @@ "key": "hubei_xiaogan_hm_psfq", "source-layer": "hubei_xiaogan_hm_psfq", "type": "fill", - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { - "fill-color": ["get", "fill_color"], + "fill-color": [ + "get", + "fill_color" + ], "fill-opacity": 0.4 }, "layout": {}, @@ -418,17 +622,36 @@ "key": "hn_kf_hm_pipeline_point", "source-layer": "hn_kf_hm_pipeline_point", "type": "symbol", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", "text-halo-width": 2 }, "layout": { - "icon-image": ["match", ["get", "类型"], "ys", "ysj", "ws", "wsj", "hs", "hsj", "ysbz"], + "icon-image": [ + "match", + [ + "get", + "类型" + ], + "ys", + "ysj", + "ws", + "wsj", + "hs", + "hsj", + "ysbz" + ], "icon-size": 0.5, "text-field": "{管线点号}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 13, "text-line-height": 3, "text-anchor": "top" @@ -444,7 +667,11 @@ "type": "symbol", "minzoom": 0, "maxzoom": 24, - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", @@ -453,7 +680,10 @@ "layout": { "icon-image": [ "match", - ["get", "type"], + [ + "get", + "type" + ], "YSBZ", "rainBengZhan_icon", "WSBZ", @@ -483,85 +713,192 @@ "icon-anchor": "center", "icon-size": 0.8, "text-field": "{name}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 15, "text-line-height": 3, "text-anchor": "bottom", "text-max-width": 50, - "text-offset": [0, 3] + "text-offset": [ + 0, + 3 + ] }, "mType": "geojson" } ], "orders": [ - ["newfiber-XYZLayer"], - ["hubei_xiaogan_hm_psfq"], - ["city_boundary"], - ["all_boundary"], - ["pipeline_info"], - ["pipeline_point"], - ["poi_label"], - ["place_label_city"], - ["road_major_label"], - ["place_label_other"], - ["point"] + [ + "newfiber-XYZLayer" + ], + [ + "hubei_xiaogan_hm_psfq" + ], + [ + "city_boundary" + ], + [ + "all_boundary" + ], + [ + "pipeline_info" + ], + [ + "pipeline_point" + ], + [ + "poi_label" + ], + [ + "place_label_city" + ], + [ + "road_major_label" + ], + [ + "place_label_other" + ], + [ + "point" + ] ], "filter": { "wsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ws"], ["ws"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ws" + ], + [ + "ws" + ] + ] }, "hsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["hs"], ["hs"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "hs" + ], + [ + "hs" + ] + ] }, "ysLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ys"], ["ys"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ys" + ], + [ + "ys" + ] + ] }, "YSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["YS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "YS" + ] + ] }, "WSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["WS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "WS" + ] + ] }, "oldCity": { - "layerName": ["city_boundary"], - "filter": [["老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "老城区" + ] + ], "easeTo": { - "center": [113.933, 30.926], + "center": [ + 113.933, + 30.926 + ], "zoom": 13.6, "pitch": 55 } }, "southCity": { - "layerName": ["city_boundary"], - "filter": [["南城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "南城新区" + ] + ], "easeTo": { - "center": [113.933, 30.886], + "center": [ + 113.933, + 30.886 + ], "zoom": 13.6, "pitch": 55 } }, "newCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区" + ] + ], "easeTo": { - "center": [113.983, 30.896], + "center": [ + 113.983, + 30.896 + ], "zoom": 13.6, "pitch": 55 } }, "allCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区", "南城新区", "老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区", + "南城新区", + "老城区" + ] + ], "easeTo": { - "center": [113.953, 30.906], + "center": [ + 113.953, + 30.906 + ], "zoom": 13.6, "pitch": 55 } } } -} +} \ No newline at end of file diff --git a/src/assets/geojson/kaifeng/oneCenter3.json b/src/assets/geojson/kaifeng/oneCenter3.json index 077ee11..805754c 100644 --- a/src/assets/geojson/kaifeng/oneCenter3.json +++ b/src/assets/geojson/kaifeng/oneCenter3.json @@ -1 +1 @@ -{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.29361882693021,34.766181588327946],[114.39325875654936,34.764991857825031]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.19159943630524,34.908354383426307],[114.34358750805265,34.90746208554912]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file +{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.30598421298961,34.751257846532106],[114.40562414260876,34.75006811602919]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.26493896741621,34.912618309653688],[114.41692703916362,34.911726011776501]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 6397edb..36023f2 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -81,8 +81,8 @@ }, ]); const showTotalArea = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -120,8 +120,8 @@ }); }; const showCenterCity = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -159,8 +159,8 @@ }); }; const showBuiltCity = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -206,8 +206,8 @@ // }); }; const showOneCenterLayer = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'rainAreaLayer', //年经总量控制率 @@ -232,7 +232,7 @@ }, ]); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter', oneCenter); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1, 0, 2); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter2', oneCenter2); newfiberMapbox.map.easeTo({ center: [114.315, 34.852], @@ -255,28 +255,30 @@ // if (!newfiberMap.xdmWms) { // newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ // url: '/geoserver/demo/wms', - // layers: 'demo:hn_kf_hm_dilei', + // layers: 'hn_kf_hm_dltb', // visible: true, // }); // return; // } // let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; // imageryProvider.show = !!!imageryProvider.show; - newfiberMapBoxVectorLayer.addWMSLayer('demo:hn_kf_hm_dilei'); if (wmsVisibility.value) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'visible'); + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'visible'); } else { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } }; onMounted(() => { let mapboxTimer = setInterval(() => { if (!newfiberMapbox) return; + if (!newfiberMapbox.map.getLayer('kaifengWaterLabel1')) return; newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter', oneCenter); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1, 0, 2); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter2', oneCenter2); newfiberMapBoxVectorLayer.addLabelAlongLine('oneCenter3', oneCenter3); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel1', 'visibility', 'none'); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel2', 'visibility', 'none'); clearInterval(mapboxTimer); }); newfiberMapbox.map.easeTo({ diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 1f56c8f..8a9f469 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -71,7 +71,12 @@ 'oneCenter2', 'oneCenter2_label', 'oneCenter3', + 'rainAreaLayer', //年经总量控制率 + 'rainAreaLayer_label', ]); + //显示河湖标注 + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel1', 'visibility', 'visible'); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel2', 'visibility', 'visible'); bus.emit('setIniteLayer', [ { layername: 'buildingModel', diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index 961ce31..9393cb4 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -2,9 +2,14 @@ "params": { "basemap": "https://supermap2.wh-nf.cn:8090/bm", "mvt": "https://supermap0.wh-nf.cn:8090/vt", - "sprites": ["/static/libs/mapbox/style/sprite/sprite5"], + "sprites": [ + "/static/libs/mapbox/style/sprite/sprite5" + ], "init": { - "center": [114.315, 34.852], + "center": [ + 114.315, + 34.852 + ], "zoom": 10.4, "pitch": 10, "style": "/static/libs/mapbox/style/customs/whiteMapStyle.json" @@ -29,7 +34,16 @@ "params": { "id": "newfiber-XYZLayer", "url": "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=a603e07a17766447f9e74f14c5454efa", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"], + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], "minZoom": 1, "maxZoom": 19, "tileType": "" @@ -37,7 +51,9 @@ "methods": [ { "name": "addTo", - "params": ["''||map"] + "params": [ + "''||map" + ] }, { "name": "hide", @@ -51,7 +67,16 @@ "params": { "id": "newfiber-WMTSLayer", "url": "https://t{s}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=5095c97223409ac114493d71ecb9cd87", - "subdomains": ["0", "1", "2", "3", "4", "5", "6", "7"] + "subdomains": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ] }, "methods": [] }, @@ -60,7 +85,12 @@ "type": "CanvasLayer", "params": { "id": "newfiber-CanvasLayer", - "bbox": [110.98300209463804, 32.415967161418266, 111.34992583909221, 32.599933881244255], + "bbox": [ + 110.98300209463804, + 32.415967161418266, + 111.34992583909221, + 32.599933881244255 + ], "width": 3000, "height": 1172, "images": "''||Array(16).fill().map((i,idx)=> `https://server1.wh-nf.cn:9000/newfiber-standard/2024/01/06/step${idx+1}.png`)" @@ -91,7 +121,9 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "color", @@ -133,15 +165,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -186,19 +224,28 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(236,223,25,1.0)"] + "params": [ + "rgba(236,223,25,1.0)" + ] }, { "name": "size", - "params": ["size", "''||function(v){return v}"] + "params": [ + "size", + "''||function(v){return v}" + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -222,15 +269,21 @@ "methods": [ { "name": "size", - "params": [3] + "params": [ + 3 + ] }, { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "texture", - "params": ["02"] + "params": [ + "02" + ] }, { "name": "color", @@ -275,19 +328,27 @@ "methods": [ { "name": "shape", - "params": ["circle"] + "params": [ + "circle" + ] }, { "name": "color", - "params": ["rgba(255,0,0,1.0)"] + "params": [ + "rgba(255,0,0,1.0)" + ] }, { "name": "size", - "params": [10] + "params": [ + 10 + ] }, { "name": "animate", - "params": [true] + "params": [ + true + ] }, { "name": "style", @@ -311,17 +372,24 @@ "methods": [ { "name": "shape", - "params": ["map_selected"] + "params": [ + "map_selected" + ] }, { "name": "size", - "params": [30] + "params": [ + 30 + ] }, { "name": "style", "params": [ { - "offsets": [0, 0] + "offsets": [ + 0, + 0 + ] } ] } @@ -338,15 +406,21 @@ "methods": [ { "name": "shape", - "params": ["line"] + "params": [ + "line" + ] }, { "name": "size", - "params": [2] + "params": [ + 2 + ] }, { "name": "color", - "params": ["rgba(189, 209, 150,1)"] + "params": [ + "rgba(189, 209, 150,1)" + ] } ] } @@ -371,9 +445,26 @@ "key": "hn_kf_hm_pipeline", "source-layer": "hn_kf_hm_pipeline", "type": "line", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { - "line-color": ["match", ["get", "类型"], "ys", "#1b76ff", "ws", "#ff4c61", "hs", "#EAA333", "#000000"], + "line-color": [ + "match", + [ + "get", + "类型" + ], + "ys", + "#1b76ff", + "ws", + "#ff4c61", + "hs", + "#EAA333", + "#000000" + ], "line-width": 2 }, "layout": {}, @@ -383,13 +474,119 @@ "columns": "起始点号,连接点号,类型,st_asText(geometrys) as geometry" }, { + "id": "hn_kf_hm_dltb", + "key": "hn_kf_hm_dltb", + "source-layer": "hn_kf_hm_dltb", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "dlmc" + ], + "水浇地", + "#fbe5ab", + "果园", + "#d4a9cb", + "水田", + "#f8d072", + "旱地", + "#ffffc8", + "乔木林地", + "#32963c", + "灌木林地", + "#55b464", + "其他林地", + "#97cfb2", + "其他草地", + "#b7dca0", + "物流仓储用地", + "#f3ae4a", + "商业服务业设施用地", + "#ffc200", + "工业用地", + "#c59a8c", + "采矿用地", + "#c59a8c", + "城镇住宅用地", + "#f06e7d", + "公用设施用地", + "#ffaac8", + "公园与绿地", + "#81c35d", + "广场用地", + "#81c35d", + "机关团体新闻出版用地", + "#ffaac8", + "科教文卫用地", + "#ffaac8", + "高教用地", + "#ffaac8", + "特殊用地", + "#e77844", + "铁路用地", + "#d1cfd6", + "公路用地", + "#d2d8c9", + "城镇村道路用地", + "#d2d8c9", + "交通服务场站用地", + "#c2c1c1", + "农村道路", + "#aaa9a9", + "管道运输用地", + "#e9817b", + "河流水面", + "#a3d6f5", + "坑塘水面", + "#90aacf", + "养殖坑塘", + "#90aacf", + "内陆滩涂", + "#d7ffff", + "沟渠", + "#e68264", + "水工建筑用地", + "#e68264", + "空闲地", + "#e1dce1", + "设施农用地", + "#dcb482", + "裸土地", + "#dcb482", + "水库水面", + "#a3d6f5", + "农村宅基地", + "#f06e7d", + "湖泊水面", + "#a3d6f5", + "#ffffff" + ] + }, + "layout": { + "visibility": "none" + }, + "minzoom": 0, + "maxzoom": 24, + "mType": "mvt", + "columns": "dlmc,st_asText(geometrys) as geometry" + }, + { "id": "city_boundary", "key": "hubei_xiaogan_hm_city_boundary", "source-layer": "hubei_xiaogan_hm_city_boundary", "type": "fill", - "filter": ["in", "name", ""], + "filter": [ + "in", + "name", + "" + ], "paint": { - "fill-color": ["get", "fill_color"] + "fill-color": [ + "get", + "fill_color" + ] }, "layout": {}, "minzoom": 10, @@ -402,9 +599,16 @@ "key": "hubei_xiaogan_hm_psfq", "source-layer": "hubei_xiaogan_hm_psfq", "type": "fill", - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { - "fill-color": ["get", "fill_color"], + "fill-color": [ + "get", + "fill_color" + ], "fill-opacity": 0.4 }, "layout": {}, @@ -418,17 +622,36 @@ "key": "hn_kf_hm_pipeline_point", "source-layer": "hn_kf_hm_pipeline_point", "type": "symbol", - "filter": ["in", "类型", ""], + "filter": [ + "in", + "类型", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", "text-halo-width": 2 }, "layout": { - "icon-image": ["match", ["get", "类型"], "ys", "ysj", "ws", "wsj", "hs", "hsj", "ysbz"], + "icon-image": [ + "match", + [ + "get", + "类型" + ], + "ys", + "ysj", + "ws", + "wsj", + "hs", + "hsj", + "ysbz" + ], "icon-size": 0.5, "text-field": "{管线点号}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 13, "text-line-height": 3, "text-anchor": "top" @@ -444,7 +667,11 @@ "type": "symbol", "minzoom": 0, "maxzoom": 24, - "filter": ["in", "type", ""], + "filter": [ + "in", + "type", + "" + ], "paint": { "text-color": "rgba(255, 255, 255, 1)", "text-halo-color": "rgba(14, 139, 90, 1)", @@ -453,7 +680,10 @@ "layout": { "icon-image": [ "match", - ["get", "type"], + [ + "get", + "type" + ], "YSBZ", "rainBengZhan_icon", "WSBZ", @@ -483,85 +713,192 @@ "icon-anchor": "center", "icon-size": 0.8, "text-field": "{name}", - "text-font": ["KlokanTech Noto Sans Regular"], + "text-font": [ + "KlokanTech Noto Sans Regular" + ], "text-size": 15, "text-line-height": 3, "text-anchor": "bottom", "text-max-width": 50, - "text-offset": [0, 3] + "text-offset": [ + 0, + 3 + ] }, "mType": "geojson" } ], "orders": [ - ["newfiber-XYZLayer"], - ["hubei_xiaogan_hm_psfq"], - ["city_boundary"], - ["all_boundary"], - ["pipeline_info"], - ["pipeline_point"], - ["poi_label"], - ["place_label_city"], - ["road_major_label"], - ["place_label_other"], - ["point"] + [ + "newfiber-XYZLayer" + ], + [ + "hubei_xiaogan_hm_psfq" + ], + [ + "city_boundary" + ], + [ + "all_boundary" + ], + [ + "pipeline_info" + ], + [ + "pipeline_point" + ], + [ + "poi_label" + ], + [ + "place_label_city" + ], + [ + "road_major_label" + ], + [ + "place_label_other" + ], + [ + "point" + ] ], "filter": { "wsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ws"], ["ws"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ws" + ], + [ + "ws" + ] + ] }, "hsLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["hs"], ["hs"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "hs" + ], + [ + "hs" + ] + ] }, "ysLine1": { - "layerName": ["pipeline_info", "pipeline_point"], - "filter": [["ys"], ["ys"]] + "layerName": [ + "pipeline_info", + "pipeline_point" + ], + "filter": [ + [ + "ys" + ], + [ + "ys" + ] + ] }, "YSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["YS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "YS" + ] + ] }, "WSFQ": { - "layerName": ["hubei_xiaogan_hm_psfq"], - "filter": [["WS"]] + "layerName": [ + "hubei_xiaogan_hm_psfq" + ], + "filter": [ + [ + "WS" + ] + ] }, "oldCity": { - "layerName": ["city_boundary"], - "filter": [["老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "老城区" + ] + ], "easeTo": { - "center": [113.933, 30.926], + "center": [ + 113.933, + 30.926 + ], "zoom": 13.6, "pitch": 55 } }, "southCity": { - "layerName": ["city_boundary"], - "filter": [["南城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "南城新区" + ] + ], "easeTo": { - "center": [113.933, 30.886], + "center": [ + 113.933, + 30.886 + ], "zoom": 13.6, "pitch": 55 } }, "newCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区" + ] + ], "easeTo": { - "center": [113.983, 30.896], + "center": [ + 113.983, + 30.896 + ], "zoom": 13.6, "pitch": 55 } }, "allCity": { - "layerName": ["city_boundary"], - "filter": [["东城新区", "南城新区", "老城区"]], + "layerName": [ + "city_boundary" + ], + "filter": [ + [ + "东城新区", + "南城新区", + "老城区" + ] + ], "easeTo": { - "center": [113.953, 30.906], + "center": [ + 113.953, + 30.906 + ], "zoom": 13.6, "pitch": 55 } } } -} +} \ No newline at end of file diff --git a/src/assets/geojson/kaifeng/oneCenter3.json b/src/assets/geojson/kaifeng/oneCenter3.json index 077ee11..805754c 100644 --- a/src/assets/geojson/kaifeng/oneCenter3.json +++ b/src/assets/geojson/kaifeng/oneCenter3.json @@ -1 +1 @@ -{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.29361882693021,34.766181588327946],[114.39325875654936,34.764991857825031]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.19159943630524,34.908354383426307],[114.34358750805265,34.90746208554912]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file +{"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"LineString","coordinates":[[114.29805969598705,34.754426126168617],[114.31739281665942,34.685719189625267]]},"properties":{"FID":0,"name":"开封西湖生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[114.15471779071487,34.786407006877504],[114.17997894357279,34.756210721923082],[114.2237015395549,34.705647175549188]]},"properties":{"FID":1,"name":"运粮河生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":2,"geometry":{"type":"LineString","coordinates":[[114.19125563446792,34.782667451257829],[114.20818867380549,34.782809294127745],[114.27021396178944,34.782450766451532],[114.27354416952861,34.782431516695809],[114.27717544685711,34.782410526653578],[114.27948180118133,34.782397195125682],[114.3111003623076,34.782214428876287],[114.34889492610418,34.781477720754914]]},"properties":{"FID":2,"name":"中部海绵城市重点建设区","fillcolor":"rgba(234, 190, 133,1)"}},{"type":"Feature","id":3,"geometry":{"type":"LineString","coordinates":[[114.42121742336786,34.800088907661028],[114.42149423566457,34.785359119244504],[114.4200070725359,34.707729203929262],[114.42002769286495,34.686172212006902]]},"properties":{"FID":3,"name":"东护城大堤生态廊道","fillcolor":"rgba(62, 57, 33,1)"}},{"type":"Feature","id":4,"geometry":{"type":"LineString","coordinates":[[114.30598421298961,34.751257846532106],[114.40562414260876,34.75006811602919]]},"properties":{"FID":4,"name":"南部卫生防护区","fillcolor":"rgba(49, 139, 178,1)"}},{"type":"Feature","id":5,"geometry":{"type":"LineString","coordinates":[[114.30192632012165,34.866558226068435],[114.36438717152464,34.866855658694192],[114.40842782046153,34.86582151794709]]},"properties":{"FID":5,"name":"北部农田保育区","fillcolor":"rgba(100, 141, 72,1)"}},{"type":"Feature","id":6,"geometry":{"type":"LineString","coordinates":[[114.26493896741621,34.912618309653688],[114.41692703916362,34.911726011776501]]},"properties":{"FID":6,"name":"黄河生态文化带","fillcolor":"rgba(60,112,135,1)"}}]} \ No newline at end of file diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 6397edb..36023f2 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -81,8 +81,8 @@ }, ]); const showTotalArea = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -120,8 +120,8 @@ }); }; const showCenterCity = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -159,8 +159,8 @@ }); }; const showBuiltCity = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'oneCenter', @@ -206,8 +206,8 @@ // }); }; const showOneCenterLayer = () => { - if (newfiberMapbox.map.getLayer('demo:hn_kf_hm_dilei')) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + if (newfiberMapbox.map.getLayer('hn_kf_hm_dltb')) { + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } newfiberMapBoxVectorLayer.removeByIds([ 'rainAreaLayer', //年经总量控制率 @@ -232,7 +232,7 @@ }, ]); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter', oneCenter); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1, 0, 2); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter2', oneCenter2); newfiberMapbox.map.easeTo({ center: [114.315, 34.852], @@ -255,28 +255,30 @@ // if (!newfiberMap.xdmWms) { // newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ // url: '/geoserver/demo/wms', - // layers: 'demo:hn_kf_hm_dilei', + // layers: 'hn_kf_hm_dltb', // visible: true, // }); // return; // } // let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; // imageryProvider.show = !!!imageryProvider.show; - newfiberMapBoxVectorLayer.addWMSLayer('demo:hn_kf_hm_dilei'); if (wmsVisibility.value) { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'visible'); + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'visible'); } else { - newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); } }; onMounted(() => { let mapboxTimer = setInterval(() => { if (!newfiberMapbox) return; + if (!newfiberMapbox.map.getLayer('kaifengWaterLabel1')) return; newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter', oneCenter); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('oneCenter1', oneCenter1, 0, 2); newfiberMapBoxVectorLayer.addGeojsonPolygon('oneCenter2', oneCenter2); newfiberMapBoxVectorLayer.addLabelAlongLine('oneCenter3', oneCenter3); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel1', 'visibility', 'none'); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel2', 'visibility', 'none'); clearInterval(mapboxTimer); }); newfiberMapbox.map.easeTo({ diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 1f56c8f..8a9f469 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -71,7 +71,12 @@ 'oneCenter2', 'oneCenter2_label', 'oneCenter3', + 'rainAreaLayer', //年经总量控制率 + 'rainAreaLayer_label', ]); + //显示河湖标注 + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel1', 'visibility', 'visible'); + newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel2', 'visibility', 'visible'); bus.emit('setIniteLayer', [ { layername: 'buildingModel', diff --git a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js index 00dd62c..dd7032f 100644 --- a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js +++ b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js @@ -183,7 +183,7 @@ } //添加有标注的geojson面 - static addGeojsonPolygonWithLabel(layerId, geojson, minzoom) { + static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width) { let labelGeojson = this.getGeojsonCenterPoint(geojson); if (!newfiberMapbox.map.getLayer(layerId)) { newfiberMapbox.map.addSource(layerId, { @@ -216,10 +216,8 @@ 'text-field': '{name}', 'text-font': ['KlokanTech Noto Sans Regular'], 'text-size': 16, - 'text-line-height': 3, - 'text-anchor': 'bottom', - 'text-max-width': 50, - 'text-allow-overlap': true, + 'text-line-height': 1, + 'text-max-width': !!text_max_width ? text_max_width : 50, }, }); } @@ -287,11 +285,9 @@ layout: { 'text-field': ['get', 'name'], 'symbol-placement': 'line-center', - 'text-rotation-alignment': 'map', - 'text-offset': [0, 2], + 'text-offset': [0, -0.5], //'text-anchor': 'top', - //'text-padding': 20, - 'text-size': 14, + 'text-size': 15, 'text-allow-overlap': true, }, paint: {