Newer
Older
HuangJiPC / src / utils / gis / config.js
@zhangdeliang zhangdeliang on 21 Jun 39 KB update
// 地图访问令牌
export const accessToken = 'pk.eyJ1IjoibHVrYXNtYXJ0aW5lbGxpIiwiYSI6ImNpem85dmhwazAyajIyd284dGxhN2VxYnYifQ.HQCmyhEXZUTz3S98FMrVAQ';

// 地图图层样式
export const mapStyle = {
  'light-v10': 'mapbox://styles/mapbox/light-v10',
  'dark-v10': 'mapbox://styles/mapbox/dark-v10',
  'streets-v11': 'mapbox://styles/mapbox/streets-v11',
  'streets-v11?optimize=true': 'mapbox://styles/mapbox/streets-v11?optimize=true',
  'outdoors-v11': 'mapbox://styles/mapbox/outdoors-v11',
  'satellite-v9': 'mapbox://styles/mapbox/satellite-v9',
  'satellite-streets-v10': 'mapbox://styles/mapbox/satellite-streets-v10',
  'navigation-preview-day-v2': 'mapbox://styles/mapbox/navigation-preview-day-v2',
  'navigation-preview-night-v2': 'mapbox://styles/mapbox/navigation-preview-night-v2',
  'navigation-guidance-day-v2': 'mapbox://styles/mapbox/navigation-guidance-day-v2',
  'navigation-guidance-night-v2': 'mapbox://styles/mapbox/navigation-guidance-night-v2',
  'traffic-day-v2': 'mapbox://styles/mapbox/traffic-day-v2',
  'traffic-night-v2': 'mapbox://styles/mapbox/traffic-night-v2',
  custom: {
    version: 8,
    name: 'Mapbox Streets',
    sprite: 'mapbox://sprites/mapbox/streets-v8',
    glyphs: 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf',
    sources: {
      'osm-tiles': {
        type: 'raster',
        tiles: ['http://c.tile.openstreetmap.org/{z}/{x}/{y}.png'],
        tileSize: 256,
      },
    },
    layers: [
      {
        id: '123',
        type: 'raster',
        source: 'osm-tiles',
        'source-layer': 'osmtiles',
      },
    ],
  },
  wuhan: {
    zoom: 5,
    version: 8,
    name: 'Positron',
    metadata: {
      'mapbox:autocomposite': false,
      'mapbox:groups': {
        '101da9f13b64a08fa4b6ac1168e89e5f': {
          collapsed: true,
          name: 'Places',
        },
        a14c9607bc7954ba1df7205bf660433f: {
          name: 'Boundaries',
        },
        b6371a3f2f5a9932464fa3867530a2e5: {
          collapsed: true,
          name: 'Transportation',
        },
      },
      'mapbox:type': 'template',
      'openmaptiles:mapbox:owner': 'openmaptiles',
      'openmaptiles:mapbox:source:url': 'mapbox://openmaptiles.4qljc88t',
      'openmaptiles:version': '3.x',
      'maputnik:renderer': 'mbgljs',
    },
    sources: {
      openmaptiles: {
        type: 'vector',
        tiles: [location.origin + `/mapApiUrl/api/tilesets/china_wuhan/{z}/{x}/{y}.pbf`], //mapbox地图图层加载
        // tiles: [`http://192.168.10.33:1234/api/tilesets/china_wuhan/{z}/{x}/{y}.pbf`], //mapbox地图图层加载
        maxzoom: 14,
        minzoom: 0,
      },
    },
    sprite: location.origin + '/mapApiUrl/api/sprites/streets/sprite', //mapbox地图图层加载
    glyphs: location.origin + '/mapApiUrl/api/fonts/{fontstack}/{range}.pbf', //mapbox字体图层加载
    layers: [
      {
        id: 'background',
        type: 'background',
        paint: {
          'background-color': 'rgba(0, 36, 52, 1)',
        },
      },
      {
        id: 'park',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'park',
        filter: ['==', '$type', 'Polygon'],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-color': '#002433',
        },
      },
      {
        id: 'water',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'water',
        filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'brunnel', 'tunnel']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-antialias': true,
          'fill-color': 'rgba(0,81,130, 0.8)',
        },
      },
      {
        id: 'landcover_ice_shelf',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'landcover',
        maxzoom: 8,
        filter: ['all', ['==', '$type', 'Polygon'], ['==', 'subclass', 'ice_shelf']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-color': 'hsl(0, 0%, 98%)',
          'fill-opacity': 0.7,
        },
      },
      {
        id: 'landcover_glacier',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'landcover',
        maxzoom: 8,
        filter: ['all', ['==', '$type', 'Polygon'], ['==', 'subclass', 'glacier']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-color': 'hsl(0, 0%, 98%)',
          'fill-opacity': {
            base: 1,
            stops: [
              [0, 1],
              [8, 0.5],
            ],
          },
        },
      },
      {
        id: 'landuse_residential',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'landuse',
        maxzoom: 16,
        filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'residential']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-color': '#002433',
          'fill-opacity': {
            base: 0.6,
            stops: [
              [8, 0.8],
              [9, 0.6],
            ],
          },
        },
      },
      {
        id: 'landcover_wood',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'landcover',
        minzoom: 10,
        filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'wood']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-color': '#002433',
          'fill-opacity': {
            base: 1,
            stops: [
              [8, 0],
              [12, 1],
            ],
          },
        },
      },
      {
        id: 'waterway',
        type: 'line',
        source: 'openmaptiles',
        'source-layer': 'waterway',
        filter: ['==', '$type', 'LineString'],
        layout: {
          visibility: 'none',
        },
        paint: {
          'line-color': 'rgba(27,222,216, 1)',
        },
      },
      {
        id: 'water_name',
        type: 'symbol',
        source: 'openmaptiles',
        'source-layer': 'water_name',
        //filter: ["==", "$type", "LineString"],
        layout: {
          'symbol-placement': 'line',
          'symbol-spacing': 500,
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Italic'],
          'text-rotation-alignment': 'map',
          'text-size': 20,
        },
        paint: {
          'text-color': 'rgb(157,169,177)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242, 243, 240, 1)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'building',
        type: 'fill',
        source: 'openmaptiles',
        'source-layer': 'building',
        minzoom: 12,
        paint: {
          'fill-antialias': true,
          'fill-color': 'rgba(59, 59, 59, 1)',
          'fill-outline-color': '#3b3b3b',
        },
      },
      {
        id: 'tunnel_motorway_casing',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']]],
        layout: {
          'line-cap': 'butt',
          'line-join': 'miter',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(213, 213, 213, 0)',
          'line-opacity': 1,
          'line-width': {
            base: 1.4,
            stops: [
              [5.8, 0],
              [6, 3],
              [20, 40],
            ],
          },
        },
      },
      {
        id: 'tunnel_motorway_inner',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']]],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(234, 234, 234, 0)',
          'line-width': {
            base: 1.4,
            stops: [
              [4, 2],
              [6, 1.3],
              [20, 30],
            ],
          },
        },
      },
      {
        id: 'aeroway-taxiway',
        type: 'line',
        metadata: {
          'mapbox:group': '1444849345966.4436',
        },
        source: 'openmaptiles',
        'source-layer': 'aeroway',
        minzoom: 12,
        filter: ['all', ['in', 'class', 'taxiway']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'hsl(0, 0%, 88%)',
          'line-opacity': 1,
          'line-width': {
            base: 1.55,
            stops: [
              [13, 1.8],
              [20, 20],
            ],
          },
        },
      },
      {
        id: 'aeroway-runway-casing',
        type: 'line',
        metadata: {
          'mapbox:group': '1444849345966.4436',
        },
        source: 'openmaptiles',
        'source-layer': 'aeroway',
        minzoom: 11,
        filter: ['all', ['in', 'class', 'runway']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(0, 0, 0, 0)',
          'line-opacity': 1,
          'line-width': {
            base: 1.5,
            stops: [
              [11, 6],
              [17, 55],
            ],
          },
        },
      },
      {
        id: 'aeroway-area',
        type: 'fill',
        metadata: {
          'mapbox:group': '1444849345966.4436',
        },
        source: 'openmaptiles',
        'source-layer': 'aeroway',
        minzoom: 4,
        filter: ['all', ['==', '$type', 'Polygon'], ['in', 'class', 'runway', 'taxiway']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-color': 'rgba(8, 8, 6, 1)',
          'fill-opacity': {
            base: 1,
            stops: [
              [13, 0],
              [14, 1],
            ],
          },
        },
      },
      {
        id: 'aeroway-runway',
        type: 'line',
        metadata: {
          'mapbox:group': '1444849345966.4436',
        },
        source: 'openmaptiles',
        'source-layer': 'aeroway',
        minzoom: 11,
        filter: ['all', ['in', 'class', 'runway'], ['==', '$type', 'LineString']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(8, 8, 6, 1)',
          'line-opacity': 1,
          'line-width': {
            base: 1.5,
            stops: [
              [11, 4],
              [17, 50],
            ],
          },
        },
      },
      {
        id: 'road_area_pier',
        type: 'fill',
        metadata: {},
        source: 'openmaptiles',
        'source-layer': 'transportation',
        filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'pier']],
        layout: {
          visibility: 'visible',
        },
        paint: {
          'fill-antialias': true,
          'fill-color': 'rgb(242,243,240)',
        },
      },
      {
        id: 'road_pier',
        type: 'line',
        metadata: {},
        source: 'openmaptiles',
        'source-layer': 'transportation',
        filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'pier']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
        },
        paint: {
          'line-color': 'rgb(242,243,240)',
          'line-width': {
            base: 1.2,
            stops: [
              [15, 1],
              [17, 4],
            ],
          },
        },
      },
      {
        id: 'highway_path',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'path']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#080805',
          'line-opacity': 0.9,
          'line-width': {
            base: 1.2,
            stops: [
              [13, 1],
              [20, 10],
            ],
          },
        },
      },
      {
        id: 'highway_minor',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 8,
        filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'minor', 'service', 'track']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(8, 8, 6, 1)',
          'line-opacity': 0.9,
          'line-width': {
            base: 1.55,
            stops: [
              [13, 1.8],
              [20, 20],
            ],
          },
        },
      },
      {
        id: 'highway_major_casing',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 11,
        filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk']],
        layout: {
          'line-cap': 'butt',
          'line-join': 'miter',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(8,8,6,0)',
          'line-dasharray': [12, 0],
          'line-width': {
            base: 1.3,
            stops: [
              [10, 3],
              [20, 23],
            ],
          },
        },
      },
      {
        id: 'highway_major_inner',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 11,
        filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-width': {
            base: 1.3,
            stops: [
              [10, 2],
              [20, 20],
            ],
          },
          'line-color': 'rgba(8, 8, 6, 0.7)',
        },
      },
      {
        id: 'highway_major_subtle',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        maxzoom: 11,
        filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'rgba(8, 8, 6, 1)',
          'line-width': 2,
        },
      },
      {
        id: 'highway_motorway_casing',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['==', 'class', 'motorway']]],
        layout: {
          'line-cap': 'butt',
          'line-join': 'miter',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#080806',
          'line-dasharray': [2, 0],
          'line-opacity': 1,
          'line-width': {
            base: 1.4,
            stops: [
              [5.8, 0],
              [6, 3],
              [20, 40],
            ],
          },
        },
      },
      {
        id: 'highway_motorway_inner',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['==', 'class', 'motorway']]],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': {
            base: 1,
            stops: [
              [5.8, '#080806'],
              [6, '#080806'],
            ],
          },
          'line-width': {
            base: 1.4,
            stops: [
              [4, 2],
              [6, 1.3],
              [20, 30],
            ],
          },
        },
      },
      {
        id: 'highway_motorway_subtle',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        maxzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'motorway']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': 'hsla(0, 0%, 85%, 0.53)',
          'line-width': {
            base: 1.4,
            stops: [
              [4, 2],
              [6, 1.3],
            ],
          },
        },
      },
      {
        id: 'railway_transit',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 16,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']]],
        layout: {
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#dddddd',
          'line-width': 3,
        },
      },
      {
        id: 'railway_transit_dashline',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 16,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']]],
        layout: {
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#fafafa',
          'line-dasharray': [3, 3],
          'line-width': 2,
        },
      },
      {
        id: 'railway_service',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 16,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'class', 'rail'], ['has', 'service']]],
        layout: {
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#dddddd',
          'line-width': 3,
        },
      },
      {
        id: 'railway_service_dashline',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 16,
        filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'rail'], ['has', 'service']],
        layout: {
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#fafafa',
          'line-dasharray': [3, 3],
          'line-width': 2,
        },
      },
      {
        id: 'railway',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 13,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['!has', 'service'], ['==', 'class', 'rail']]],
        layout: {
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#080806',
          'line-width': {
            base: 1.3,
            stops: [
              [16, 3],
              [20, 7],
            ],
          },
        },
      },
      {
        id: 'railway_dashline',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 13,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['!has', 'service'], ['==', 'class', 'rail']]],
        layout: {
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#080806',
          'line-dasharray': [3, 3],
          'line-width': {
            base: 1.3,
            stops: [
              [16, 2],
              [20, 6],
            ],
          },
        },
      },
      {
        id: 'highway_motorway_bridge_casing',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']]],
        layout: {
          'line-cap': 'butt',
          'line-join': 'miter',
          visibility: 'visible',
        },
        paint: {
          'line-color': '#080806',
          'line-dasharray': [2, 0],
          'line-opacity': 1,
          'line-width': {
            base: 1.4,
            stops: [
              [5.8, 0],
              [6, 5],
              [20, 45],
            ],
          },
        },
      },
      {
        id: 'highway_motorway_bridge_inner',
        type: 'line',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation',
        minzoom: 6,
        filter: ['all', ['==', '$type', 'LineString'], ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']]],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-color': {
            base: 1,
            stops: [
              [5.8, 'rgba(8, 8, 6, 0.51)'],
              [6, '#080806'],
            ],
          },
          'line-width': {
            base: 1.4,
            stops: [
              [4, 2],
              [6, 1.3],
              [20, 30],
            ],
          },
        },
      },
      {
        id: 'highway_name_other',
        type: 'symbol',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation_name',
        filter: ['all', ['!=', 'class', 'motorway'], ['==', '$type', 'LineString']],
        layout: {
          'symbol-placement': 'line',
          'symbol-spacing': 350,
          'text-field': '{name:latin} {name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-max-angle': 30,
          'text-pitch-alignment': 'viewport',
          'text-rotation-alignment': 'map',
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': '#bbb',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(255, 255, 255, 0)',
          'text-halo-width': 2,
          'text-translate': [0, 0],
          'text-translate-anchor': 'map',
          'icon-translate-anchor': 'map',
        },
      },
      {
        id: 'highway_name_motorway',
        type: 'symbol',
        metadata: {
          'mapbox:group': 'b6371a3f2f5a9932464fa3867530a2e5',
        },
        source: 'openmaptiles',
        'source-layer': 'transportation_name',
        filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'motorway']],
        layout: {
          'symbol-placement': 'line',
          'symbol-spacing': 350,
          'text-field': '{ref}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-pitch-alignment': 'viewport',
          'text-rotation-alignment': 'viewport',
          'text-size': 10,
          visibility: 'visible',
        },
        paint: {
          'text-color': 'rgba(208, 215, 228, 1)',
          'text-halo-blur': 0,
          'text-halo-color': 'hsl(0, 0%, 100%)',
          'text-halo-width': 0,
          'text-translate': [0, 2],
        },
      },
      {
        id: 'boundary_state',
        type: 'line',
        metadata: {
          'mapbox:group': 'a14c9607bc7954ba1df7205bf660433f',
        },
        source: 'openmaptiles',
        'source-layer': 'boundary',
        filter: ['==', 'admin_level', 4],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
          visibility: 'visible',
        },
        paint: {
          'line-blur': 0.4,
          'line-color': 'rgb(230, 204, 207)',
          'line-dasharray': [2, 2],
          'line-opacity': 1,
          'line-width': {
            base: 1.3,
            stops: [
              [3, 1],
              [22, 15],
            ],
          },
        },
      },
      {
        id: 'boundary_country_z0-4',
        type: 'line',
        metadata: {
          'mapbox:group': 'a14c9607bc7954ba1df7205bf660433f',
        },
        source: 'openmaptiles',
        'source-layer': 'boundary',
        maxzoom: 5,
        filter: ['all', ['==', 'admin_level', 2], ['!has', 'claimed_by']],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
        },
        paint: {
          'line-blur': {
            base: 1,
            stops: [
              [0, 0.4],
              [22, 4],
            ],
          },
          'line-color': 'rgb(230, 204, 207)',
          'line-opacity': 1,
          'line-width': {
            base: 1.1,
            stops: [
              [3, 1],
              [22, 20],
            ],
          },
        },
      },
      {
        id: 'boundary_country_z5-',
        type: 'line',
        metadata: {
          'mapbox:group': 'a14c9607bc7954ba1df7205bf660433f',
        },
        source: 'openmaptiles',
        'source-layer': 'boundary',
        minzoom: 5,
        filter: ['==', 'admin_level', 2],
        layout: {
          'line-cap': 'round',
          'line-join': 'round',
        },
        paint: {
          'line-blur': {
            base: 1,
            stops: [
              [0, 0.4],
              [22, 4],
            ],
          },
          'line-color': 'rgb(230, 204, 207)',
          'line-opacity': 1,
          'line-width': {
            base: 1.1,
            stops: [
              [3, 1],
              [22, 20],
            ],
          },
        },
      },
      {
        id: 'place_other',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 14,
        filter: ['all', ['in', 'class', 'continent', 'hamlet', 'neighbourhood', 'isolated_dwelling'], ['==', '$type', 'Point']],
        layout: {
          'text-anchor': 'center',
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'center',
          'text-offset': [0.5, 0],
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': 'rgb(117, 129, 145)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242, 243, 240, 0)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_suburb',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 15,
        filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'suburb']],
        layout: {
          'text-anchor': 'center',
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'center',
          'text-offset': [0.5, 0],
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': 'rgb(117, 129, 145)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242, 243, 240, 0)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_village',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 14,
        filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'village']],
        layout: {
          'icon-size': 0.4,
          'text-anchor': 'left',
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'left',
          'text-offset': [0.5, 0.2],
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'icon-opacity': 0.7,
          'text-color': 'rgb(117, 129, 145)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242, 243, 240, 0)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_town',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 15,
        filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'town']],
        layout: {
          'icon-image': {
            base: 1,
            stops: [
              [0, 'circle-11'],
              [8, ''],
            ],
          },
          'icon-size': 0.4,
          'text-anchor': {
            base: 1,
            stops: [
              [0, 'left'],
              [8, 'center'],
            ],
          },
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'left',
          'text-offset': [0.5, 0.2],
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'icon-opacity': 0.7,
          'text-color': 'rgba(171, 187, 211, 1)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242, 243, 240, 0)',
          'text-halo-width': 1,
          'text-translate-anchor': 'map',
        },
      },
      {
        id: 'place_city',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 14,
        filter: ['all', ['==', '$type', 'Point'], ['all', ['!=', 'capital', 2], ['==', 'class', 'city'], ['>', 'rank', 3]]],
        layout: {
          'icon-image': {
            base: 1,
            stops: [
              [0, 'circle-11'],
              [8, ''],
            ],
          },
          'icon-size': 0.4,
          'text-anchor': {
            base: 1,
            stops: [
              [0, 'left'],
              [8, 'center'],
            ],
          },
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'left',
          'text-offset': [0.5, 0.2],
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'icon-opacity': 0.7,
          'text-color': 'rgb(117, 129, 145)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242, 243, 240, 0)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_capital',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 12,
        filter: ['all', ['==', '$type', 'Point'], ['all', ['==', 'capital', 2], ['==', 'class', 'city']]],
        layout: {
          'icon-image': {
            base: 1,
            stops: [
              [0, 'star-11'],
              [8, ''],
            ],
          },
          'icon-size': 1,
          'text-anchor': {
            base: 1,
            stops: [
              [0, 'left'],
              [8, 'center'],
            ],
          },
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'left',
          'text-offset': [0.5, 0.2],
          'text-size': 14,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'icon-opacity': 0.7,
          'text-color': 'rgb(117, 129, 145)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgb(242,243,240)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_city_large',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 12,
        filter: ['all', ['==', '$type', 'Point'], ['all', ['!=', 'capital', 2], ['<=', 'rank', 3], ['==', 'class', 'city']]],
        layout: {
          'icon-image': {
            base: 1,
            stops: [
              [0, 'circle-11'],
              [8, ''],
            ],
          },
          'icon-size': 0.4,
          'text-anchor': {
            base: 1,
            stops: [
              [0, 'left'],
              [8, 'center'],
            ],
          },
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-justify': 'left',
          'text-offset': [0.5, 0.2],
          'text-size': 14,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'icon-opacity': 0.7,
          'text-color': 'rgb(117, 129, 145)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgba(242,243,240,0)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_state',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 12,
        filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'state']],
        layout: {
          'text-field': '{name:latin}\n{name:nonlatin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-size': 10,
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': 'rgb(113, 129, 144)',
          'text-halo-blur': 1,
          'text-halo-color': 'rgb(242,243,240)',
          'text-halo-width': 1,
        },
      },
      {
        id: 'place_country_other',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 8,
        filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'country'], ['!has', 'iso_a2']],
        layout: {
          'text-field': '{name:latin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Italic'],
          'text-size': {
            base: 1,
            stops: [
              [0, 9],
              [6, 11],
            ],
          },
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': {
            base: 1,
            stops: [
              [3, 'rgb(157,169,177)'],
              [4, 'rgb(153, 153, 153)'],
            ],
          },
          'text-halo-color': 'rgba(236,236,234,0.7)',
          'text-halo-width': 1.4,
        },
      },
      {
        id: 'place_country_minor',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 8,
        filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'country'], ['>=', 'rank', 2], ['has', 'iso_a2']],
        layout: {
          'text-field': '{name:latin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-size': {
            base: 1,
            stops: [
              [0, 10],
              [6, 12],
            ],
          },
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': {
            base: 1,
            stops: [
              [3, 'rgb(157,169,177)'],
              [4, 'rgb(153, 153, 153)'],
            ],
          },
          'text-halo-color': 'rgba(236,236,234,0.7)',
          'text-halo-width': 1.4,
        },
      },
      {
        id: 'place_country_major',
        type: 'symbol',
        metadata: {
          'mapbox:group': '101da9f13b64a08fa4b6ac1168e89e5f',
        },
        source: 'openmaptiles',
        'source-layer': 'place',
        maxzoom: 6,
        filter: ['all', ['==', '$type', 'Point'], ['<=', 'rank', 1], ['==', 'class', 'country'], ['has', 'iso_a2']],
        layout: {
          'text-anchor': 'center',
          'text-field': '{name:latin}',
          'text-font': ['Open Sans Regular', 'Noto Sans Regular'],
          'text-size': {
            base: 1.4,
            stops: [
              [0, 10],
              [3, 12],
              [4, 14],
            ],
          },
          'text-transform': 'uppercase',
          visibility: 'visible',
        },
        paint: {
          'text-color': {
            base: 1,
            stops: [
              [3, 'rgb(157,169,177)'],
              [4, 'rgb(153, 153, 153)'],
            ],
          },
          'text-halo-color': 'rgba(236,236,234,0.7)',
          'text-halo-width': 1.4,
        },
      },
    ],
    id: 'positron',
  },
};

// 地图中心经纬度
export const mapCerter = [114.247596, 30.603828];

// 地图层级
export const mapZoom = 11.5;

// 地图初始化时的方位角(旋转角度),以正北方的逆时针转动度数计量
export const mapBearing = 0;

// 地图初始化时的倾角,按偏离屏幕水平面的度数计量(0-60)
export const mapPitch = 0;

export const icons = [
  {
    key: '闸门',
    url: '/static/img/ZhaZhan.png',
  },
  {
    key: '泵站',
    url: '/static/img/BengZhan.png',
  },
  {
    key: '调蓄池',
    url: '/static/img/ChuLiSheShi.png',
  },
  {
    key: '处理设施',
    url: '/static/img/ChuLiSheShi.png',
  },
  {
    key: '流量监测站',
    url: '/static/img/JianCe_LiuLiang.png',
  },
  {
    key: '液位监测站',
    url: '/static/img/JianCe_YeWei.png',
  },
  {
    key: '雨量监测站',
    url: '/static/img/JianCe_YuLiang.png',
  },
  {
    key: '水质监测站',
    url: '/static/img/JianCe_ShuiZhi.png',
  },
];