const workSpaceName = 'sz_pg';
const layerGroupName = 'sz_pg_mb';
const mapurl =
  'http://192.168.11.35:8999/geoserver/gwc/service/tms/1.0.0/' +
  workSpaceName +
  ':' +
  layerGroupName +
  '@EPSG:900913@pbf/{z}/{x}/{y}.pbf';
const chinaGroupName = 'sz_pg_china_mb';
const chinaurl =
  'http://192.168.11.35:8999/geoserver/gwc/service/tms/1.0.0/' +
  workSpaceName +
  ':' +
  chinaGroupName +
  '@EPSG:900913@pbf/{z}/{x}/{y}.pbf';

const spriteurl = 'http://192.168.11.35:8089/assets/sprite-th/sprite';
const glyphsurl = 'http://192.168.11.35:8089/assets/fonts/{fontstack}/{range}.pbf';
const iconSize = 0.6;
const normal_style = {
  version: 8,
  sources: {
    os: {
      type: 'vector',
      scheme: 'tms',
      tiles: [mapurl],
      pixelRatio: 2,
    },
    china: {
      type: 'vector',
      scheme: 'tms',
      tiles: [chinaurl],
      pixelRatio: 2,
    },
  },
  sprite: spriteurl,
  //字体.pbf文件获取
  glyphs: glyphsurl,
  layers: [
    {
      id: 'background',
      type: 'background',
      paint: { 'background-color': '#a9dbfe', 'background-opacity': 1 },
    },

    {
      id: 'admin',
      type: 'fill',
      source: 'china',
      'source-layer': chinaGroupName + '_admin',
      minzoom: 3,
      // "maxzoom":8,
      layout: {},
      paint: {
        'fill-color': ['interpolate', ['linear'], ['zoom'], 9, '#fbf9f4', 11, '#f1f2f3'],
      },
    },
    {
      id: 'building-area', //小区面
      type: 'fill',
      source: 'os',
      'source-layer': layerGroupName + '_building_area',
      minzoom: 15,
      layout: { visibility: 'visible' },
      paint: {
        'fill-color': '#000000',
        'fill-opacity': 0.04,
      },
    },
    {
      id: 'park', //公园、绿地、交通绿化、高尔夫球场
      type: 'fill',
      source: 'os',
      'source-layer': layerGroupName + '_bg_area',
      minzoom: 8,
      filter: ['all', ['in', 'type', '31', '33']],
      paint: {
        'fill-color': 'hsl(102, 55%, 83%)',
        'fill-opacity': ['interpolate', ['linear'], ['zoom'], 8, 0, 9, 1],
      },
    },
    {
      id: 'water', //海洋、水系
      type: 'fill',
      source: 'os',
      'source-layer': layerGroupName + '_bg_area',
      minzoom: 8,
      filter: ['==', 'type', '12'],
      layout: { visibility: 'visible' },
      paint: {
        'fill-color': 'hsl(205, 98%, 83%)',
        'fill-opacity': ['interpolate', ['linear'], ['zoom'], 8, 0, 9, 1],
      },
    },
    {
      id: 'railway-case', //铁路边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_bg_line',
      minzoom: 9,
      // "maxzoom": 20,
      filter: ['==', 'type', '92'],
      paint: { 'line-width': 3, 'line-color': '#999999' },
    },
    {
      id: 'railway', //铁路
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_bg_line',
      minzoom: 9,
      // "maxzoom": 20,
      filter: ['==', 'type', '92'],
      paint: {
        'line-width': 2,
        'line-dasharray': [3, 3],
        'line-color': 'hsl(0, 0%, 100%)',
      },
    },
    {
      id: 'level-06-case', //六级道路（辅路）边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 15,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '2', '3', '20']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': 'hsl(0, 0%, 88%)',
        'line-width': ['interpolate', ['linear'], ['zoom'], 15, 0, 16, 4, 20, 16],
      },
    },
    {
      id: 'level-06', //六级道路（辅路）
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 15,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '2', '3', '20']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': 'hsl(45, 0%, 100%)',
        'line-width': ['interpolate', ['linear'], ['zoom'], 15, 0, 16, 3, 20, 12],
      },
    },
    {
      id: 'level-05-case', //五级道路（支路）边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 13,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '4', '8', '9']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': '#e0e0e0',
        'line-width': ['interpolate', ['linear'], ['zoom'], 13, 0, 14, 1, 16, 12, 20, 34],
      },
    },
    {
      id: 'level-05', //五级道路（支路）
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 13,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '4', '8', '9']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': 'hsl(0, 0%, 100%)',
        'line-width': ['interpolate', ['linear'], ['zoom'], 13, 0, 14, 1, 16, 10, 20, 30],
      },
    },
    {
      id: 'level-04-case', //四级道路（县道、次干道）边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 11,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '6', '5', '10']],
      layout: {
        'line-round-limit': 1,
        'line-join': 'round',
        'line-cap': 'round',
      },
      paint: {
        'line-color': '#e0e0e0',
        'line-width': ['interpolate', ['linear'], ['zoom'], 11, 0, 12, 1, 16, 12, 20, 64],
        'line-opacity': 1,
        'line-gap-width': 0,
        'line-offset': 0,
      },
    },
    {
      id: 'level-04', //四级道路（县道、次干道）
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 11,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '6', '5', '10']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': 'hsl(45, 0%, 100%)',
        'line-width': ['interpolate', ['linear'], ['zoom'], 11, 0, 12, 1, 16, 10, 20, 60],
      },
    },
    {
      id: 'level-03-case', //三级道路（省道、主干道）边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 10,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '11']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': '#f1c85f',
        'line-width': ['interpolate', ['linear'], ['zoom'], 10, 0, 11, 1, 16, 12, 20, 64],
      },
    },
    {
      id: 'level-03', //三级道路（省道、主干道）
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 10,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '11']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': 'hsl(45, 94%, 86%)',
        'line-width': ['interpolate', ['linear'], ['zoom'], 10, 0, 11, 1, 16, 10, 20, 60],
      },
    },
    {
      id: 'level-02-case', //二级道路（国道、快速路）边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 9,
      filter: ['all', ['in', 'road_grade', '7', '12']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': '#f0b92d',
        'line-width': ['interpolate', ['linear'], ['zoom'], 9, 1, 16, 12, 20, 64],
      },
    },
    {
      id: 'level-02', ////二级道路（国道、快速路）
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 9,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '7', '12']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': '#ffdb70',
        'line-width': ['interpolate', ['linear'], ['zoom'], 9, 1, 16, 10, 20, 60],
      },
    },
    {
      id: 'level-01-case', //一级道路（高速）边框
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 8,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '13']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
      },
      paint: {
        'line-color': '#f57d2e',
        'line-width': ['interpolate', ['linear'], ['zoom'], 8, 0, 16, 12, 20, 64],
      },
    },
    {
      id: 'level-01', //一级道路（高速）
      type: 'line',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 8,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '13']],
      layout: {
        'line-join': 'round',
        'line-cap': 'round',
        visibility: 'visible',
        'line-round-limit': 1.05,
      },
      paint: {
        'line-color': '#f69655',
        'line-width': ['interpolate', ['linear'], ['zoom'], 8, 0, 16, 10, 20, 60],
      },
    },
    {
      id: 'building', //3d建筑
      type: 'fill-extrusion',
      source: 'os',
      'source-layer': layerGroupName + '_building',
      minzoom: 16,
      // "maxzoom": 20,
      layout: {},
      paint: {
        'fill-extrusion-color': '#e3e3e3',
        'fill-extrusion-opacity': 0.7,
        'fill-extrusion-vertical-gradient': false,
        'fill-extrusion-height': ['to-number', ['get', 'height']],
      },
    },
    {
      id: 'railway-label',
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_bg_line',
      minzoom: 11,
      // "maxzoom": 20,
      filter: ['==', 'type', '92'],
      layout: {
        'text-field': '{name}',
        'symbol-placement': 'line-center',
        'text-size': 14,
        'symbol-spacing': 500,
        'text-font': ['Microsoft YaHei'],
        visibility: 'visible',
      },
      paint: {
        'text-color': '#666',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
      },
    },

    {
      id: 'level-05-label', //五级道路（支路）名称
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 15,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '4', '8', '9']],
      layout: {
        'text-field': '{name}',
        'symbol-placement': 'line',
        'text-size': ['interpolate', ['linear'], ['zoom'], 15, 12, 18, 14],
        'text-font': ['Microsoft YaHei'],
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 15, 300, 20, 1000],
        visibility: 'visible',
      },
      paint: {
        'text-color': '#666',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
      },
    },
    {
      id: 'level-04-label', //四级道路（县道、次干道）名称
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 13,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '6', '5', '10']],
      layout: {
        'text-field': '{name}',
        'text-size': ['interpolate', ['linear'], ['zoom'], 13, 12, 14, 14],
        'text-font': ['Microsoft YaHei'],
        'symbol-placement': 'line',
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 13, 300, 20, 1000],
        visibility: 'visible',
      },
      paint: {
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
        'text-color': '#666',
      },
    },
    {
      id: 'level-03-label', //三级道路（省道、主干道）名称
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 12,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '11']],
      layout: {
        'symbol-placement': 'line',
        'text-field': '{name}',
        'text-size': ['interpolate', ['linear'], ['zoom'], 12, 12, 13, 14],
        'text-font': ['Microsoft YaHei'],
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 12, 300, 20, 1000],
        visibility: 'visible',
      },
      paint: {
        'text-color': '#666',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
      },
    },
    {
      id: 'level-02-label', //二级道路（国道、快速路）名称
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 11,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '7', '12']],
      layout: {
        'text-field': '{name}',
        'text-font': ['Microsoft YaHei'],
        'text-size': ['interpolate', ['linear'], ['zoom'], 11, 12, 12, 14],
        'symbol-placement': 'line',
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 11, 300, 20, 1000],
        visibility: 'visible',
      },
      paint: {
        'text-color': '#666',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
      },
    },
    {
      id: 'level-01-label', //一级道路（高速）名称
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 9,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '13']],
      layout: {
        'text-field': '{name}',
        'symbol-placement': 'line',
        'text-size': ['interpolate', ['linear'], ['zoom'], 9, 12, 12, 14],
        'text-font': ['Microsoft YaHei'],
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 9, 300, 20, 1000],
        visibility: 'visible',
      },
      paint: {
        'text-color': '#333',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
      },
    },
    {
      id: 'level-03-num', //三级道路（国道、快速路）编号
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 13,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '11']],
      layout: {
        'symbol-placement': 'line',
        'text-field': '{road_num}',
        visibility: 'visible',
        'text-font': ['Microsoft YaHei'],
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 12, 300, 20, 1000],
        'text-size': 12,
      },
      paint: {
        'text-color': 'hsl(0, 0%, 100%)',
        'text-halo-color': '#ec914b',
        'text-halo-width': 100,
      },
    },
    {
      id: 'level-02-num', //二级道路（国道、快速路）编号
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 11,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '7', '12']],
      layout: {
        'text-field': '{road_num}',
        'text-font': ['Microsoft YaHei'],
        'symbol-placement': 'line',
        visibility: 'visible',
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 11, 300, 20, 1000],
        'text-size': 12,
      },
      paint: {
        'text-color': 'hsl(0, 0%, 100%)',
        'text-halo-color': '#f47171',
        'text-halo-width': 100,
      },
    },
    {
      id: 'level-01-num', //一级道路（高速）编号
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_road',
      minzoom: 11,
      // "maxzoom": 20,
      filter: ['all', ['in', 'road_grade', '13']],
      layout: {
        'text-field': '{road_num}',
        visibility: 'visible',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'symbol-spacing': ['interpolate', ['linear'], ['zoom'], 11, 300, 20, 1000],
        'symbol-placement': 'line',
        'text-padding': 0,
      },
      paint: {
        'text-color': 'hsl(0, 0%, 100%)',
        'text-halo-color': '#54c081',
        'text-halo-width': 100,
      },
    },
    {
      id: 'park-label',
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_bg_area',
      minzoom: 10,
      // "maxzoom": 20,
      filter: ['all', ['in', 'type', '31', '33']],
      layout: {
        'text-field': '{name}',
        'text-font': ['Microsoft YaHei'],
        'text-size': ['interpolate', ['linear'], ['zoom'], 13, 12, 16, 14],
        'text-padding': 2,
        'text-offset': [0, 1],
        'text-anchor': 'center',
      },
      paint: {
        'text-halo-width': 1,
        'text-color': '#257902',
        'text-halo-color': 'hsl(0, 0%, 100%)',
      },
    },
    {
      id: 'water-label', //水系名称
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_bg_area',
      minzoom: 13,
      // "maxzoom": 20,
      filter: ['==', 'type', '12'],
      layout: {
        'text-field': '{name}',
        'text-font': ['Microsoft YaHei'],
        'text-size': ['interpolate', ['linear'], ['zoom'], 13, 12, 16, 14],
        visibility: 'visible',

        'text-padding': 2,
        'text-offset': [0, 1],
        'text-anchor': 'center',
      },
      paint: {
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
        'text-color': '#046ab4',
      },
    },
    {
      id: 'county-label', //区名
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['all', ['in', 'type', '18070200']],
      minzoom: 10,
      maxzoom: 14,
      layout: {
        'text-size': 12,
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 1],
        'text-anchor': 'top',
        'icon-image': '18000000',
        'icon-size': iconSize,
        'icon-ignore-placement': true,
      },
      paint: {
        'text-color': 'hsl(0, 0%, 100%)',
        'text-halo-color': '#6ab9f6',
        'text-halo-width': 100,
      },
    },
    {
      id: 'city-label', //市名
      type: 'symbol',
      source: 'china',
      'source-layer': chinaGroupName + '_china_poi',
      filter: ['all', ['==', 'type', '18070100'], ['==', 'grade', '2']],
      minzoom: 6,
      maxzoom: 12,
      layout: {
        'text-size': ['interpolate', ['linear'], ['zoom'], 6, 14, 9, 16, 12, 18],
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-font': ['Microsoft YaHei'],
        'text-anchor': 'bottom',
        'text-offset': [0, -0.5],
        'icon-image': 'city',
        'icon-size': iconSize,
      },
      paint: {
        'text-color': '#333333',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
      },
    },

    {
      id: 'capital-label',
      type: 'symbol',
      source: 'china',
      'source-layer': chinaGroupName + '_china_poi',
      minzoom: 3,
      maxzoom: 6,
      filter: ['all', ['==', 'type', '18070100'], ['==', 'grade', '1']],
      layout: {
        'text-field': '{name}',
        'text-font': ['Microsoft YaHei'],
        'text-size': ['interpolate', ['linear'], ['zoom'], 3, 12, 6, 16],
        'icon-image': 'city',
        'icon-size': 0.4,
        'text-anchor': 'bottom',
        'text-offset': [0, -0.5],
      },
      paint: {
        'text-color': '#333333',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'icon-opacity': 1,
        'text-halo-width': 1,
      },
    },

    {
      //箭头df2
      id: 'road-arrow',
      minzoom: 17,
      type: 'symbol',
      source: 'os',
      layout: {
        // "icon-allow-overlap": true,
        'icon-ignore-placement': true,
        'icon-image': 'road-arrow',
        'symbol-spacing': 800,
        'icon-size': 1,
        'icon-padding': 0,
        'symbol-placement': 'line',
      },
      filter: ['==', 'pass_code', '1'],
      'source-layer': layerGroupName + '_road',
      paint: {
        'text-color': '#333',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
        'icon-opacity': 0.35,
      },
    },
    {
      //箭头df2
      id: 'road-arrow-rotate',
      minzoom: 17,
      type: 'symbol',
      source: 'os',
      layout: {
        'icon-ignore-placement': true,
        'icon-image': 'road-arrow',
        'symbol-spacing': 800,
        'icon-size': 1,
        'icon-padding': 0,
        'symbol-placement': 'line',
        'icon-rotate': 180,
      },
      filter: ['==', 'pass_code', '2'],
      'source-layer': layerGroupName + '_road',
      paint: {
        'text-color': '#333',
        'text-halo-color': 'hsl(0, 0%, 100%)',
        'text-halo-width': 1,
        'icon-opacity': 0.35,
      },
    },

    {
      id: 'label-6',
      minzoom: 13,
      maxzoom: 14,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['==', 'grade', '6'],
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 0.6],
        'text-anchor': 'top',
        'icon-image': ['get', 'featcode'],
        'icon-size': iconSize,
        'icon-ignore-placement': true,
        'icon-allow-overlap': false,
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'label-5',
      minzoom: 14,
      maxzoom: 15,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['==', 'grade', '5'],
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 0.6],
        'text-anchor': 'top',
        'icon-image': ['get', 'featcode'],
        'icon-size': iconSize,
        'icon-ignore-placement': true,
        'icon-allow-overlap': false,
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'label-4',
      minzoom: 15,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['==', 'grade', '4'],
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 0.6],
        'text-anchor': 'top',
        'icon-image': ['get', 'featcode'],
        'icon-size': iconSize,
        'icon-ignore-placement': true,
        'icon-allow-overlap': false,
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'label-3',
      minzoom: 16,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['==', 'grade', '3'],
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 0.6],
        'text-anchor': 'top',
        'icon-image': ['get', 'featcode'],
        'icon-size': iconSize,
        'icon-ignore-placement': true,
        'icon-allow-overlap': false,
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'label-2',
      minzoom: 17,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['==', 'grade', '2'],
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 0.6],
        'text-anchor': 'top',
        'icon-image': ['get', 'featcode'],
        'icon-size': iconSize,
        'icon-ignore-placement': true,
        'icon-allow-overlap': false,
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'label-1',
      minzoom: 18,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_label',
      filter: ['all', ['in', 'grade', '0', '1']],
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{name}',
        'text-size': 12,
        'text-font': ['Microsoft YaHei'],
        'text-padding': 2,
        'text-offset': [0, 0.6],
        'text-anchor': 'top',
        'icon-image': ['get', 'featcode'],
        'icon-size': iconSize,
        'icon-ignore-placement': true,
        'icon-allow-overlap': false,
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'building-area-poi', //小区面标注
      minzoom: 15,
      type: 'symbol',
      source: 'os',
      'source-layer': layerGroupName + '_building_area_poi',
      layout: {
        'text-allow-overlap': false,
        'text-ignore-placement': false,
        'text-field': '{bd_name}',
        'text-size': 14,
        'text-font': ['Microsoft YaHei'],
      },
      paint: {
        'text-color': '#8a8a89',
        'text-halo-color': '#FFFFFF',
        'text-halo-width': 1,
      },
    },
    {
      id: 'province-line',
      type: 'line',
      source: 'china',
      'source-layer': chinaGroupName + '_admin',
      minzoom: 3,
      filter: ['==', 'grade', '1'],
      layout: {},
      paint: {
        'line-color': '#d5d3cd',
        'line-blur': 0,
        'line-offset': 0,
      },
    },
    {
      id: 'city-line',
      type: 'line',
      source: 'china',
      'source-layer': chinaGroupName + '_admin',
      filter: ['==', 'grade', '2'],
      minzoom: 6,
      layout: {},
      paint: { 'line-color': '#d5d3cd', 'line-dasharray': [4, 4] },
    },
    {
      id: 'county-line',
      type: 'line',
      source: 'china',
      'source-layer': chinaGroupName + '_admin',
      filter: ['==', 'grade', '3'],
      minzoom: 7,
      layout: {},
      paint: { 'line-color': '#d5d3cd', 'line-dasharray': [4, 4] },
    },
  ],
};

export default normal_style;
