{
  "version": 8,
  "name": "WillyWeatherLayers",
  "sources": {
    "vector": {
      "type": "vector",
      "url": "pmtiles://https://layers-tiles.willyweather.com/map-styles/vector-v6.pmtiles",
      "attribution": "© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors, <a href='https://www.naturalearthdata.com/'>Natural Earth</a>"
    }
  },
  "glyphs": "https://layers-tiles.willyweather.com/map-styles/fonts/{fontstack}/{range}.pbf",
  "layers": [
    {
      "id": "Background",
      "type": "background",
      "paint": {
        "background-color": "hsl(0, 0%, 49%)"
      }
    },
    {
      "id": "Land mask",
      "type": "fill",
      "source": "vector",
      "source-layer": "land",
      "paint": {
        "fill-antialias": false,
        "fill-color": "hsl(0, 0%, 49%)"
      }
    },
    {
      "id": "Residential",
      "type": "fill",
      "source": "vector",
      "source-layer": "landuse",
      "minzoom": 4,
      "maxzoom": 15,
      "paint": {
        "fill-color": "hsla(0, 0%, 47%, 0.2)",
        "fill-outline-color": "hsla(0, 0%, 39%, 0.5)"
      },
      "filter": ["==", "class", "residential"]
    },
    {
      "id": "River",
      "type": "line",
      "source": "vector",
      "source-layer": "waterway",
      "minzoom": 4,
      "maxzoom": 13,
      "paint": {
        "line-color": "hsl(195, 41%, 55%)",
        "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.3, 6, 0.5, 8, 1, 11, 1.5]
      }
    },
    {
      "id": "Aeroway",
      "type": "line",
      "source": "vector",
      "source-layer": "aeroway",
      "minzoom": 12,
      "layout": {
        "line-cap": "round",
        "line-join": "round",
        "visibility": "none"
      },
      "paint": {
        "line-color": "hsl(220, 0%, 80%)",
        "line-width": ["interpolate", ["linear"], ["zoom"], 11, ["match", ["get", "class"], ["runway"], 3, 0.5], 15, ["match", ["get", "class"], ["runway"], 15, 6], 16, ["match", ["get", "class"], ["runway"], 20, 6]]
      },
      "filter": ["==", "$type", "LineString"]
    },
    {
      "id": "Road network",
      "type": "line",
      "source": "vector",
      "source-layer": "transportation",
      "minzoom": 4,
      "maxzoom": 16,
      "layout": {
        "line-join": "round"
      },
      "paint": {
        "line-color": "hsla(0, 0%, 47%, 0.5)",
        "line-opacity": 0.5,
        "line-width": ["interpolate", ["linear"], ["zoom"], 5, 0.5, 8, 1, 11, 2]
      },
      "filter": ["has", "class"]
    },
    {
      "id": "Other border",
      "type": "line",
      "source": "vector",
      "source-layer": "boundary",
      "paint": {
        "line-color": "hsla(0, 0%, 35%, 0.4)"
      },
      "filter": ["all", ["==", "admin_level", 4], ["==", "maritime", 0]]
    },
    {
      "id": "Disputed border",
      "type": "line",
      "source": "vector",
      "source-layer": "boundary",
      "layout": {
        "line-cap": "round",
        "line-join": "round"
      },
      "paint": {
        "line-color": "hsl(0, 0%, 42%)",
        "line-dasharray": [2, 4]
      },
      "filter": ["all", ["==", "admin_level", 2], ["==", "maritime", 0], ["==", "disputed", 1]]
    },
    {
      "id": "Country border",
      "type": "line",
      "source": "vector",
      "source-layer": "boundary",
      "layout": {
        "line-cap": "round",
        "line-join": "round"
      },
      "paint": {
        "line-color": "hsl(0, 0%, 35%)"
      },
      "filter": ["all", ["==", "admin_level", 2], ["==", "maritime", 0], ["==", "disputed", 0]]
    },
    {
      "id": "Land outline",
      "type": "line",
      "source": "vector",
      "source-layer": "land",
      "paint": {
        "line-color": "hsl(0, 0%, 30%)",
        "line-width": 1.5
      }
    },
    {
      "id": "Land shadow",
      "type": "line",
      "source": "vector",
      "source-layer": "land",
      "paint": {
        "line-color": "hsl(0, 0%, 21%)",
        "line-blur": 5,
        "line-width": 3,
        "line-offset": -1
      }
    },
    {
      "id": "Ocean labels",
      "type": "symbol",
      "source": "vector",
      "source-layer": "water_name",
      "maxzoom": 4,
      "layout": {
        "text-field": "{name_en}",
        "text-font": ["Open Sans Bold", "Noto Sans Bold", "Arial Unicode MS Bold"],
        "text-letter-spacing": 0.1,
        "text-max-width": 6,
        "text-padding": 2,
        "text-size": ["interpolate", ["linear"], ["zoom"], 1, 11, 4, 14],
        "text-transform": "uppercase",
        "visibility": "none"
      },
      "paint": {
        "text-color": "hsl(344, 0%, 69%)"
      },
      "filter": ["all", ["==", "class", "ocean"], ["has", "name"]]
    },
    {
      "id": "City labels",
      "type": "symbol",
      "source": "vector",
      "source-layer": "place",
      "minzoom": 5,
      "maxzoom": 14,
      "layout": {
        "symbol-sort-key": ["-", 0, ["to-number", ["get", "rank"]]],
        "text-field": "{name_en}",
        "text-font": ["Open Sans Bold", "Noto Sans Bold", "Arial Unicode MS Bold"],
        "text-max-width": 10,
        "text-offset": [0.2, 0.2],
        "text-padding": 16,
        "text-size": ["interpolate", ["linear"], ["zoom"], 5, ["+", 7, ["*", 0.45, ["to-number", ["get", "rank"]]]], 9, ["+", 8, ["*", 0.55, ["to-number", ["get", "rank"]]]], 13, ["+", 9, ["*", 0.9, ["to-number", ["get", "rank"]]]], 14, ["+", 11, ["*", 1.1, ["to-number", ["get", "rank"]]]]],
        "visibility": "none"
      },
      "paint": {
        "text-color": "hsl(154, 0%, 100%)",
        "text-halo-color": "hsl(0, 0%, 0%)",
        "text-halo-width": 0.5
      },
      "filter": ["all", ["==", "class", "city"], ["has", "rank"]]
    }
  ]
}
