Newer
Older
KaiFengPC / public / static / libs / mapbox / style / HaiMianScreen.json
@zhangdeliang zhangdeliang on 3 Sep 16 KB update
{
  "params": {
    "basemap": "https://supermap2.wh-nf.cn:8090/bm",
    "mvt": "https://supermap0.wh-nf.cn:8090/vt",
    "sprites": ["/static/libs/mapbox/style/sprite/sprite5"],
    "init": {
      "center": [114.315, 34.852],
      "zoom": 10.4,
      "pitch": 30,
      "style": "/static/libs/mapbox/style/customs/whiteMapStyle.json"
    },
    "l7": {
      "images": [
        {
          "name": "02",
          "url": "https://gw.alipayobjects.com/zos/bmw-prod/ce83fc30-701f-415b-9750-4b146f4b3dd6.svg"
        },
        {
          "name": "map_selected",
          "url": "/static/libs/mapbox/style/sprite/map_selected.png"
        }
      ]
    }
  },
  "ogc": [
    {
      "id": "newfiber-XYZLayer",
      "type": "XYZLayer",
      "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"],
        "minZoom": 1,
        "maxZoom": 19,
        "tileType": ""
      },
      "methods": [
        {
          "name": "addTo",
          "params": ["''||map"]
        },
        {
          "name": "hide",
          "params": []
        }
      ]
    },
    {
      "id": "newfiber-WMTSLayer",
      "type": "WMTSLayer",
      "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"]
      },
      "methods": []
    },
    {
      "id": "newfiber-CanvasLayer",
      "type": "CanvasLayer",
      "params": {
        "id": "newfiber-CanvasLayer",
        "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`)"
      },
      "methods": []
    },
    {
      "id": "newfiber-WMSLayer",
      "type": "WMSLayer",
      "params": {
        "id": "newfiber-WMSLayer",
        "url": "http://server1.wh-nf.cn:8023/geoserver/xiaoganMapServer/wms",
        "layers": "xiaoganMapServer:GKFQ1"
      },
      "methods": []
    }
  ],
  "l7": [
    {
      "id": "hubei_xiaogan_roads",
      "key": "hubei_xiaogan_roads",
      "type": "LineLayer",
      "show": false,
      "params": {
        "autoFit": false,
        "zIndex": 10
      },
      "methods": [
        {
          "name": "shape",
          "params": ["line"]
        },
        {
          "name": "color",
          "params": [
            "fclass",
            "''||function(v){\n        let key = [\"trunk\", \"footway\", \"secondary\", \"trunk_link\", \"tertiary\", \"secondary_link\", \"tertiary_link\", \"living_street\", \"pedestrian\", \"primary\", \"residential\", \"track\", \"primary_link\", \"motorway_link\", \"motorway\", \"service\", \"unclassified\", \"path\"];\n        let colors = ['#F9D371', '#3DB2FF', '#6E85B2', '#F47340', '#F6A9A9', '#EF2F88', '#5F7A61', '#1ee3cf', '#C2F784', '#FFF89A', 'rgba(22, 119, 255, .5)', '#93FFD8', '#BAFFB4', '#D3DEDC', '#AEFEFF', '#9B0000', '#F5F5F5', '#08ffc8', '#FFE3E3'];\n        return colors[key.indexOf(v)];\n      }"
          ]
        },
        {
          "name": "style",
          "params": [
            {
              "watercolor": "#6D99A8"
            }
          ]
        },
        {
          "name": "animate",
          "params": [
            {
              "interval": 1,
              "duration": 1,
              "trailLength": 2
            }
          ]
        }
      ],
      "columns": "fclass"
    },
    {
      "id": "hn_kf_hm_pipeline",
      "key": "pipeline_info_flow",
      "type": "LineLayer",
      "show": false,
      "params": {
        "autoFit": false,
        "zIndex": 1
      },
      "methods": [
        {
          "name": "size",
          "params": [4]
        },
        {
          "name": "shape",
          "params": ["line"]
        },
        {
          "name": "texture",
          "params": ["02"]
        },
        {
          "name": "color",
          "params": [
            "类型",
            "''||function(v){\n        let key = [\"ys\", \"ws\", \"hs\"];\n        let colors = ['#184375', '#E6061A', '#ff80ec'];\n        return colors[key.indexOf(v)];\n      }"
          ]
        },
        {
          "name": "animate",
          "params": [
            {
              "interval": 1,
              "duration": 1,
              "trailLength": 2
            }
          ]
        },
        {
          "name": "style",
          "params": [
            {
              "opacity": 0.6,
              "lineTexture": true,
              "iconStep": 10,
              "borderWidth": 0.4,
              "borderColor": "#fff"
            }
          ]
        }
      ]
    },
    {
      "id": "",
      "key": "warning_monitor",
      "type": "PointLayer",
      "show": true,
      "params": {
        "zIndex": 0,
        "blend": "additive"
      },
      "methods": [
        {
          "name": "shape",
          "params": ["circle"]
        },
        {
          "name": "color",
          "params": ["rgba(236,223,25,1.0)"]
        },
        {
          "name": "size",
          "params": ["size", "''||function(v){return v}"]
        },
        {
          "name": "animate",
          "params": [true]
        },
        {
          "name": "style",
          "params": [
            {
              "unit": "meter"
            }
          ]
        }
      ]
    },
    {
      "id": "",
      "key": "highlight_linestring",
      "type": "LineLayer",
      "show": true,
      "params": {
        "autoFit": false,
        "zIndex": 1
      },
      "methods": [
        {
          "name": "size",
          "params": [3]
        },
        {
          "name": "shape",
          "params": ["line"]
        },
        {
          "name": "texture",
          "params": ["02"]
        },
        {
          "name": "color",
          "params": [
            "layer",
            "''||function(v){\n        let key = [\"ys\", \"ws\", \"hs\"];\n        let colors = ['#184375', '#E6061A', '#ccff12'];\n        return colors[key.indexOf(v)];\n      }"
          ]
        },
        {
          "name": "animate",
          "params": [
            {
              "interval": 1,
              "duration": 1,
              "trailLength": 2
            }
          ]
        },
        {
          "name": "style",
          "params": [
            {
              "opacity": 0.6,
              "lineTexture": true,
              "iconStep": 10,
              "borderWidth": 0.4,
              "borderColor": "#fff"
            }
          ]
        }
      ]
    },
    {
      "id": "",
      "key": "highlight_point1",
      "type": "PointLayer",
      "show": true,
      "params": {
        "zIndex": 0,
        "blend": "additive"
      },
      "methods": [
        {
          "name": "shape",
          "params": ["circle"]
        },
        {
          "name": "color",
          "params": ["rgba(255,0,0,1.0)"]
        },
        {
          "name": "size",
          "params": [10]
        },
        {
          "name": "animate",
          "params": [true]
        },
        {
          "name": "style",
          "params": [
            {
              "unit": "meter"
            }
          ]
        }
      ]
    },
    {
      "id": "",
      "key": "highlight_point",
      "type": "PointLayer",
      "show": true,
      "params": {
        "zIndex": 0,
        "blend": "additive"
      },
      "methods": [
        {
          "name": "shape",
          "params": ["map_selected"]
        },
        {
          "name": "size",
          "params": [30]
        },
        {
          "name": "style",
          "params": [
            {
              "offsets": [0, 0]
            }
          ]
        }
      ]
    },
    {
      "id": "",
      "key": "highlight_polygon",
      "type": "LineLayer",
      "show": true,
      "params": {
        "zIndex": 0
      },
      "methods": [
        {
          "name": "shape",
          "params": ["line"]
        },
        {
          "name": "size",
          "params": [2]
        },
        {
          "name": "color",
          "params": ["rgba(189, 209, 150,1)"]
        }
      ]
    }
  ],
  "mapbox": [
    {
      "id": "all_boundary",
      "key": "all_boundary",
      "source-layer": "all_boundary",
      "type": "line",
      "paint": {
        "line-color": "rgba(255,18,60,1)",
        "line-width": 1
      },
      "layout": {},
      "minzoom": 0,
      "maxzoom": 24,
      "mType": "mvt"
    },
    {
      "id": "pipeline_info",
      "key": "hn_kf_hm_pipeline",
      "source-layer": "hn_kf_hm_pipeline",
      "type": "line",
      "filter": ["in", "类型", ""],
      "paint": {
        "line-color": ["match", ["get", "类型"], "ys", "#1b76ff", "ws", "#ff4c61", "hs", "#ff80ec", "#000000"],
        "line-width": 4
      },
      "layout": {},
      "minzoom": 0,
      "maxzoom": 24,
      "mType": "mvt",
      "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, 1.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",
      "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", ""],
      "paint": {
        "fill-color": ["get", "fill_color"]
      },
      "layout": {},
      "minzoom": 10,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "name,fill_color"
    },
    {
      "id": "hubei_xiaogan_hm_psfq",
      "key": "hubei_xiaogan_hm_psfq",
      "source-layer": "hubei_xiaogan_hm_psfq",
      "type": "fill",
      "filter": ["in", "type", ""],
      "paint": {
        "fill-color": ["get", "fill_color"],
        "fill-opacity": 0.4
      },
      "layout": {},
      "minzoom": 12,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "type,fill_color,st_asText(geometrys) as geometry"
    },
    {
      "id": "pipeline_point",
      "key": "hn_kf_hm_pipeline_point",
      "source-layer": "hn_kf_hm_pipeline_point",
      "type": "symbol",
      "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-size": 0.5,
        "text-field": "{管线点号}",
        "text-font": ["KlokanTech Noto Sans Regular"],
        "text-size": 13,
        "text-line-height": 3,
        "text-anchor": "top"
      },
      "minzoom": 15,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "管线点号,类型,st_asText(geometrys) as geometry"
    },
    {
      "id": "point",
      "key": "point",
      "type": "symbol",
      "minzoom": 0,
      "maxzoom": 24,
      "filter": ["in", "type", ""],
      "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", "type"],
          "YSBZ",
          "rainBengZhan_icon",
          "WSBZ",
          "sewageBenZhan_icon",
          "combineBengZhan",
          "combineBengZhan_icon",
          "sewageFactory",
          "sewageFactory_icon",
          "waterLoging",
          "waterLoging_icon",
          "waterCourse",
          "waterCourse_icon",
          "rainStation",
          "rainStation_icon",
          "origine",
          "origine_icon",
          "spongeFacility",
          "spongeFacility_icon",
          "pipeMonitor",
          "pipeMonitor_icon",
          "waterFactory",
          "waterFactory_icon",
          "ysbz"
        ],
        "text-allow-overlap": true,
        "icon-allow-overlap": true,
        "icon-anchor": "center",
        "icon-size": 0.8,
        "text-field": "{name}",
        "text-font": ["KlokanTech Noto Sans Regular"],
        "text-size": 15,
        "text-line-height": 3,
        "text-anchor": "bottom",
        "text-max-width": 50,
        "text-offset": [0, 3]
      },
      "mType": "geojson"
    }
  ],
  "orders": [
    ["newfiber-XYZLayer"],
    ["hubei_xiaogan_hm_psfq"],
    ["city_boundary"],
    ["all_boundary"],
    ["pipeline_info"],
    ["pipeline_point"],
    ["pipeLineLabel"],
    ["poi_label"],
    ["place_label_city"],
    ["road_major_label"],
    ["place_label_other"],
    ["point"]
  ],
  "filter": {
    "wsLine1": {
      "layerName": ["pipeline_info", "pipeline_point", "pipeLineLabel"],
      "filter": [["ws"], ["ws"], ["ws"]]
    },
    "hsLine1": {
      "layerName": ["pipeline_info", "pipeline_point", "pipeLineLabel"],
      "filter": [["hs"], ["hs"], ["hs"]]
    },
    "ysLine1": {
      "layerName": ["pipeline_info", "pipeline_point", "pipeLineLabel"],
      "filter": [["ys"], ["ys"], ["ys"]]
    },
    "YSFQ": {
      "layerName": ["hubei_xiaogan_hm_psfq"],
      "filter": [["YS"]]
    },
    "WSFQ": {
      "layerName": ["hubei_xiaogan_hm_psfq"],
      "filter": [["WS"]]
    },
    "oldCity": {
      "layerName": ["city_boundary"],
      "filter": [["老城区"]],
      "easeTo": {
        "center": [113.933, 30.926],
        "zoom": 13.6,
        "pitch": 55
      }
    },
    "southCity": {
      "layerName": ["city_boundary"],
      "filter": [["南城新区"]],
      "easeTo": {
        "center": [113.933, 30.886],
        "zoom": 13.6,
        "pitch": 55
      }
    },
    "newCity": {
      "layerName": ["city_boundary"],
      "filter": [["东城新区"]],
      "easeTo": {
        "center": [113.983, 30.896],
        "zoom": 13.6,
        "pitch": 55
      }
    },
    "allCity": {
      "layerName": ["city_boundary"],
      "filter": [["东城新区", "南城新区", "老城区"]],
      "easeTo": {
        "center": [113.953, 30.906],
        "zoom": 13.6,
        "pitch": 55
      }
    }
  }
}