{
  "version": 8,
  "name": "Traffic Map Positron",
  "metadata": {
    "description": "A minimal OpenFreeMap Positron adaptation for the Traffic Map. Area overlays sit below water; labels use English names and participate in marker collision detection.",
    "reference": "https://tiles.openfreemap.org/styles/positron"
  },
  "glyphs": "https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",
  "sources": {
    "openmaptiles": {
      "type": "vector",
      "url": "https://tiles.openfreemap.org/planet",
      "attribution": "<a href=\"https://openfreemap.org/\" target=\"_blank\">OpenFreeMap</a> <a href=\"https://openmaptiles.org/\" target=\"_blank\">&copy; OpenMapTiles</a> <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">&copy; OpenStreetMap contributors</a>"
    }
  },
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": { "background-color": "#f0f2f5" }
    },
    {
      "id": "water",
      "type": "fill",
      "source": "openmaptiles",
      "source-layer": "water",
      "filter": ["all", ["==", ["geometry-type"], "Polygon"], ["!=", ["get", "brunnel"], "tunnel"]],
      "paint": { "fill-antialias": true, "fill-color": "#a6d4f4" }
    },
    {
      "id": "boundary-country",
      "type": "line",
      "source": "openmaptiles",
      "source-layer": "boundary",
      "filter": ["all", ["==", ["get", "admin_level"], 2], ["!=", ["get", "maritime"], 1], ["!=", ["get", "disputed"], 1], ["!", ["has", "claimed_by"]]],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#a9b0bb",
        "line-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.4, 4, 1],
        "line-width": ["interpolate", ["linear"], ["zoom"], 3, 0.6, 5, 1, 12, 2]
      }
    },
    {
      "id": "boundary-disputed",
      "type": "line",
      "source": "openmaptiles",
      "source-layer": "boundary",
      "filter": ["all", ["==", ["get", "admin_level"], 2], ["!=", ["get", "maritime"], 1], ["==", ["get", "disputed"], 1]],
      "paint": { "line-color": "#a9b0bb", "line-dasharray": [1, 2], "line-width": 1 }
    },
    {
      "id": "label-water-point",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "water_name",
      "filter": ["==", ["geometry-type"], "Point"],
      "layout": {
        "text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name:latin"], ["get", "name"]],
        "text-font": ["Noto Sans Italic"],
        "text-letter-spacing": 0.15,
        "text-max-width": 8,
        "text-size": ["interpolate", ["linear"], ["zoom"], 0, 10, 8, 14]
      },
      "paint": { "text-color": "#495e91", "text-halo-color": "rgba(255,255,255,0.7)", "text-halo-width": 1.5 }
    },
    {
      "id": "label-water-line",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "water_name",
      "filter": ["==", ["geometry-type"], "LineString"],
      "layout": {
        "symbol-placement": "line",
        "symbol-spacing": 350,
        "text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name:latin"], ["get", "name"]],
        "text-font": ["Noto Sans Italic"],
        "text-letter-spacing": 0.15,
        "text-size": 12
      },
      "paint": { "text-color": "#495e91", "text-halo-color": "rgba(255,255,255,0.7)", "text-halo-width": 1.5 }
    },
    {
      "id": "label-country",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "place",
      "maxzoom": 9,
      "filter": ["==", ["get", "class"], "country"],
      "layout": {
        "text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name:latin"], ["get", "name"]],
        "text-font": ["Noto Sans Bold"],
        "text-max-width": 7,
        "text-size": ["interpolate", ["linear"], ["zoom"], 1, 10, 5, 16]
      },
      "paint": { "text-color": "#1f2937", "text-halo-color": "#fff", "text-halo-width": 1.5 }
    },
    {
      "id": "label-city",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "place",
      "minzoom": 4,
      "filter": ["==", ["get", "class"], "city"],
      "layout": {
        "text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name:latin"], ["get", "name"]],
        "text-font": ["Noto Sans Regular"],
        "text-max-width": 8,
        "text-size": ["interpolate", ["linear"], ["zoom"], 4, 11, 11, 16]
      },
      "paint": { "text-color": "#1f2937", "text-halo-color": "#fff", "text-halo-width": 1.5 }
    },
    {
      "id": "label-town",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "place",
      "minzoom": 8,
      "filter": ["match", ["get", "class"], ["town", "village"], true, false],
      "layout": {
        "text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name:latin"], ["get", "name"]],
        "text-font": ["Noto Sans Regular"],
        "text-max-width": 8,
        "text-size": 11
      },
      "paint": { "text-color": "#1f2937", "text-halo-color": "#fff", "text-halo-width": 1.5 }
    }
  ]
}
