{
  "version": 8,
  "name": "FMI NLS zoom/overlay-en",
  "id": "fmi-nls-zoom-overlay-en",
  "center": [
    25.4,
    65.3
  ],
  "zoom": 4.3,
  "metadata": {
    "description": "Roads by class, the Finnish border, maakunta boundaries, town dots (z0-4) and place names from NLS Maastokartta (vektori); coastline from the Protomaps base map of the www.fmi.fi styles. After the www.fmi.fi overlay_fi style. No background.",
    "fmi-nls-tiles": "styles-src/nls/, generated by scripts/build-styles.mjs. Edit the sources, not this."
  },
  "sources": {
    "nls": {
      "type": "vector",
      "url": "https://dzr34plfemya.cloudfront.net/nls-20261106.json",
      "attribution": "© <a href=\"https://www.maanmittauslaitos.fi/avoindata-lisenssi-cc40\">Maanmittauslaitos</a>"
    },
    "protomaps": {
      "type": "vector",
      "url": "https://dzr34plfemya.cloudfront.net/20260923-earth-z9.json",
      "attribution": "<a href=\"https://github.com/protomaps/basemaps\">Protomaps</a> © <a href=\"https://osm.org/copyright\">OpenStreetMap</a>"
    }
  },
  "glyphs": "https://dzr34plfemya.cloudfront.net/assets/fonts/{fontstack}/{range}.pbf",
  "layers": [
    {
      "id": "rantaviiva",
      "type": "line",
      "source": "protomaps",
      "source-layer": "earth",
      "filter": [
        "==",
        "$type",
        "Polygon"
      ],
      "layout": {
        "line-join": "round"
      },
      "paint": {
        "line-color": "#383838",
        "line-width": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          4,
          1,
          10,
          0.5
        ],
        "line-opacity": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          6,
          1,
          10,
          0.45
        ]
      }
    },
    {
      "id": "tiet-yhdystie-reuna",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "minzoom": 8,
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              4,
              5
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(90, 90, 100)",
        "line-gap-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          8,
          0.5,
          10,
          1.3
        ],
        "line-width": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          8,
          0.25,
          10,
          0.5
        ]
      }
    },
    {
      "id": "tiet-seututie-reuna",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "minzoom": 7,
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              3
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(90, 90, 100)",
        "line-gap-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          7,
          0.8,
          10,
          2
        ],
        "line-width": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          7,
          0.3,
          10,
          0.6
        ]
      }
    },
    {
      "id": "tiet-kantatie-reuna",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "minzoom": 5,
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              2
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(90, 90, 100)",
        "line-gap-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          5,
          0.8,
          7,
          1.3,
          10,
          2.6
        ],
        "line-width": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          5,
          0.35,
          10,
          0.7
        ]
      }
    },
    {
      "id": "tiet-valtatie-reuna",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              1
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(90, 90, 100)",
        "line-gap-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          3,
          0.7,
          5,
          1,
          7,
          1.6,
          10,
          3.2
        ],
        "line-width": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          3,
          0.35,
          5,
          0.45,
          10,
          0.8
        ]
      }
    },
    {
      "id": "tiet-yhdystie",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "minzoom": 8,
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              4,
              5
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(235, 235, 235)",
        "line-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          8,
          0.5,
          10,
          1.3
        ]
      }
    },
    {
      "id": "tiet-seututie",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "minzoom": 7,
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              3
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(235, 235, 235)",
        "line-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          7,
          0.8,
          10,
          2
        ]
      }
    },
    {
      "id": "tiet-kantatie",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "minzoom": 5,
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              2
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(235, 235, 235)",
        "line-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          5,
          0.8,
          7,
          1.3,
          10,
          2.6
        ]
      }
    },
    {
      "id": "tiet-valtatie",
      "type": "line",
      "source": "nls",
      "source-layer": "tiet",
      "filter": [
        "all",
        [
          "!",
          [
            "any",
            [
              "==",
              [
                "get",
                "Tieluokka"
              ],
              9
            ],
            [
              "in",
              [
                "get",
                "Kohdeluokk"
              ],
              [
                "literal",
                [
                  12151,
                  12152
                ]
              ]
            ]
          ]
        ],
        [
          "in",
          [
            "coalesce",
            [
              "get",
              "Tieluokka"
            ],
            4
          ],
          [
            "literal",
            [
              1
            ]
          ]
        ]
      ],
      "layout": {
        "line-join": "round",
        "line-cap": "round"
      },
      "paint": {
        "line-color": "rgb(235, 235, 235)",
        "line-width": [
          "interpolate",
          [
            "exponential",
            1.5
          ],
          [
            "zoom"
          ],
          3,
          0.7,
          5,
          1,
          7,
          1.6,
          10,
          3.2
        ]
      }
    },
    {
      "id": "rajat-aluemeri",
      "type": "line",
      "source": "nls",
      "source-layer": "rajat",
      "filter": [
        "==",
        [
          "get",
          "Kohdeluokk"
        ],
        82100
      ],
      "layout": {
        "line-join": "round"
      },
      "paint": {
        "line-color": "#000000",
        "line-width": 0.6,
        "line-opacity": 0.3,
        "line-dasharray": [
          1,
          3
        ]
      }
    },
    {
      "id": "rajat-maakunta",
      "type": "line",
      "source": "nls",
      "source-layer": "rajat",
      "filter": [
        "==",
        [
          "get",
          "Kohdeluokk"
        ],
        84115
      ],
      "layout": {
        "line-join": "round"
      },
      "paint": {
        "line-color": "#000000",
        "line-width": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          3,
          1,
          5,
          1.2,
          10,
          1.6
        ],
        "line-dasharray": [
          1,
          1
        ]
      }
    },
    {
      "id": "rajat-valtakunta",
      "type": "line",
      "source": "nls",
      "source-layer": "rajat",
      "filter": [
        "==",
        [
          "get",
          "Kohdeluokk"
        ],
        84111
      ],
      "layout": {
        "line-join": "round"
      },
      "paint": {
        "line-color": "#000000",
        "line-width": 1.2
      }
    },
    {
      "id": "kaupungit",
      "type": "circle",
      "source": "nls",
      "source-layer": "nimisto",
      "maxzoom": 4,
      "filter": [
        "in",
        [
          "get",
          "placetype"
        ],
        [
          "literal",
          [
            4010125,
            3010105
          ]
        ]
      ],
      "paint": {
        "circle-radius": 2.2,
        "circle-color": "rgb(235, 235, 235)",
        "circle-stroke-color": "rgb(90, 90, 100)",
        "circle-stroke-width": 0.8
      }
    },
    {
      "id": "nimet-luonto",
      "type": "symbol",
      "source": "nls",
      "source-layer": "nimisto",
      "minzoom": 7,
      "filter": [
        "in",
        [
          "floor",
          [
            "/",
            [
              "get",
              "placetype"
            ],
            1000000
          ]
        ],
        [
          "literal",
          [
            1,
            2
          ]
        ]
      ],
      "layout": {
        "text-field": [
          "coalesce",
          [
            "get",
            [
              "concat",
              "spelling_",
              [
                "get",
                "language"
              ]
            ]
          ],
          [
            "coalesce",
            [
              "get",
              "spelling_fin"
            ],
            [
              "get",
              "spelling_swe"
            ],
            [
              "get",
              "spelling_sme"
            ],
            [
              "get",
              "spelling_smn"
            ],
            [
              "get",
              "spelling_sms"
            ]
          ]
        ],
        "symbol-sort-key": [
          "-",
          0,
          [
            "+",
            [
              "get",
              "scalerelev"
            ],
            [
              "get",
              "textsize"
            ]
          ]
        ],
        "text-padding": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          7,
          4,
          10,
          8
        ],
        "text-max-width": 8,
        "text-font": [
          "literal",
          [
            "Barlow Semi Condensed Italic"
          ]
        ],
        "text-letter-spacing": 0.05,
        "text-size": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          7,
          [
            "match",
            [
              "get",
              "scalerelev"
            ],
            8000000,
            12,
            4500000,
            11,
            2000000,
            10,
            9.5
          ],
          10,
          [
            "match",
            [
              "get",
              "scalerelev"
            ],
            8000000,
            16,
            4500000,
            14,
            2000000,
            13,
            12
          ]
        ]
      },
      "paint": {
        "text-color": "#1a1a1a",
        "text-halo-color": "rgba(255, 255, 255, 0.85)",
        "text-halo-width": 1.5,
        "text-halo-blur": 1
      }
    },
    {
      "id": "nimet-asutus",
      "type": "symbol",
      "source": "nls",
      "source-layer": "nimisto",
      "minzoom": 4,
      "filter": [
        "in",
        [
          "floor",
          [
            "/",
            [
              "get",
              "placetype"
            ],
            1000000
          ]
        ],
        [
          "literal",
          [
            3,
            4
          ]
        ]
      ],
      "layout": {
        "text-field": [
          "coalesce",
          [
            "get",
            [
              "concat",
              "spelling_",
              [
                "get",
                "language"
              ]
            ]
          ],
          [
            "coalesce",
            [
              "get",
              "spelling_fin"
            ],
            [
              "get",
              "spelling_swe"
            ],
            [
              "get",
              "spelling_sme"
            ],
            [
              "get",
              "spelling_smn"
            ],
            [
              "get",
              "spelling_sms"
            ]
          ]
        ],
        "symbol-sort-key": [
          "-",
          0,
          [
            "+",
            [
              "get",
              "scalerelev"
            ],
            [
              "get",
              "textsize"
            ],
            [
              "*",
              1000,
              [
                "coalesce",
                [
                  "get",
                  "Asukasluok"
                ],
                0
              ]
            ]
          ]
        ],
        "text-padding": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          5,
          2,
          7,
          2,
          8,
          6,
          10,
          8
        ],
        "text-max-width": 8,
        "text-variable-anchor": [
          "center",
          "right",
          "left",
          "top",
          "bottom"
        ],
        "text-font": [
          "case",
          [
            ">=",
            [
              "get",
              "scalerelev"
            ],
            4500000
          ],
          [
            "literal",
            [
              "Barlow Semi Condensed Medium"
            ]
          ],
          [
            "literal",
            [
              "Barlow Semi Condensed Regular"
            ]
          ]
        ],
        "text-letter-spacing": 0.05,
        "text-size": [
          "interpolate",
          [
            "linear"
          ],
          [
            "zoom"
          ],
          5,
          [
            "match",
            [
              "get",
              "scalerelev"
            ],
            8000000,
            14,
            4500000,
            12,
            2000000,
            11,
            1000000,
            10.5,
            10
          ],
          10,
          [
            "match",
            [
              "get",
              "scalerelev"
            ],
            8000000,
            20,
            4500000,
            17,
            2000000,
            15,
            1000000,
            14,
            13
          ]
        ]
      },
      "paint": {
        "text-color": "#1a1a1a",
        "text-halo-color": "rgba(255, 255, 255, 0.85)",
        "text-halo-width": 2,
        "text-halo-blur": 1
      }
    }
  ]
}
