├── .gitignore
├── serve.sh
├── config-kiirus.json
├── README.md
├── LICENSE
├── prepare.sh
├── process-kiirus.lua
├── index.html
└── positron.json
/.gitignore:
--------------------------------------------------------------------------------
1 | *.osm
2 | *.osm.pbf
3 | *.pmtiles
4 | .venv/
5 |
--------------------------------------------------------------------------------
/serve.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | if [ ! -e .venv ]; then
3 | python3 -m venv .venv
4 | .venv/bin/pip install rangehttpserver
5 | fi
6 | .venv/bin/python3 -m RangeHTTPServer
7 |
--------------------------------------------------------------------------------
/config-kiirus.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers": {
3 | "road": { "minzoom": 8, "maxzoom": 14, "simplify_below": 13, "simplify_level": 0.0003, "simplify_ratio": 2.0 },
4 | "road_name": { "minzoom": 10, "maxzoom": 14 }
5 | },
6 | "settings": {
7 | "minzoom": 8,
8 | "maxzoom": 14,
9 | "basezoom": 14,
10 | "include_ids": false,
11 | "name": "Kiirusepiirangud",
12 | "version": "0.1",
13 | "description": "Speed limit tiles",
14 | "bounding_box": [24.3916, 59.2360, 24.9857, 59.5319],
15 | "compress": "gzip"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Speed Limits Map
2 |
3 | This is a set of files to prepare an interactive speed limits map.
4 |
5 | 1. Get a [bounding box](https://boundingbox.klokantech.com/).
6 | 2. Put it into `prepare.sh` and `config-kiirus.json` (lat-lon reversed in the latter).
7 | 3. Run `./prepare.sh`.
8 | 4. Edit `index.html` for the title, the initial location and maybe speed brackets (twice: in the legend and in the code, look for `speeds-`).
9 | 5. Run `./serve.sh` and open [localhost:8000](http://localhost:8000) to test the page.
10 | 6. Publish `index.html`, `positron.json`, and `kiirus.mbtiles` somewhere.
11 |
12 | Written by Ilya Zverev, published under the ISC License.
13 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2024 Ilya Zverev
2 |
3 | Permission to use, copy, modify, and/or distribute this software for any
4 | purpose with or without fee is hereby granted, provided that the above
5 | copyright notice and this permission notice appear in all copies.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 |
--------------------------------------------------------------------------------
/prepare.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e -u -x
3 |
4 | if [ ! -e kiirus.osm.pbf ]; then
5 | echo Downloading data...
6 | BBOX=59.2360,24.3916,59.5319,24.9857
7 | curl -L -o kiirus.osm "https://overpass-api.de/api/interpreter?data=%5Bout%3Axml%5D%5Btimeout%3A25%5D%3B%0Away%5B%22highway%22~%22%28motorway%7Ctrunk%7Cprimary%7Csecondary%7Ctertiary%7Cresidential%7Cunclassified%7Cliving_street%29%28_link%29%3F%22%5D%28${BBOX//,/%2C}%29%3B%0A%28._%3B%3E%3B%29%3B%0Aout%20meta%3B"
8 | osmium cat -o kiirus.osm.pbf kiirus.osm
9 | rm kiirus.osm
10 | fi
11 |
12 | echo Preparing vector tiles...
13 | if which tilemaker; then
14 | tilemaker /data/kiirus.osm.pbf \
15 | --output /data/kiirus.pmtiles \
16 | --config /data/config-kiirus.json \
17 | --process /data/process-kiirus.lua
18 | else
19 | docker run -it --rm --pull always -v $(pwd):/data \
20 | ghcr.io/systemed/tilemaker:master \
21 | /data/kiirus.osm.pbf \
22 | --output /data/kiirus.pmtiles \
23 | --config /data/config-kiirus.json \
24 | --process /data/process-kiirus.lua
25 | fi
26 |
--------------------------------------------------------------------------------
/process-kiirus.lua:
--------------------------------------------------------------------------------
1 | function way_function()
2 | local highway = Find("highway")
3 |
4 | -- Roads
5 | if highway~="" then
6 |
7 | local class = 0
8 | if highway=="unclassified" or highway=="residential"
9 | or highway=="tertiary" or highway=="living_street"
10 | or highway=="tertiary_link" or highway=="secondary_link"
11 | then class = 1
12 | elseif highway=="secondary" or highway=="primary_link"
13 | or highway=="primary" or highway=="trunk_link" or highway=="trunk"
14 | or highway=="motorway_link" or highway=="motorway"
15 | then class = 2
16 | end
17 |
18 | if class > 0 then
19 | Layer("road", false)
20 | AttributeNumeric("class", class)
21 |
22 | local maxspeed = Find("maxspeed")
23 | local ms_back = Find("maxspeed:backward")
24 | local ms_forward = Find("maxspeed:forward")
25 | if maxspeed=="" then
26 | if ms_back~="" then maxspeed = ms_back
27 | elseif ms_forward~="" then maxspeed = ms_forward
28 | elseif highway=="living_street" then maxspeed = "20"
29 | end
30 | end
31 | AttributeNumeric("maxspeed", tonumber(maxspeed) or 0)
32 |
33 | -- ...and road names
34 | local name = Find("name")
35 | if name~="" then
36 | Layer("road_name", false)
37 | AttributeNumeric("class", class)
38 | Attribute("name", name)
39 | end
40 | end
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Tallinna kiirusepiirangud
6 |
7 |
8 |
9 |
10 |
11 |
26 |
27 |
28 |
29 |
30 |
■ üle 50
31 |
■ 50
32 |
■ 40
33 |
■ 30
34 |
■ kuni 20
35 |
■ teadmatu
36 |
37 |
38 |
39 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/positron.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 8,
3 | "metadata": {"maputnik:renderer": "mlgljs"},
4 | "sources": {
5 | "ne2_shaded": {
6 | "maxzoom": 6,
7 | "tileSize": 256,
8 | "tiles": [
9 | "https://tiles.openfreemap.org/natural_earth/ne2sr/{z}/{x}/{y}.png"
10 | ],
11 | "type": "raster"
12 | },
13 | "openmaptiles": {
14 | "type": "vector",
15 | "url": "https://tiles.openfreemap.org/planet"
16 | }
17 | },
18 | "sprite": "https://tiles.openfreemap.org/sprites/ofm_f384/ofm",
19 | "glyphs": "https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",
20 | "layers": [
21 | {
22 | "id": "background",
23 | "type": "background",
24 | "paint": {"background-color": "rgb(242,243,240)"}
25 | },
26 | {
27 | "id": "park",
28 | "type": "fill",
29 | "source": "openmaptiles",
30 | "source-layer": "park",
31 | "filter": ["==", ["geometry-type"], "Polygon"],
32 | "paint": {"fill-color": "rgb(230, 233, 229)"}
33 | },
34 | {
35 | "id": "water",
36 | "type": "fill",
37 | "source": "openmaptiles",
38 | "source-layer": "water",
39 | "filter": [
40 | "all",
41 | ["==", ["geometry-type"], "Polygon"],
42 | ["!=", ["get", "brunnel"], "tunnel"]
43 | ],
44 | "paint": {"fill-antialias": true, "fill-color": "rgb(194, 200, 202)"}
45 | },
46 | {
47 | "id": "landcover_ice_shelf",
48 | "type": "fill",
49 | "source": "openmaptiles",
50 | "source-layer": "landcover",
51 | "maxzoom": 8,
52 | "filter": [
53 | "all",
54 | ["==", ["geometry-type"], "Polygon"],
55 | ["==", ["get", "subclass"], "ice_shelf"]
56 | ],
57 | "paint": {"fill-color": "hsl(0,0%,98%)", "fill-opacity": 0.7}
58 | },
59 | {
60 | "id": "landcover_glacier",
61 | "type": "fill",
62 | "source": "openmaptiles",
63 | "source-layer": "landcover",
64 | "maxzoom": 8,
65 | "filter": [
66 | "all",
67 | ["==", ["geometry-type"], "Polygon"],
68 | ["==", ["get", "subclass"], "glacier"]
69 | ],
70 | "paint": {
71 | "fill-color": "hsl(0,0%,98%)",
72 | "fill-opacity": ["interpolate", ["linear"], ["zoom"], 0, 1, 8, 0.5]
73 | }
74 | },
75 | {
76 | "id": "landuse_residential",
77 | "type": "fill",
78 | "source": "openmaptiles",
79 | "source-layer": "landuse",
80 | "maxzoom": 16,
81 | "filter": [
82 | "all",
83 | ["==", ["geometry-type"], "Polygon"],
84 | ["==", ["get", "class"], "residential"]
85 | ],
86 | "paint": {
87 | "fill-color": "rgb(234, 234, 230)",
88 | "fill-opacity": [
89 | "interpolate",
90 | ["exponential", 0.6],
91 | ["zoom"],
92 | 8,
93 | 0.8,
94 | 9,
95 | 0.6
96 | ]
97 | }
98 | },
99 | {
100 | "id": "landcover_wood",
101 | "type": "fill",
102 | "source": "openmaptiles",
103 | "source-layer": "landcover",
104 | "minzoom": 10,
105 | "filter": [
106 | "all",
107 | ["==", ["geometry-type"], "Polygon"],
108 | ["==", ["get", "class"], "wood"]
109 | ],
110 | "paint": {
111 | "fill-color": "rgb(220,224,220)",
112 | "fill-opacity": ["interpolate", ["linear"], ["zoom"], 8, 0, 12, 1]
113 | }
114 | },
115 | {
116 | "id": "waterway",
117 | "type": "line",
118 | "source": "openmaptiles",
119 | "source-layer": "waterway",
120 | "filter": ["==", ["geometry-type"], "LineString"],
121 | "paint": {"line-color": "hsl(195,17%,78%)"}
122 | },
123 | {
124 | "id": "building",
125 | "type": "fill",
126 | "source": "openmaptiles",
127 | "source-layer": "building",
128 | "minzoom": 12,
129 | "paint": {
130 | "fill-antialias": true,
131 | "fill-color": "rgb(234, 234, 229)",
132 | "fill-outline-color": "rgb(219, 219, 218)"
133 | }
134 | },
135 | {
136 | "id": "tunnel_motorway_casing",
137 | "type": "line",
138 | "source": "openmaptiles",
139 | "source-layer": "transportation",
140 | "minzoom": 6,
141 | "filter": [
142 | "all",
143 | ["==", ["geometry-type"], "LineString"],
144 | [
145 | "all",
146 | ["==", ["get", "brunnel"], "tunnel"],
147 | ["==", ["get", "class"], "motorway"]
148 | ]
149 | ],
150 | "layout": {"line-cap": "butt", "line-join": "miter"},
151 | "paint": {
152 | "line-color": "rgb(213, 213, 213)",
153 | "line-opacity": 1,
154 | "line-width": [
155 | "interpolate",
156 | ["exponential", 1.4],
157 | ["zoom"],
158 | 5.8,
159 | 0,
160 | 6,
161 | 3,
162 | 20,
163 | 40
164 | ]
165 | }
166 | },
167 | {
168 | "id": "tunnel_motorway_inner",
169 | "type": "line",
170 | "source": "openmaptiles",
171 | "source-layer": "transportation",
172 | "minzoom": 6,
173 | "filter": [
174 | "all",
175 | ["==", ["geometry-type"], "LineString"],
176 | [
177 | "all",
178 | ["==", ["get", "brunnel"], "tunnel"],
179 | ["==", ["get", "class"], "motorway"]
180 | ]
181 | ],
182 | "layout": {"line-cap": "round", "line-join": "round"},
183 | "paint": {
184 | "line-color": "rgb(234,234,234)",
185 | "line-width": [
186 | "interpolate",
187 | ["exponential", 1.4],
188 | ["zoom"],
189 | 4,
190 | 2,
191 | 6,
192 | 1.3,
193 | 20,
194 | 30
195 | ]
196 | }
197 | },
198 | {
199 | "id": "aeroway-taxiway",
200 | "type": "line",
201 | "source": "openmaptiles",
202 | "source-layer": "aeroway",
203 | "minzoom": 12,
204 | "filter": ["match", ["get", "class"], ["taxiway"], true, false],
205 | "layout": {"line-cap": "round", "line-join": "round"},
206 | "paint": {
207 | "line-color": "hsl(0,0%,88%)",
208 | "line-opacity": 1,
209 | "line-width": [
210 | "interpolate",
211 | ["exponential", 1.55],
212 | ["zoom"],
213 | 13,
214 | 1.8,
215 | 20,
216 | 20
217 | ]
218 | }
219 | },
220 | {
221 | "id": "aeroway-runway-casing",
222 | "type": "line",
223 | "source": "openmaptiles",
224 | "source-layer": "aeroway",
225 | "minzoom": 11,
226 | "filter": ["match", ["get", "class"], ["runway"], true, false],
227 | "layout": {"line-cap": "round", "line-join": "round"},
228 | "paint": {
229 | "line-color": "hsl(0,0%,88%)",
230 | "line-opacity": 1,
231 | "line-width": [
232 | "interpolate",
233 | ["exponential", 1.5],
234 | ["zoom"],
235 | 11,
236 | 6,
237 | 17,
238 | 55
239 | ]
240 | }
241 | },
242 | {
243 | "id": "aeroway-area",
244 | "type": "fill",
245 | "source": "openmaptiles",
246 | "source-layer": "aeroway",
247 | "minzoom": 4,
248 | "filter": [
249 | "all",
250 | ["==", ["geometry-type"], "Polygon"],
251 | ["match", ["get", "class"], ["runway", "taxiway"], true, false]
252 | ],
253 | "paint": {
254 | "fill-color": "rgba(255, 255, 255, 1)",
255 | "fill-opacity": ["interpolate", ["linear"], ["zoom"], 13, 0, 14, 1]
256 | }
257 | },
258 | {
259 | "id": "aeroway-runway",
260 | "type": "line",
261 | "source": "openmaptiles",
262 | "source-layer": "aeroway",
263 | "minzoom": 11,
264 | "filter": [
265 | "all",
266 | ["match", ["get", "class"], ["runway"], true, false],
267 | ["==", ["geometry-type"], "LineString"]
268 | ],
269 | "layout": {"line-cap": "round", "line-join": "round"},
270 | "paint": {
271 | "line-color": "rgba(255, 255, 255, 1)",
272 | "line-opacity": 1,
273 | "line-width": [
274 | "interpolate",
275 | ["exponential", 1.5],
276 | ["zoom"],
277 | 11,
278 | 4,
279 | 17,
280 | 50
281 | ]
282 | }
283 | },
284 | {
285 | "id": "road_area_pier",
286 | "type": "fill",
287 | "source": "openmaptiles",
288 | "source-layer": "transportation",
289 | "filter": [
290 | "all",
291 | ["==", ["geometry-type"], "Polygon"],
292 | ["==", ["get", "class"], "pier"]
293 | ],
294 | "paint": {"fill-antialias": true, "fill-color": "rgb(242,243,240)"}
295 | },
296 | {
297 | "id": "road_pier",
298 | "type": "line",
299 | "source": "openmaptiles",
300 | "source-layer": "transportation",
301 | "filter": [
302 | "all",
303 | ["==", ["geometry-type"], "LineString"],
304 | ["match", ["get", "class"], ["pier"], true, false]
305 | ],
306 | "layout": {"line-cap": "round", "line-join": "round"},
307 | "paint": {
308 | "line-color": "rgb(242,243,240)",
309 | "line-width": [
310 | "interpolate",
311 | ["exponential", 1.2],
312 | ["zoom"],
313 | 15,
314 | 1,
315 | 17,
316 | 4
317 | ]
318 | }
319 | },
320 | {
321 | "id": "highway_path",
322 | "type": "line",
323 | "source": "openmaptiles",
324 | "source-layer": "transportation",
325 | "filter": [
326 | "all",
327 | ["==", ["geometry-type"], "LineString"],
328 | ["==", ["get", "class"], "path"]
329 | ],
330 | "layout": {"line-cap": "round", "line-join": "round"},
331 | "paint": {
332 | "line-color": "rgb(234, 234, 234)",
333 | "line-opacity": 0.9,
334 | "line-width": [
335 | "interpolate",
336 | ["exponential", 1.2],
337 | ["zoom"],
338 | 13,
339 | 1,
340 | 20,
341 | 10
342 | ]
343 | }
344 | },
345 | {
346 | "id": "highway_minor",
347 | "type": "line",
348 | "source": "openmaptiles",
349 | "source-layer": "transportation",
350 | "minzoom": 8,
351 | "filter": [
352 | "all",
353 | ["==", ["geometry-type"], "LineString"],
354 | ["match", ["get", "class"], ["minor", "service", "track"], true, false]
355 | ],
356 | "layout": {"line-cap": "round", "line-join": "round"},
357 | "paint": {
358 | "line-color": "hsl(0,0%,88%)",
359 | "line-opacity": 0.9,
360 | "line-width": [
361 | "interpolate",
362 | ["exponential", 1.55],
363 | ["zoom"],
364 | 13,
365 | 1.8,
366 | 20,
367 | 20
368 | ]
369 | }
370 | },
371 | {
372 | "id": "highway_major_casing",
373 | "type": "line",
374 | "source": "openmaptiles",
375 | "source-layer": "transportation",
376 | "minzoom": 11,
377 | "filter": [
378 | "all",
379 | ["==", ["geometry-type"], "LineString"],
380 | [
381 | "match",
382 | ["get", "class"],
383 | ["primary", "secondary", "tertiary", "trunk"],
384 | true,
385 | false
386 | ]
387 | ],
388 | "layout": {"line-cap": "butt", "line-join": "miter"},
389 | "paint": {
390 | "line-color": "rgb(213, 213, 213)",
391 | "line-dasharray": [12, 0],
392 | "line-width": [
393 | "interpolate",
394 | ["exponential", 1.3],
395 | ["zoom"],
396 | 10,
397 | 3,
398 | 20,
399 | 23
400 | ]
401 | }
402 | },
403 | {
404 | "id": "highway_major_inner",
405 | "type": "line",
406 | "source": "openmaptiles",
407 | "source-layer": "transportation",
408 | "minzoom": 11,
409 | "filter": [
410 | "all",
411 | ["==", ["geometry-type"], "LineString"],
412 | [
413 | "match",
414 | ["get", "class"],
415 | ["primary", "secondary", "tertiary", "trunk"],
416 | true,
417 | false
418 | ]
419 | ],
420 | "layout": {"line-cap": "round", "line-join": "round"},
421 | "paint": {
422 | "line-color": "#fff",
423 | "line-width": [
424 | "interpolate",
425 | ["exponential", 1.3],
426 | ["zoom"],
427 | 10,
428 | 2,
429 | 20,
430 | 20
431 | ]
432 | }
433 | },
434 | {
435 | "id": "highway_major_subtle",
436 | "type": "line",
437 | "source": "openmaptiles",
438 | "source-layer": "transportation",
439 | "maxzoom": 11,
440 | "filter": [
441 | "all",
442 | ["==", ["geometry-type"], "LineString"],
443 | [
444 | "match",
445 | ["get", "class"],
446 | ["primary", "secondary", "tertiary", "trunk"],
447 | true,
448 | false
449 | ]
450 | ],
451 | "layout": {"line-cap": "round", "line-join": "round"},
452 | "paint": {"line-color": "hsla(0,0%,85%,0.69)", "line-width": 2}
453 | },
454 | {
455 | "id": "highway_motorway_casing",
456 | "type": "line",
457 | "source": "openmaptiles",
458 | "source-layer": "transportation",
459 | "minzoom": 6,
460 | "filter": [
461 | "all",
462 | ["==", ["geometry-type"], "LineString"],
463 | [
464 | "all",
465 | ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true],
466 | ["==", ["get", "class"], "motorway"]
467 | ]
468 | ],
469 | "layout": {"line-cap": "butt", "line-join": "miter"},
470 | "paint": {
471 | "line-color": "rgb(213, 213, 213)",
472 | "line-dasharray": [2, 0],
473 | "line-opacity": 1,
474 | "line-width": [
475 | "interpolate",
476 | ["exponential", 1.4],
477 | ["zoom"],
478 | 5.8,
479 | 0,
480 | 6,
481 | 3,
482 | 20,
483 | 40
484 | ]
485 | }
486 | },
487 | {
488 | "id": "highway_motorway_inner",
489 | "type": "line",
490 | "source": "openmaptiles",
491 | "source-layer": "transportation",
492 | "minzoom": 6,
493 | "filter": [
494 | "all",
495 | ["==", ["geometry-type"], "LineString"],
496 | [
497 | "all",
498 | ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true],
499 | ["==", ["get", "class"], "motorway"]
500 | ]
501 | ],
502 | "layout": {"line-cap": "round", "line-join": "round"},
503 | "paint": {
504 | "line-color": [
505 | "interpolate",
506 | ["linear"],
507 | ["zoom"],
508 | 5.8,
509 | "hsla(0,0%,85%,0.53)",
510 | 6,
511 | "#fff"
512 | ],
513 | "line-width": [
514 | "interpolate",
515 | ["exponential", 1.4],
516 | ["zoom"],
517 | 4,
518 | 2,
519 | 6,
520 | 1.3,
521 | 20,
522 | 30
523 | ]
524 | }
525 | },
526 | {
527 | "id": "highway_motorway_subtle",
528 | "type": "line",
529 | "source": "openmaptiles",
530 | "source-layer": "transportation",
531 | "maxzoom": 6,
532 | "filter": [
533 | "all",
534 | ["==", ["geometry-type"], "LineString"],
535 | ["==", ["get", "class"], "motorway"]
536 | ],
537 | "layout": {"line-cap": "round", "line-join": "round"},
538 | "paint": {
539 | "line-color": "hsla(0,0%,85%,0.53)",
540 | "line-width": [
541 | "interpolate",
542 | ["exponential", 1.4],
543 | ["zoom"],
544 | 4,
545 | 2,
546 | 6,
547 | 1.3
548 | ]
549 | }
550 | },
551 | {
552 | "id": "railway_transit",
553 | "type": "line",
554 | "source": "openmaptiles",
555 | "source-layer": "transportation",
556 | "minzoom": 16,
557 | "filter": [
558 | "all",
559 | ["==", ["geometry-type"], "LineString"],
560 | [
561 | "all",
562 | ["==", ["get", "class"], "transit"],
563 | ["match", ["get", "brunnel"], ["tunnel"], false, true]
564 | ]
565 | ],
566 | "layout": {"line-join": "round"},
567 | "paint": {"line-color": "#dddddd", "line-width": 3}
568 | },
569 | {
570 | "id": "railway_transit_dashline",
571 | "type": "line",
572 | "source": "openmaptiles",
573 | "source-layer": "transportation",
574 | "minzoom": 16,
575 | "filter": [
576 | "all",
577 | ["==", ["geometry-type"], "LineString"],
578 | [
579 | "all",
580 | ["==", ["get", "class"], "transit"],
581 | ["match", ["get", "brunnel"], ["tunnel"], false, true]
582 | ]
583 | ],
584 | "layout": {"line-join": "round"},
585 | "paint": {
586 | "line-color": "#fafafa",
587 | "line-dasharray": [3, 3],
588 | "line-width": 2
589 | }
590 | },
591 | {
592 | "id": "railway_service",
593 | "type": "line",
594 | "source": "openmaptiles",
595 | "source-layer": "transportation",
596 | "minzoom": 16,
597 | "filter": [
598 | "all",
599 | ["==", ["geometry-type"], "LineString"],
600 | ["all", ["==", ["get", "class"], "rail"], ["has", "service"]]
601 | ],
602 | "layout": {"line-join": "round"},
603 | "paint": {"line-color": "#dddddd", "line-width": 3}
604 | },
605 | {
606 | "id": "railway_service_dashline",
607 | "type": "line",
608 | "source": "openmaptiles",
609 | "source-layer": "transportation",
610 | "minzoom": 16,
611 | "filter": [
612 | "all",
613 | ["==", ["geometry-type"], "LineString"],
614 | ["==", ["get", "class"], "rail"],
615 | ["has", "service"]
616 | ],
617 | "layout": {"line-join": "round"},
618 | "paint": {
619 | "line-color": "#fafafa",
620 | "line-dasharray": [3, 3],
621 | "line-width": 2
622 | }
623 | },
624 | {
625 | "id": "railway",
626 | "type": "line",
627 | "source": "openmaptiles",
628 | "source-layer": "transportation",
629 | "minzoom": 13,
630 | "filter": [
631 | "all",
632 | ["==", ["geometry-type"], "LineString"],
633 | ["all", ["!", ["has", "service"]], ["==", ["get", "class"], "rail"]]
634 | ],
635 | "layout": {"line-join": "round"},
636 | "paint": {
637 | "line-color": "#dddddd",
638 | "line-width": [
639 | "interpolate",
640 | ["exponential", 1.3],
641 | ["zoom"],
642 | 16,
643 | 3,
644 | 20,
645 | 7
646 | ]
647 | }
648 | },
649 | {
650 | "id": "railway_dashline",
651 | "type": "line",
652 | "source": "openmaptiles",
653 | "source-layer": "transportation",
654 | "minzoom": 13,
655 | "filter": [
656 | "all",
657 | ["==", ["geometry-type"], "LineString"],
658 | ["all", ["!", ["has", "service"]], ["==", ["get", "class"], "rail"]]
659 | ],
660 | "layout": {"line-join": "round"},
661 | "paint": {
662 | "line-color": "#fafafa",
663 | "line-dasharray": [3, 3],
664 | "line-width": [
665 | "interpolate",
666 | ["exponential", 1.3],
667 | ["zoom"],
668 | 16,
669 | 2,
670 | 20,
671 | 6
672 | ]
673 | }
674 | },
675 | {
676 | "id": "highway_motorway_bridge_casing",
677 | "type": "line",
678 | "source": "openmaptiles",
679 | "source-layer": "transportation",
680 | "minzoom": 6,
681 | "filter": [
682 | "all",
683 | ["==", ["geometry-type"], "LineString"],
684 | [
685 | "all",
686 | ["==", ["get", "brunnel"], "bridge"],
687 | ["==", ["get", "class"], "motorway"]
688 | ]
689 | ],
690 | "layout": {"line-cap": "butt", "line-join": "miter"},
691 | "paint": {
692 | "line-color": "rgb(213, 213, 213)",
693 | "line-dasharray": [2, 0],
694 | "line-opacity": 1,
695 | "line-width": [
696 | "interpolate",
697 | ["exponential", 1.4],
698 | ["zoom"],
699 | 5.8,
700 | 0,
701 | 6,
702 | 5,
703 | 20,
704 | 45
705 | ]
706 | }
707 | },
708 | {
709 | "id": "highway_motorway_bridge_inner",
710 | "type": "line",
711 | "source": "openmaptiles",
712 | "source-layer": "transportation",
713 | "minzoom": 6,
714 | "filter": [
715 | "all",
716 | ["==", ["geometry-type"], "LineString"],
717 | [
718 | "all",
719 | ["==", ["get", "brunnel"], "bridge"],
720 | ["==", ["get", "class"], "motorway"]
721 | ]
722 | ],
723 | "layout": {"line-cap": "round", "line-join": "round"},
724 | "paint": {
725 | "line-color": [
726 | "interpolate",
727 | ["linear"],
728 | ["zoom"],
729 | 5.8,
730 | "hsla(0,0%,85%,0.53)",
731 | 6,
732 | "#fff"
733 | ],
734 | "line-width": [
735 | "interpolate",
736 | ["exponential", 1.4],
737 | ["zoom"],
738 | 4,
739 | 2,
740 | 6,
741 | 1.3,
742 | 20,
743 | 30
744 | ]
745 | }
746 | },
747 | {
748 | "id": "boundary_3",
749 | "type": "line",
750 | "source": "openmaptiles",
751 | "source-layer": "boundary",
752 | "minzoom": 8,
753 | "filter": [
754 | "all",
755 | [">=", ["get", "admin_level"], 3],
756 | ["<=", ["get", "admin_level"], 6],
757 | ["!=", ["get", "maritime"], 1],
758 | ["!=", ["get", "disputed"], 1],
759 | ["!", ["has", "claimed_by"]]
760 | ],
761 | "paint": {
762 | "line-color": "hsl(0,0%,70%)",
763 | "line-dasharray": [1, 1],
764 | "line-width": ["interpolate", ["linear", 1], ["zoom"], 7, 1, 11, 2]
765 | }
766 | },
767 | {
768 | "id": "boundary_2",
769 | "type": "line",
770 | "source": "openmaptiles",
771 | "source-layer": "boundary",
772 | "filter": [
773 | "all",
774 | ["==", ["get", "admin_level"], 2],
775 | ["!=", ["get", "maritime"], 1],
776 | ["!=", ["get", "disputed"], 1],
777 | ["!", ["has", "claimed_by"]]
778 | ],
779 | "layout": {"line-cap": "round", "line-join": "round"},
780 | "paint": {
781 | "line-color": "hsl(0,0%,70%)",
782 | "line-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.4, 4, 1],
783 | "line-width": ["interpolate", ["linear"], ["zoom"], 3, 1, 5, 1.2, 12, 3]
784 | }
785 | },
786 | {
787 | "id": "boundary_disputed",
788 | "type": "line",
789 | "source": "openmaptiles",
790 | "source-layer": "boundary",
791 | "filter": [
792 | "all",
793 | ["!=", ["get", "maritime"], 1],
794 | ["==", ["get", "disputed"], 1]
795 | ],
796 | "paint": {
797 | "line-color": "hsl(0,0%,70%)",
798 | "line-dasharray": [1, 2],
799 | "line-width": ["interpolate", ["linear"], ["zoom"], 3, 1, 5, 1.2, 12, 3]
800 | }
801 | },
802 | {
803 | "id": "waterway_line_label",
804 | "type": "symbol",
805 | "source": "openmaptiles",
806 | "source-layer": "waterway",
807 | "minzoom": 10,
808 | "filter": ["==", ["geometry-type"], "LineString"],
809 | "layout": {
810 | "symbol-placement": "line",
811 | "symbol-spacing": 350,
812 | "text-field": [
813 | "case",
814 | ["has", "name:nonlatin"],
815 | ["concat", ["get", "name:latin"], " ", ["get", "name:nonlatin"]],
816 | ["coalesce", ["get", "name_en"], ["get", "name"]]
817 | ],
818 | "text-font": ["Noto Sans Italic"],
819 | "text-letter-spacing": 0.2,
820 | "text-max-width": 5,
821 | "text-size": 14
822 | },
823 | "paint": {
824 | "text-color": "hsl(0,0%,66%)",
825 | "text-halo-color": "rgba(255,255,255,0.7)",
826 | "text-halo-width": 1.5
827 | }
828 | },
829 | {
830 | "id": "water_name_point_label",
831 | "type": "symbol",
832 | "source": "openmaptiles",
833 | "source-layer": "water_name",
834 | "filter": ["==", ["geometry-type"], "Point"],
835 | "layout": {
836 | "text-field": [
837 | "case",
838 | ["has", "name:nonlatin"],
839 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
840 | ["coalesce", ["get", "name_en"], ["get", "name"]]
841 | ],
842 | "text-font": ["Noto Sans Italic"],
843 | "text-letter-spacing": 0.2,
844 | "text-max-width": 5,
845 | "text-size": ["interpolate", ["linear"], ["zoom"], 0, 10, 8, 14]
846 | },
847 | "paint": {
848 | "text-color": "#495e91",
849 | "text-halo-color": "rgba(255,255,255,0.7)",
850 | "text-halo-width": 1.5
851 | }
852 | },
853 | {
854 | "id": "water_name_line_label",
855 | "type": "symbol",
856 | "source": "openmaptiles",
857 | "source-layer": "water_name",
858 | "filter": ["==", ["geometry-type"], "LineString"],
859 | "layout": {
860 | "symbol-placement": "line",
861 | "symbol-spacing": 350,
862 | "text-field": [
863 | "case",
864 | ["has", "name:nonlatin"],
865 | ["concat", ["get", "name:latin"], " ", ["get", "name:nonlatin"]],
866 | ["coalesce", ["get", "name_en"], ["get", "name"]]
867 | ],
868 | "text-font": ["Noto Sans Italic"],
869 | "text-letter-spacing": 0.2,
870 | "text-max-width": 5,
871 | "text-size": 14
872 | },
873 | "paint": {
874 | "text-color": "#495e91",
875 | "text-halo-color": "rgba(255,255,255,0.7)",
876 | "text-halo-width": 1.5
877 | }
878 | },
879 | {
880 | "id": "highway-name-path",
881 | "type": "symbol",
882 | "source": "openmaptiles",
883 | "source-layer": "transportation_name",
884 | "minzoom": 15.5,
885 | "filter": ["==", ["get", "class"], "path"],
886 | "layout": {
887 | "symbol-placement": "line",
888 | "text-field": [
889 | "case",
890 | ["has", "name:nonlatin"],
891 | ["concat", ["get", "name:latin"], " ", ["get", "name:nonlatin"]],
892 | ["coalesce", ["get", "name_en"], ["get", "name"]]
893 | ],
894 | "text-font": ["Noto Sans Regular"],
895 | "text-rotation-alignment": "map",
896 | "text-size": ["interpolate", ["linear"], ["zoom"], 13, 12, 14, 13]
897 | },
898 | "paint": {
899 | "text-color": "hsl(30,0%,62%)",
900 | "text-halo-color": "#f8f4f0",
901 | "text-halo-width": 0.5
902 | }
903 | },
904 | {
905 | "id": "highway-name-minor",
906 | "type": "symbol",
907 | "source": "openmaptiles",
908 | "source-layer": "transportation_name",
909 | "minzoom": 14,
910 | "filter": [
911 | "all",
912 | ["==", ["geometry-type"], "LineString"],
913 | ["match", ["get", "class"], ["minor", "service", "track"], true, false]
914 | ],
915 | "layout": {
916 | "symbol-placement": "line",
917 | "text-field": [
918 | "case",
919 | ["has", "name:nonlatin"],
920 | ["concat", ["get", "name:latin"], " ", ["get", "name:nonlatin"]],
921 | ["coalesce", ["get", "name_en"], ["get", "name"]]
922 | ],
923 | "text-font": ["Noto Sans Regular"],
924 | "text-rotation-alignment": "map",
925 | "text-size": ["interpolate", ["linear"], ["zoom"], 13, 12, 14, 13]
926 | },
927 | "paint": {
928 | "text-color": "#222",
929 | "text-halo-blur": 0.1,
930 | "text-halo-width": 2,
931 | "text-halo-color": "rgba(255, 255, 255, 0.7)"
932 | }
933 | },
934 | {
935 | "id": "highway-name-major",
936 | "type": "symbol",
937 | "source": "openmaptiles",
938 | "source-layer": "transportation_name",
939 | "minzoom": 11,
940 | "filter": [
941 | "match",
942 | ["get", "class"],
943 | ["primary", "secondary", "tertiary", "trunk"],
944 | true,
945 | false
946 | ],
947 | "layout": {
948 | "symbol-placement": "line",
949 | "text-field": [
950 | "case",
951 | ["has", "name:nonlatin"],
952 | ["concat", ["get", "name:latin"], " ", ["get", "name:nonlatin"]],
953 | ["coalesce", ["get", "name_en"], ["get", "name"]]
954 | ],
955 | "text-font": ["Noto Sans Regular"],
956 | "text-rotation-alignment": "map",
957 | "text-size": ["interpolate", ["linear"], ["zoom"], 13, 12, 14, 13]
958 | },
959 | "paint": {
960 | "text-color": "#222",
961 | "text-halo-blur": 0.1,
962 | "text-halo-width": 2,
963 | "text-halo-color": "rgba(255, 255, 255, 0.7)"
964 | }
965 | },
966 | {
967 | "id": "highway-shield-non-us",
968 | "type": "symbol",
969 | "source": "openmaptiles",
970 | "source-layer": "transportation_name",
971 | "minzoom": 11,
972 | "filter": [
973 | "all",
974 | ["<=", ["get", "ref_length"], 6],
975 | ["==", ["geometry-type"], "LineString"],
976 | [
977 | "match",
978 | ["get", "network"],
979 | ["us-highway", "us-interstate", "us-state"],
980 | false,
981 | true
982 | ]
983 | ],
984 | "layout": {
985 | "icon-image": ["concat", "road_", ["get", "ref_length"]],
986 | "icon-rotation-alignment": "viewport",
987 | "icon-size": 1,
988 | "symbol-placement": ["step", ["zoom"], "point", 11, "line"],
989 | "symbol-spacing": 200,
990 | "text-field": ["to-string", ["get", "ref"]],
991 | "text-font": ["Noto Sans Regular"],
992 | "text-rotation-alignment": "viewport",
993 | "text-size": 10
994 | }
995 | },
996 | {
997 | "id": "highway-shield-us-interstate",
998 | "type": "symbol",
999 | "source": "openmaptiles",
1000 | "source-layer": "transportation_name",
1001 | "minzoom": 11,
1002 | "filter": [
1003 | "all",
1004 | ["<=", ["get", "ref_length"], 6],
1005 | ["==", ["geometry-type"], "LineString"],
1006 | ["match", ["get", "network"], ["us-interstate"], true, false]
1007 | ],
1008 | "layout": {
1009 | "icon-image": [
1010 | "concat",
1011 | ["get", "network"],
1012 | "_",
1013 | ["get", "ref_length"]
1014 | ],
1015 | "icon-rotation-alignment": "viewport",
1016 | "icon-size": 1,
1017 | "symbol-placement": ["step", ["zoom"], "point", 7, "line", 8, "line"],
1018 | "symbol-spacing": 200,
1019 | "text-field": ["to-string", ["get", "ref"]],
1020 | "text-font": ["Noto Sans Regular"],
1021 | "text-rotation-alignment": "viewport",
1022 | "text-size": 10
1023 | }
1024 | },
1025 | {
1026 | "id": "road_shield_us",
1027 | "type": "symbol",
1028 | "source": "openmaptiles",
1029 | "source-layer": "transportation_name",
1030 | "minzoom": 12,
1031 | "filter": [
1032 | "all",
1033 | ["<=", ["get", "ref_length"], 6],
1034 | ["==", ["geometry-type"], "LineString"],
1035 | ["match", ["get", "network"], ["us-highway", "us-state"], true, false]
1036 | ],
1037 | "layout": {
1038 | "icon-image": [
1039 | "concat",
1040 | ["get", "network"],
1041 | "_",
1042 | ["get", "ref_length"]
1043 | ],
1044 | "icon-rotation-alignment": "viewport",
1045 | "icon-size": 1,
1046 | "symbol-placement": ["step", ["zoom"], "point", 11, "line"],
1047 | "symbol-spacing": 200,
1048 | "text-field": ["to-string", ["get", "ref"]],
1049 | "text-font": ["Noto Sans Regular"],
1050 | "text-rotation-alignment": "viewport",
1051 | "text-size": 10
1052 | }
1053 | },
1054 | {
1055 | "id": "airport",
1056 | "type": "symbol",
1057 | "source": "openmaptiles",
1058 | "source-layer": "aerodrome_label",
1059 | "minzoom": 11,
1060 | "filter": ["all", ["has", "iata"]],
1061 | "layout": {
1062 | "icon-image": "airport_11",
1063 | "icon-size": 1,
1064 | "text-anchor": "top",
1065 | "text-field": [
1066 | "case",
1067 | ["has", "name:nonlatin"],
1068 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1069 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1070 | ],
1071 | "text-font": ["Noto Sans Regular"],
1072 | "text-max-width": 9,
1073 | "text-offset": [0, 0.6],
1074 | "text-optional": true,
1075 | "text-padding": 2,
1076 | "text-size": 12
1077 | },
1078 | "paint": {
1079 | "text-color": "#666",
1080 | "text-halo-blur": 0.5,
1081 | "text-halo-color": "#ffffff",
1082 | "text-halo-width": 1
1083 | }
1084 | },
1085 | {
1086 | "id": "label_other",
1087 | "type": "symbol",
1088 | "source": "openmaptiles",
1089 | "source-layer": "place",
1090 | "minzoom": 8,
1091 | "filter": [
1092 | "match",
1093 | ["get", "class"],
1094 | ["city", "continent", "country", "state", "town", "village"],
1095 | false,
1096 | true
1097 | ],
1098 | "layout": {
1099 | "text-field": [
1100 | "case",
1101 | ["has", "name:nonlatin"],
1102 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1103 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1104 | ],
1105 | "text-font": ["Noto Sans Italic"],
1106 | "text-letter-spacing": 0.1,
1107 | "text-max-width": 9,
1108 | "text-size": ["interpolate", ["linear"], ["zoom"], 8, 9, 12, 10],
1109 | "text-transform": "uppercase"
1110 | },
1111 | "paint": {
1112 | "text-color": "#333",
1113 | "text-halo-blur": 1,
1114 | "text-halo-color": "#fff",
1115 | "text-halo-width": 1
1116 | }
1117 | },
1118 | {
1119 | "id": "label_village",
1120 | "type": "symbol",
1121 | "source": "openmaptiles",
1122 | "source-layer": "place",
1123 | "minzoom": 9,
1124 | "filter": ["==", ["get", "class"], "village"],
1125 | "layout": {
1126 | "icon-allow-overlap": true,
1127 | "icon-image": ["step", ["zoom"], "circle_11_black", 10, ""],
1128 | "icon-optional": false,
1129 | "icon-size": 0.2,
1130 | "text-anchor": "bottom",
1131 | "text-field": [
1132 | "case",
1133 | ["has", "name:nonlatin"],
1134 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1135 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1136 | ],
1137 | "text-font": ["Noto Sans Regular"],
1138 | "text-max-width": 8,
1139 | "text-size": [
1140 | "interpolate",
1141 | ["exponential", 1.2],
1142 | ["zoom"],
1143 | 7,
1144 | 10,
1145 | 11,
1146 | 12
1147 | ]
1148 | },
1149 | "paint": {
1150 | "text-color": "#000",
1151 | "text-halo-blur": 1,
1152 | "text-halo-color": "#fff",
1153 | "text-halo-width": 1
1154 | }
1155 | },
1156 | {
1157 | "id": "label_town",
1158 | "type": "symbol",
1159 | "source": "openmaptiles",
1160 | "source-layer": "place",
1161 | "minzoom": 6,
1162 | "filter": ["==", ["get", "class"], "town"],
1163 | "layout": {
1164 | "icon-allow-overlap": true,
1165 | "icon-image": ["step", ["zoom"], "circle_11_black", 10, ""],
1166 | "icon-optional": false,
1167 | "icon-size": 0.2,
1168 | "text-anchor": "bottom",
1169 | "text-field": [
1170 | "case",
1171 | ["has", "name:nonlatin"],
1172 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1173 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1174 | ],
1175 | "text-font": ["Noto Sans Regular"],
1176 | "text-max-width": 8,
1177 | "text-size": [
1178 | "interpolate",
1179 | ["exponential", 1.2],
1180 | ["zoom"],
1181 | 7,
1182 | 12,
1183 | 11,
1184 | 14
1185 | ]
1186 | },
1187 | "paint": {
1188 | "text-color": "#000",
1189 | "text-halo-blur": 1,
1190 | "text-halo-color": "#fff",
1191 | "text-halo-width": 1
1192 | }
1193 | },
1194 | {
1195 | "id": "label_state",
1196 | "type": "symbol",
1197 | "source": "openmaptiles",
1198 | "source-layer": "place",
1199 | "minzoom": 5,
1200 | "maxzoom": 8,
1201 | "filter": ["==", ["get", "class"], "state"],
1202 | "layout": {
1203 | "text-field": [
1204 | "case",
1205 | ["has", "name:nonlatin"],
1206 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1207 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1208 | ],
1209 | "text-font": ["Noto Sans Italic"],
1210 | "text-letter-spacing": 0.2,
1211 | "text-max-width": 9,
1212 | "text-size": ["interpolate", ["linear"], ["zoom"], 5, 10, 8, 14],
1213 | "text-transform": "uppercase"
1214 | },
1215 | "paint": {
1216 | "text-color": "#333",
1217 | "text-halo-blur": 1,
1218 | "text-halo-color": "#fff",
1219 | "text-halo-width": 1
1220 | }
1221 | },
1222 | {
1223 | "id": "label_city",
1224 | "type": "symbol",
1225 | "source": "openmaptiles",
1226 | "source-layer": "place",
1227 | "minzoom": 3,
1228 | "filter": [
1229 | "all",
1230 | ["==", ["get", "class"], "city"],
1231 | ["!=", ["get", "capital"], 2]
1232 | ],
1233 | "layout": {
1234 | "icon-allow-overlap": true,
1235 | "icon-image": ["step", ["zoom"], "circle_11_black", 9, ""],
1236 | "icon-optional": false,
1237 | "icon-size": 0.4,
1238 | "text-anchor": "bottom",
1239 | "text-field": [
1240 | "case",
1241 | ["has", "name:nonlatin"],
1242 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1243 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1244 | ],
1245 | "text-font": ["Noto Sans Regular"],
1246 | "text-max-width": 8,
1247 | "text-offset": [0, -0.1],
1248 | "text-size": [
1249 | "interpolate",
1250 | ["exponential", 1.2],
1251 | ["zoom"],
1252 | 4,
1253 | 11,
1254 | 7,
1255 | 13,
1256 | 11,
1257 | 18
1258 | ]
1259 | },
1260 | "paint": {
1261 | "text-color": "#000",
1262 | "text-halo-blur": 1,
1263 | "text-halo-color": "#fff",
1264 | "text-halo-width": 1
1265 | }
1266 | },
1267 | {
1268 | "id": "label_city_capital",
1269 | "type": "symbol",
1270 | "source": "openmaptiles",
1271 | "source-layer": "place",
1272 | "minzoom": 3,
1273 | "filter": [
1274 | "all",
1275 | ["==", ["get", "class"], "city"],
1276 | ["==", ["get", "capital"], 2]
1277 | ],
1278 | "layout": {
1279 | "icon-allow-overlap": true,
1280 | "icon-image": ["step", ["zoom"], "circle_11_black", 9, ""],
1281 | "icon-optional": false,
1282 | "icon-size": 0.5,
1283 | "text-anchor": "bottom",
1284 | "text-field": [
1285 | "case",
1286 | ["has", "name:nonlatin"],
1287 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1288 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1289 | ],
1290 | "text-font": ["Noto Sans Bold"],
1291 | "text-max-width": 8,
1292 | "text-offset": [0, -0.2],
1293 | "text-size": [
1294 | "interpolate",
1295 | ["exponential", 1.2],
1296 | ["zoom"],
1297 | 4,
1298 | 12,
1299 | 7,
1300 | 14,
1301 | 11,
1302 | 20
1303 | ]
1304 | },
1305 | "paint": {
1306 | "text-color": "#000",
1307 | "text-halo-blur": 1,
1308 | "text-halo-color": "#fff",
1309 | "text-halo-width": 1
1310 | }
1311 | },
1312 | {
1313 | "id": "label_country_3",
1314 | "type": "symbol",
1315 | "source": "openmaptiles",
1316 | "source-layer": "place",
1317 | "minzoom": 2,
1318 | "maxzoom": 9,
1319 | "filter": [
1320 | "all",
1321 | ["==", ["get", "class"], "country"],
1322 | [">=", ["get", "rank"], 3]
1323 | ],
1324 | "layout": {
1325 | "text-field": [
1326 | "case",
1327 | ["has", "name:nonlatin"],
1328 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1329 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1330 | ],
1331 | "text-font": ["Noto Sans Bold"],
1332 | "text-max-width": 6.25,
1333 | "text-size": ["interpolate", ["linear"], ["zoom"], 3, 9, 7, 17]
1334 | },
1335 | "paint": {
1336 | "text-color": "#000",
1337 | "text-halo-blur": 1,
1338 | "text-halo-color": "#fff",
1339 | "text-halo-width": 1
1340 | }
1341 | },
1342 | {
1343 | "id": "label_country_2",
1344 | "type": "symbol",
1345 | "source": "openmaptiles",
1346 | "source-layer": "place",
1347 | "maxzoom": 9,
1348 | "filter": [
1349 | "all",
1350 | ["==", ["get", "class"], "country"],
1351 | ["==", ["get", "rank"], 2]
1352 | ],
1353 | "layout": {
1354 | "text-field": [
1355 | "case",
1356 | ["has", "name:nonlatin"],
1357 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1358 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1359 | ],
1360 | "text-font": ["Noto Sans Bold"],
1361 | "text-max-width": 6.25,
1362 | "text-size": ["interpolate", ["linear"], ["zoom"], 2, 9, 5, 17]
1363 | },
1364 | "paint": {
1365 | "text-color": "#000",
1366 | "text-halo-blur": 1,
1367 | "text-halo-color": "#fff",
1368 | "text-halo-width": 1
1369 | }
1370 | },
1371 | {
1372 | "id": "label_country_1",
1373 | "type": "symbol",
1374 | "source": "openmaptiles",
1375 | "source-layer": "place",
1376 | "maxzoom": 9,
1377 | "filter": [
1378 | "all",
1379 | ["==", ["get", "class"], "country"],
1380 | ["==", ["get", "rank"], 1]
1381 | ],
1382 | "layout": {
1383 | "text-field": [
1384 | "case",
1385 | ["has", "name:nonlatin"],
1386 | ["concat", ["get", "name:latin"], "\n", ["get", "name:nonlatin"]],
1387 | ["coalesce", ["get", "name_en"], ["get", "name"]]
1388 | ],
1389 | "text-font": ["Noto Sans Bold"],
1390 | "text-max-width": 6.25,
1391 | "text-size": ["interpolate", ["linear"], ["zoom"], 1, 9, 4, 17]
1392 | },
1393 | "paint": {
1394 | "text-color": "#000",
1395 | "text-halo-blur": 1,
1396 | "text-halo-color": "#fff",
1397 | "text-halo-width": 1
1398 | }
1399 | }
1400 | ],
1401 | "id": "6752yec"
1402 | }
--------------------------------------------------------------------------------