export default {
  version: 8,
  // glyphs: "./fonts/{fontstack}/{range}.pbf",
  sources: {
    "gt-basemap-streets-v1": {
      type: "vector",
      tiles: [
        process.env.VUE_APP_MAP_INIT_STYLE +
          "/gt-basemap-streets-v1/{z}/{x}/{y}.vector.pbf",
      ],
      minzoom: 0,
      maxzoom: 21,
    },
    area: {
      tiles: [
        `${process.env.VUE_APP_MAP_INIT_STYLE}/gx_area/{z}/{x}/{y}.vector.pbf`,
      ],
      type: "vector",
      maxzoom: 12,
    },
    area_title: {
      tiles: [
        `${process.env.VUE_APP_MAP_INIT_STYLE}/area_title/{z}/{x}/{y}.vector.pbf`,
      ],
      type: "vector",
      maxzoom: 5,
    },
  },
  layers: [
    {
      id: "china_land",
      source: "gt-basemap-streets-v1",
      "source-layer": "china_land",
      minzoom: 0,
      maxzoom: 21,
      type: "line",
      paint: {
        "line-color": "rgba(252, 249, 242, 1)",
      },
    },
    {
      id: "province_title",
      type: "symbol",
      source: "area_title",
      "source-layer": "province",
      layout: {
        "text-font": ["open-sans"],
        "text-field": "{PXZQMC}",
        "text-size": 17,
        "text-max-width": 5,
      },
      maxzoom: 7,
      minzoom: 1,
      paint: {
        "text-color": "#fff",
        "text-halo-color": "#000",
        "text-halo-width": 1,
      },
    },
    {
      id: "province_outline",
      type: "line",
      source: "area",
      "source-layer": "province",
      layout: {},
      paint: {
        "line-color": "#fff",
        "line-width": 2,
        "line-blur": 1,
      },
    },
  ],
};
