Newer
Older
DH_Apicture / public / static / libs / mapbox / style / xinyang.json
@zhangqy zhangqy 27 days ago 16 KB first commit
{
  "params": {
    "basemap": "https://supermap2.wh-nf.cn:8090/bm",
    "mvt": "https://supermap0.wh-nf.cn:8090/vt",
    "sprites": [
      "/static/libs/mapbox/style/sprite/sprite4"
    ],
    "init": {
      "center": [
        114.1348766974395,
        32.13819159443703
      ],
      "zoom": 13.15,
      "pitch": 55,
      "style": "/static/libs/mapbox/mapbox-street-style.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": 17,
        "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": "hn_xy_hm_water",
      "key": "水系分布",
      "type": "PolygonLayer",
      "show": false,
      "params": {
        "autoFit": false,
        "zIndex": 0
      },
      "methods": [
        {
          "name": "shape",
          "params": [
            "water"
          ]
        },
        {
          "name": "color",
          "params": [
            "#58c3e0"
          ]
        },
        {
          "name": "style",
          "params": [
            {
              "speed":0.1
            }
          ]
        },
        {
          "name": "animate",
          "params": [
            true
          ]
        }
      ]
    },
    {
      "id": "hn_xy_hm_buildings",
      "key": "地形地貌",
      "type": "CityBuildingLayer",
      "show": false,
      "params": {"zIndex": 0},
      "methods": [
        {"name": "size", "params": ["height"]},
        {"name": "color", "params": ["rgba(242,246,250,1.0)"]},
        {
          "name": "animate",
          "params": [{"enable": true}
          ]
        },
        {
          "name": "active",
          "params": [{"color": "#0ff", "mix": 0.5}
          ]
        },
        {
          "name": "style",
          "params": [
            {
              "opacity": 0.7,
              "baseColor": "rgb(16, 16, 16)",
              "windowColor": "rgb(30, 60, 89)",
              "brightColor": "rgb(255, 176, 38)",
              "sweep": {
                "enable": true,
                "sweepRadius": 2,
                "sweepColor": "#1990FF",
                "sweepSpeed": 0.5,
                "sweepCenter": [114.11585273555961,32.144064990289394]
              }
            }
          ]
        }
      ],
      "columns": "height"
    },
    {
      "id": "hn_xy_hm_boundary",
      "key": "建成区",
      "type": "LineLayer",
      "show": false,
      "params": {"zIndex": 0},
      "methods": [
        {"name": "shape", "params": ["wall"]},
        {"name": "size", "params": [55]},
        {"name": "style", "params": [{"heightfixed": true, "opacity": 0.6, "sourceColor": "rgba(255,0,0,1)", "targetColor": "rbga(255,255,255, 0.2)"}]}
      ]
    },
    {
      "id": "hn_xy_hm_road",
      "key": "hn_xy_hm_road",
      "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_xy_hm_gw_gx",
      "key": "pipeline_info_flow",
      "type": "LineLayer",
      "show": false,
      "params": {
        "autoFit": false,
        "zIndex": 1
      },
      "methods": [
        {"name": "size", "params": [3]},
        {"name": "shape", "params": ["line"]},
        {"name": "texture", "params": ["02"]},
        {
          "name": "color",
          "params": ["pipe_type", "''||function(v){\n        let key = [\"雨水\", \"污水\", \"合流\"];\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"}]}
      ],
      "columns": "pipe_type"
    },
    {
      "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": ["pipe_type", "''||function(v){\n        let key = [\"雨水\", \"污水\", \"合流\"];\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": [
            "wall"
          ]
        },
        {
          "name": "size",
          "params": [
            55
          ]
        },
        {
          "name": "style",
          "params": [
            {
              "heightfixed": true,
              "opacity": 0.6,
              "sourceColor": "rgba(255,0,0,1)",
              "targetColor": "rbga(255,255,255, 0)"
            }
          ]
        }
      ]
    }
  ],
  "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_xy_hm_gw_gx",
      "source-layer": "hn_xy_hm_gw_gx",
      "type": "line",
      "filter": ["in", "layer",""],
      "paint": {
        "line-color": [
          "match",
          ["get", "pipe_type"],
          "雨水", "#184375",
          "污水", "#E6061A",
          "合流", "#ccff12",
          "#000000"
        ],
        "line-width": [
          "match",
          [
            "get",
            "area_type"
          ],
          1, 8,
          2, 6,
          3, 4,
          4, 2,
          2
        ]
      },
      "layout": {},
      "minzoom": 0,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "start_codi,end_coding,pipe_type,area_type,layer,st_asText(geometrys) as geometry"
    },
    {
      "id": "pipeline_point",
      "key": "hn_xy_hm_gw_gd",
      "source-layer": "hn_xy_hm_gw_gd",
      "type": "symbol",
      "filter": ["in", "layer", ""],
      "paint": {"text-color": "#333"},
      "layout": {
        "icon-image": [
          "match",
          ["get", "inspecti_2"],
          "雨水井", "ysj",
          "污水井", "wsj",
          "合流井", "hsj",
          "ysbz"
        ],
        "icon-size": 0.7,
        "text-field": "{inspecti_1}",
        "text-font": [
          "KlokanTech Noto Sans Regular"
        ],
        "text-size": 13,
        "text-line-height": 3,
        "text-anchor": "top"
      },
      "minzoom": 16,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "well_id,layer,inspecti_1,inspecti_2,st_asText(geometrys) as geometry"
    },
    {
      "id": "hn_xy_hm_gw_bz",
      "key": "hn_xy_hm_gw_bz",
      "source-layer": "hn_xy_hm_gw_bz",
      "filter": ["in", "layer", ""],
      "type": "symbol",
      "paint": {"text-color": "#333"},
      "layout": {
        "icon-image": "ysbz",
        "icon-size": 0.7,
        "text-field": "{rainwate_1}",
        "text-font": [
          "KlokanTech Noto Sans Regular"
        ],
        "text-size": 13,
        "text-line-height": 3,
        "text-anchor": "top"
      },
      "minzoom": 16,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "rainwate_1,layer,st_asText(geometrys) as geometry"
    },
    {
      "id": "hn_xy_hm_gw_pk",
      "key": "hn_xy_hm_gw_pk",
      "source-layer": "hn_xy_hm_gw_pk",
      "filter": ["in", "layer", ""],
      "type": "symbol",
      "paint": {"text-color": "#333"},
      "layout": {
        "icon-image": "paiKous",
        "icon-size": 0.7,
        "text-field": "{outlet_num}",
        "text-font": [
          "KlokanTech Noto Sans Regular"
        ],
        "text-size": 13,
        "text-line-height": 3,
        "text-anchor": "top"
      },
      "minzoom": 16,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "outlet_num,layer,st_asText(geometrys) as geometry"
    },
    {
      "id": "hn_xy_hm_psfq",
      "key": "hn_xy_hm_psfq",
      "source-layer": "hn_xy_hm_psfq",
      "type": "fill",
      "filter": [
        "in",
        "type",
        ""
      ],
      "paint": {
        "fill-color": ["get", "fill_color"],
        "fill-outline-color": ["get", "border_color"]
      },
      "layout": {},
      "minzoom": 10,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "type,name,border_color,fill_color,st_asText(geometrys) as geometry"
    },
    {
      "id": "行政分区",
      "key": "hn_xy_hm_xzqh",
      "source-layer": "hn_xy_hm_xzqh",
      "type": "fill",
      "paint": {
        "fill-color": ["get", "fill_color"],
        "fill-outline-color": ["get", "border_color"]
      },
      "layout": {
        "visibility": "none"
      },
      "minzoom": 10,
      "maxzoom": 24,
      "mType": "mvt",
      "columns": "type,name,border_color,fill_color,st_asText(geometrys) as geometry"
    },
    {
      "id": "point",
      "key": "point",
      "type": "symbol",
      "minzoom": 0,
      "maxzoom": 24,
      "filter": [
        "in",
        "type",
        ""
      ],
      "paint": {
        "text-color": "#333"
      },
      "layout": {
        "icon-image": [
          "match",
          [
            "get",
            "type"
          ],
          "warning_monitor",
          "warning_monitor",
          "success_monitor",
          "success_monitor",
          "error_monitor",
          "error_monitor",
          "paiKou",
          "paiKou",
          "YSBZ",
          "paiLaoBeng",
          "drainOutlet",
          "YLK",
          "WSBZ",
          "wsBeng",
          "WSCLC",
          "WSC",
          "orinign",
          "orinign",
          "rainStation",
          "rain",
          "pipeSupervise",
          "rainSupervises",
          "PKsupervise",
          "YQGXMX s",
          "waterlog",
          "yiLao",
          "riverLake",
          "KDJZWMX s",
          "waterSectionInfo",
          "yuanTous",
          "ysbz"
        ],
        "icon-allow-overlap": true,
        "icon-anchor": "center",
        "icon-size": 0.8,
        "text-allow-overlap": true,
        "text-field": "{name}",
        "text-font": [
          "KlokanTech Noto Sans Regular"
        ],
        "text-size": 16,
        "text-line-height": 3,
        "text-anchor": "bottom",
        "text-max-width": 50,
        "text-offset": [
          0,
          -1
        ]
      },
      "mType": "mvt"
    }
  ],
  "orders": [
    ["point"],
    ["all_boundary"],
    ["pipeline_info"],
    ["pipeline_point"],
    ["hn_xy_hm_gw_pk"],
    ["hn_xy_hm_psfq"],
    ["行政分区"],
    ["poi_label"],
    ["place_label_city"],
    ["road_major_label"],
    ["place_label_other"]
  ],
  "filter": {
    "污水管": {
      "layerName": ["pipeline_info", "pipeline_point","hn_xy_hm_gw_bz"],
      "filter": [["WSLINE", "HSLINE"], ["WSLINE", "HSLINE"],["WSLINE", "HSLINE"]]
    },
    "雨水管": {
      "layerName": ["pipeline_info", "pipeline_point","hn_xy_hm_gw_bz"],
      "filter": [["YSLINE"], ["YSLINE"],["YSLINE"]]
    },
    "合流管": {
      "layerName": ["pipeline_info", "pipeline_point","hn_xy_hm_gw_bz"],
      "filter": [[ "HSLINE"], ["HSLINE"],[ "HSLINE"]]
    },
    "排口": {
      "layerName": ["hn_xy_hm_gw_pk"],
      "filter": [[ "YSLINE","WSLINE","HSLINE"]]
    },
    "雨水分区": {
      "layerName": ["hn_xy_hm_psfq"],
      "filter": [[ "ys"]]
    },
    "污水分区": {
      "layerName": ["hn_xy_hm_psfq"],
      "filter": [[ "ws"]]
    }
  }
}