Offline-capable geomap, meant for storing location bookmarks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: continue cleaning up layers

+116 -231
+34 -34
docs/layers.md
··· 8 8 Two tilemaker pipelines produce PMTiles, both emitting an 9 9 OpenMapTiles-compatible schema: 10 10 11 - | Pipeline | Config | Processor | Zoom | Output | 12 - | --------------- | ----------------------------------------------- | ------------------ | ---- | ------------------------ | 13 - | World overview | `data/cli/shared/tilemaker/config.world.json` | `process.world.lua`| 0–9 | single global PMTiles | 14 - | Regional detail | `data/cli/shared/tilemaker/config.json` | `process.lua` | 0–14 | per-region PMTiles | 11 + | Pipeline | Config | Processor | Zoom | Output | 12 + | --------------- | --------------------------------------------- | ------------------- | ---- | --------------------- | 13 + | World overview | `data/cli/shared/tilemaker/config.world.json` | `process.world.lua` | 0–9 | single global PMTiles | 14 + | Regional detail | `data/cli/shared/tilemaker/config.json` | `process.lua` | 0–14 | per-region PMTiles | 15 15 16 16 Regional pipelines extract full OSM detail. The world pipeline is a 17 17 deliberately stripped subset — no buildings, housenumbers, POIs, aeroways, or ··· 39 39 40 40 ### Regional (`config.json`) 41 41 42 - | Source-layer | Zoom | Notes | 43 - | --------------------- | ------- | ------------------------------------------------- | 44 - | `place` | 0–14 | country, city, town, suburb, quarter, neighbourhood | 45 - | `boundary` | 0–14 | admin_level 2–8 | 46 - | `water` | 6–14 | lakes, rivers, reservoirs | 47 - | `ocean` | 0–14 | written into `water` | 48 - | `waterway` | 8–14 | named rivers (+ `waterway_detail` z12–14) | 49 - | `landcover` | 0–14 | grass, wood, sand, ice, farmland | 50 - | `landuse` | 4–14 | residential only | 51 - | `park` | 11–14 | national_park, nature_reserve | 52 - | `transportation` | 4–14 | roads, rail, ferry, pier, aerialway | 53 - | `transportation_name` | 8–14 | road + rail names | 54 - | `aeroway` | 11–14 | runways, taxiways | 55 - | `aerodrome_label` | 10–14 | | 56 - | `building` | 12–14 | | 57 - | `housenumber` | 14 | | 58 - | `poi` / `poi_detail` | 12–14 | `poi_detail` (rank 5+) written into `poi` | 42 + | Source-layer | Zoom | Notes | 43 + | --------------------- | ----- | --------------------------------------------------- | 44 + | `place` | 0–14 | country, city, town, suburb, quarter, neighbourhood | 45 + | `boundary` | 0–14 | admin_level 2–8 | 46 + | `water` | 6–14 | lakes, rivers, reservoirs | 47 + | `ocean` | 0–14 | written into `water` | 48 + | `waterway` | 8–14 | named rivers (+ `waterway_detail` z12–14) | 49 + | `landcover` | 0–14 | grass, wood, sand, ice, farmland | 50 + | `landuse` | 4–14 | residential only | 51 + | `park` | 11–14 | national_park, nature_reserve | 52 + | `transportation` | 4–14 | roads, rail, ferry, pier, aerialway | 53 + | `transportation_name` | 8–14 | road + rail names | 54 + | `aeroway` | 11–14 | runways, taxiways | 55 + | `aerodrome_label` | 10–14 | | 56 + | `building` | 12–14 | | 57 + | `housenumber` | 14 | | 58 + | `poi` / `poi_detail` | 12–14 | `poi_detail` (rank 5+) written into `poi` | 59 59 60 60 ### World (`config.world.json`) 61 61 62 - | Source-layer | Zoom | Notes | 63 - | ------------ | ----- | ----------------------------------------- | 64 - | `place` | 0–9 | continent through village | 65 - | `boundary` | 0–9 | | 66 - | `water` | 4–9 | inland water | 67 - | `ocean` | 0–9 | loaded from coastline shapefile → `water` | 68 - | `waterway` | 8–9 | named rivers only | 69 - | `landcover` | 0–9 | grass, wood, wetland, sand, rock, ice | 70 - | `park` | 7–9 | | 62 + | Source-layer | Zoom | Notes | 63 + | ------------ | ---- | ----------------------------------------- | 64 + | `place` | 0–9 | continent through village | 65 + | `boundary` | 0–9 | | 66 + | `water` | 4–9 | inland water | 67 + | `ocean` | 0–9 | loaded from coastline shapefile → `water` | 68 + | `waterway` | 8–9 | named rivers only | 69 + | `landcover` | 0–9 | grass, wood, wetland, sand, rock, ice | 70 + | `park` | 7–9 | | 71 71 72 72 Intentionally omitted from world: transportation (all roads/rail/ferry), 73 73 buildings, housenumbers, POIs, aeroways, landuse, mountain peaks. ··· 176 176 177 177 Country and settlement labels hand off cleanly instead of overlapping: 178 178 179 - | Label | World | Regional | 180 - | ---------- | ------------------------------ | -------------------------------- | 181 - | country | `place-country` z0–6 | `country_label` z7–11 | 182 - | settlement | `place-settlement` z6–10 | `place_label` z11–15 | 179 + | Label | World | Regional | 180 + | ---------- | ------------------------ | --------------------- | 181 + | country | `place-country` z0–6 | `country_label` z7–11 | 182 + | settlement | `place-settlement` z6–10 | `place_label` z11–15 | 183 183 184 184 The regional layer's `minzoom` is set to the same value as the world layer's 185 185 `maxzoom` (exclusive), so there is no zoom at which both render. The tradeoff:
+82 -197
www/utils/layers.ts
··· 7 7 const LINE = ['==', '$type', 'LineString'] 8 8 const POLYGON = ['==', '$type', 'Polygon'] 9 9 const MINOR_ROAD = ['minor', 'primary', 'secondary', 'tertiary', 'trunk'] 10 + const MATCH = ['match', ['get', 'class']] 10 11 11 - const ELEVEN_SIXTEEN = { 'base': 1, 'stops': [[8, 0], [16, 1]] } 12 + const FONT_MED = ['literal', ['Noto Sans Medium']] 13 + const FONT_REG = ['literal', ['Noto Sans Regular']] 12 14 13 - const BLUE = 'hsl(205, 56%, 73%)' 14 - const BLUE_GRAY = 'hsl(47, 26%, 88%)' 15 + const BLACK = 'hsl(0, 0%, 0%)' 16 + const WHITE = 'hsl(0, 0%, 100%)' 17 + const COLOR_WATER = 'hsl(205, 56%, 73%)' 18 + const COLOR_ICE = 'hsl(47, 26%, 88%)' 19 + const COLOR_ICE_2 = 'hsl(47, 22%, 94%)' 20 + const COLOR_GRASS = 'hsl(82, 46%, 72%)' 21 + const COLOR_GRASS_2 = 'hsl(70, 60%, 81%)' 22 + const COLOR_RAIL = 'hsl(34, 12%, 66%)' 23 + const COLOR_SAND = 'hsl(54, 81%, 53%)' 15 24 const WATER_LINE = { 16 - 'line-color': BLUE, 25 + 'line-color': COLOR_WATER, 17 26 'line-opacity': 1, 18 27 'line-width': { 'base': 1.4, 'stops': [[8, 1], [20, 8]] }, 19 28 } ··· 41 50 ['literal', ['grass', 'wood', 'sand']], 42 51 ], 43 52 'paint': { 44 - 'fill-color': [ 45 - 'match', 46 - ['get', 'class'], 47 - 'sand', 48 - 'rgba(232, 214, 38, 1)', 49 - 'hsl(82, 46%, 72%)', 50 - ], 53 + 'fill-color': [...MATCH, 'sand', COLOR_SAND, COLOR_GRASS], 51 54 'fill-opacity': [ 52 55 'interpolate', 53 56 ['linear'], 54 57 ['zoom'], 55 58 8, 56 - ['match', ['get', 'class'], 'grass', 0.45, 'wood', 0.6, 0.3], 59 + [...MATCH, 'grass', 0.45, 'wood', 0.6, 0.3], 57 60 22, 58 - ['match', ['get', 'class'], 'grass', 0.45, 'wood', 1, 0.3], 61 + [...MATCH, 'grass', 0.45, 'wood', 1, 0.3], 59 62 ], 60 63 }, 61 64 }, ··· 66 69 'source-layer': 'water', 67 70 'filter': [ALL, POLYGON, ['!=', 'brunnel', 'tunnel']], 68 71 'paint': { 69 - 'fill-color': BLUE, 72 + 'fill-color': COLOR_WATER, 70 73 'fill-opacity': ['case', ['==', ['get', 'intermittent'], 1], 0.7, 1], 71 74 }, 72 75 }, ··· 77 80 'source-layer': 'landcover', 78 81 'filter': ['==', 'subclass', 'ice_shelf'], 79 82 'layout': { 'visibility': 'visible' }, 80 - 'paint': { 'fill-color': BLUE_GRAY, 'fill-opacity': 0.8 }, 83 + 'paint': { 'fill-color': COLOR_ICE, 'fill-opacity': 0.8 }, 81 84 }, 82 85 { 83 86 'id': `${sourceName}-landcover-glacier`, ··· 87 90 'filter': ['==', 'subclass', 'glacier'], 88 91 'layout': { 'visibility': 'visible' }, 89 92 'paint': { 90 - 'fill-color': 'hsl(47, 22%, 94%)', 93 + 'fill-color': COLOR_ICE_2, 91 94 'fill-opacity': { 'base': 1, 'stops': [[0, 1], [8, 0.5]] }, 92 95 }, 93 96 }, ··· 107 110 'source-layer': 'park', 108 111 'filter': ['in', 'class', 'national_park', 'nature_reserve'], 109 112 'paint': { 110 - 'fill-color': '#E1EBB0', 113 + 'fill-color': COLOR_GRASS_2, 111 114 'fill-opacity': { 'base': 1, 'stops': [[11, 0], [13, 0.75]] }, 112 115 }, 113 116 }, ··· 119 122 'filter': [ALL, LINE, ['==', 'brunnel', 'tunnel']], 120 123 'layout': { 'visibility': 'visible' }, 121 124 'paint': { 122 - 'line-color': BLUE, 125 + 'line-color': COLOR_WATER, 123 126 'line-dasharray': [3, 3], 124 127 'line-gap-width': { 'stops': [[12, 0], [20, 6]] }, 125 128 'line-opacity': 1, ··· 168 171 ], 169 172 'layout': { 'line-cap': 'butt', 'line-join': 'miter' }, 170 173 'paint': { 171 - 'line-color': 'hsl(34, 12%, 66%)', 174 + 'line-color': COLOR_RAIL, 172 175 'line-dasharray': [3, 3], 173 - 'line-opacity': ELEVEN_SIXTEEN, 176 + 'line-opacity': { 'base': 1, 'stops': [[8, 0], [16, 1]] }, 174 177 }, 175 178 }, 176 179 { ··· 213 216 'minzoom': 13, 214 217 'filter': [ALL, POLYGON, ['==', 'class', 'pier']], 215 218 'layout': { 'visibility': 'visible' }, 216 - 'paint': { 'fill-antialias': true, 'fill-color': BLUE_GRAY }, 219 + 'paint': { 'fill-antialias': true, 'fill-color': COLOR_ICE }, 217 220 }, 218 221 { 219 222 'id': `${sourceName}-road_pier`, ··· 225 228 'filter': [ALL, LINE, ['in', 'class', 'pier']], 226 229 'layout': { 'line-cap': 'round', 'line-join': 'round' }, 227 230 'paint': { 228 - 'line-color': BLUE_GRAY, 231 + 'line-color': COLOR_ICE, 229 232 'line-width': { 'base': 1.2, 'stops': [[15, 1], [17, 4]] }, 230 233 }, 231 234 }, ··· 235 238 'source': sourceName, 236 239 'source-layer': 'transportation', 237 240 'minzoom': 12, 238 - 'filter': [ 239 - ALL, 240 - POLYGON, 241 - ['in', 'brunnel', 'bridge'], 242 - ], 241 + 'filter': [ALL, POLYGON, ['in', 'brunnel', 'bridge']], 243 242 'layout': {}, 244 - 'paint': { 'fill-color': BLUE_GRAY, 'fill-opacity': 0.5 }, 243 + 'paint': { 'fill-color': COLOR_ICE, 'fill-opacity': 0.5 }, 245 244 }, 246 245 { 247 246 'id': `${sourceName}-road_path`, ··· 269 268 ], 270 269 'layout': { 'line-cap': 'butt', 'line-join': 'miter' }, 271 270 'paint': { 272 - 'line-color': [ 273 - 'match', 274 - ['get', 'class'], 275 - 'minor', 276 - '#efefef', 277 - '#fff', 278 - ], 271 + 'line-color': [...MATCH, 'minor', '#efefef', WHITE], 279 272 'line-dasharray': [0.28, 0.14], 280 273 'line-width': { 'base': 1.4, 'stops': [[6, 0.5], [20, 30]] }, 281 274 }, ··· 287 280 'source': sourceName, 288 281 'source-layer': 'aeroway', 289 282 'minzoom': 4, 290 - 'filter': [ 291 - ALL, 292 - POLYGON, 293 - ['in', 'class', 'runway', 'taxiway'], 294 - ], 283 + 'filter': [ALL, POLYGON, ['in', 'class', 'runway', 'taxiway']], 295 284 'layout': { 'visibility': 'visible' }, 296 285 'paint': { 297 - 'fill-color': 'rgba(255, 255, 255, 1)', 286 + 'fill-color': WHITE, 298 287 'fill-opacity': { 'base': 1, 'stops': [[13, 0], [14, 1]] }, 299 288 }, 300 289 }, ··· 312 301 'visibility': 'visible', 313 302 }, 314 303 'paint': { 315 - 'line-color': 'rgba(255, 255, 255, 1)', 304 + 'line-color': WHITE, 316 305 'line-opacity': 1, 317 306 'line-width': { 'base': 1.5, 'stops': [[12, 1], [17, 10]] }, 318 307 }, ··· 324 313 'source': sourceName, 325 314 'source-layer': 'aeroway', 326 315 'minzoom': 4, 327 - 'filter': [ 328 - ALL, 329 - ['in', 'class', 'runway'], 330 - LINE, 331 - ], 316 + 'filter': [ALL, ['in', 'class', 'runway'], LINE], 332 317 'layout': { 333 318 'line-cap': 'round', 334 319 'line-join': 'round', 335 320 'visibility': 'visible', 336 321 }, 337 322 'paint': { 338 - 'line-color': 'rgba(255, 255, 255, 1)', 323 + 'line-color': WHITE, 339 324 'line-opacity': 1, 340 325 'line-width': { 'base': 1.5, 'stops': [[11, 4], [17, 50]] }, 341 326 }, ··· 351 336 'filter': [ 352 337 ALL, 353 338 LINE, 354 - [ 355 - 'in', 356 - 'class', 357 - 'motorway', 358 - 'trunk', 359 - 'primary', 360 - 'secondary', 361 - 'tertiary', 362 - 'minor', 363 - 'service', 364 - ], 339 + ['in', 'class', 'motorway', 'service', ...MINOR_ROAD], 365 340 ['!has', 'brunnel'], 366 341 ], 367 342 'layout': { 'line-cap': 'round', 'line-join': 'round' }, 368 343 'paint': { 369 - 'line-color': '#fff', 344 + 'line-color': WHITE, 370 345 'line-opacity': [ 371 346 'interpolate', 372 347 ['linear'], 373 348 ['zoom'], 374 349 12, 375 - ['match', ['get', 'class'], 'tertiary', 0, 'minor', 0, 'service', 0, 1], 350 + [...MATCH, 'tertiary', 0, 'minor', 0, 'service', 0, 1], 376 351 13, 377 - ['match', ['get', 'class'], 'minor', 0, 'service', 0, 1], 352 + [...MATCH, 'minor', 0, 'service', 0, 1], 378 353 14, 379 354 1, 380 355 ], ··· 384 359 ['zoom'], 385 360 6, 386 361 [ 387 - 'match', 388 - ['get', 'class'], 362 + ...MATCH, 389 363 'motorway', 390 364 0.5, 391 365 'trunk', ··· 399 373 0, 400 374 ], 401 375 8, 402 - ['match', ['get', 'class'], 'motorway', 1, 0.5], 376 + [...MATCH, 'motorway', 1, 0.5], 403 377 11, 404 378 [ 405 - 'match', 406 - ['get', 'class'], 379 + ...MATCH, 407 380 'motorway', 408 381 3, 409 382 'trunk', ··· 418 391 ], 419 392 13, 420 393 [ 421 - 'match', 422 - ['get', 'class'], 394 + ...MATCH, 423 395 'motorway', 424 396 6, 425 397 'trunk', ··· 434 406 ], 435 407 16, 436 408 [ 437 - 'match', 438 - ['get', 'class'], 409 + ...MATCH, 439 410 'motorway', 440 411 10, 441 412 'trunk', ··· 449 420 12, 450 421 ], 451 422 20, 452 - [ 453 - 'match', 454 - ['get', 'class'], 455 - 'motorway', 456 - 10, 457 - 'secondary', 458 - 20, 459 - 'tertiary', 460 - 20, 461 - 30, 462 - ], 423 + [...MATCH, 'motorway', 10, 'secondary', 20, 'tertiary', 20, 30], 463 424 ], 464 425 }, 465 426 }, ··· 470 431 'source-layer': 'transportation', 471 432 'filter': ['in', 'class', 'rail', 'transit'], 472 433 'paint': { 473 - 'line-color': 'hsl(34, 12%, 66%)', 474 - 'line-opacity': ELEVEN_SIXTEEN, 434 + 'line-color': COLOR_RAIL, 435 + 'line-opacity': { 'base': 1, 'stops': [[8, 0], [16, 1]] }, 475 436 }, 476 437 }, 477 438 { ··· 482 443 'filter': [ALL, LINE, ['==', 'brunnel', 'bridge']], 483 444 'layout': { 'line-cap': 'butt', 'line-join': 'miter' }, 484 445 'paint': { 485 - 'line-color': '#bbbbbb', 446 + 'line-color': '#bbb', 486 447 'line-gap-width': { 'base': 1.55, 'stops': [[4, 0.25], [20, 30]] }, 487 448 'line-width': { 'base': 1.6, 'stops': [[12, 0.5], [20, 10]] }, 488 449 }, ··· 495 456 'filter': [ALL, LINE, ['==', 'brunnel', 'bridge']], 496 457 'layout': { 'line-cap': 'round', 'line-join': 'round' }, 497 458 'paint': { 498 - 'line-color': BLUE, 459 + 'line-color': COLOR_WATER, 499 460 'line-width': { 'base': 1.55, 'stops': [[4, 0.25], [20, 30]] }, 500 461 }, 501 462 }, ··· 530 491 ], 531 492 'layout': { 'line-cap': 'round', 'line-join': 'round' }, 532 493 'paint': { 533 - 'line-color': [ 534 - 'match', 535 - ['get', 'class'], 536 - 'minor', 537 - '#efefef', 538 - '#fff', 539 - ], 494 + 'line-color': [...MATCH, 'minor', '#efefef', WHITE], 540 495 'line-width': { 'base': 1.4, 'stops': [[6, 0.5], [20, 30]] }, 541 496 }, 542 497 }, ··· 630 585 }, 631 586 'paint': { 632 587 'text-color': 'hsl(0, 0%, 30%)', 633 - 'text-halo-color': 'hsl(0, 0%, 100%)', 588 + 'text-halo-color': WHITE, 634 589 'text-halo-width': 1.5, 635 590 }, 636 591 }, ··· 654 609 'text-font': [ 655 610 'case', 656 611 ['==', ['get', 'class'], 'city'], 657 - ['literal', ['Noto Sans Medium']], 658 - ['literal', ['Noto Sans Regular']], 612 + FONT_MED, 613 + FONT_REG, 659 614 ], 660 - 'text-max-width': ['match', ['get', 'class'], 'city', 10, 'town', 8, 6], 615 + 'text-max-width': [...MATCH, 'city', 10, 'town', 8, 6], 661 616 'text-size': [ 662 617 'interpolate', 663 618 ['linear'], 664 619 ['zoom'], 665 620 11, 666 - ['match', ['get', 'class'], 'city', 11, 0], 621 + [...MATCH, 'city', 11, 0], 667 622 12, 668 - ['match', ['get', 'class'], 'city', 12, 'town', 10, 0], 623 + [...MATCH, 'city', 12, 'town', 10, 0], 669 624 13, 670 - ['match', ['get', 'class'], 'city', 13.5, 'town', 11, 10], 625 + [...MATCH, 'city', 13.5, 'town', 11, 10], 671 626 15, 672 - ['match', ['get', 'class'], 'city', 15, 'town', 13, 11], 627 + [...MATCH, 'city', 15, 'town', 13, 11], 673 628 16, 674 - ['match', ['get', 'class'], 'city', 15, 'town', 0, 12], 629 + [...MATCH, 'city', 15, 'town', 0, 12], 675 630 ], 676 631 'text-transform': [ 677 - 'match', 678 - ['get', 'class'], 632 + ...MATCH, 679 633 'suburb', 680 634 'uppercase', 681 635 'neighbourhood', ··· 685 639 'none', 686 640 ], 687 641 'text-letter-spacing': [ 688 - 'match', 689 - ['get', 'class'], 642 + ...MATCH, 690 643 'suburb', 691 644 0.05, 692 645 'neighbourhood', ··· 700 653 }, 701 654 'paint': { 702 655 'text-color': [ 703 - 'match', 704 - ['get', 'class'], 656 + ...MATCH, 705 657 'city', 706 - 'hsl(0, 0%, 0%)', 658 + BLACK, 707 659 'town', 708 660 'hsl(0, 0%, 30%)', 709 661 'hsl(0, 0%, 45%)', 710 662 ], 711 663 'text-halo-blur': 0, 712 - 'text-halo-color': [ 713 - 'match', 714 - ['get', 'class'], 715 - 'city', 716 - 'hsla(0, 0%, 100%, 0.75)', 717 - 'hsl(0, 0%, 100%)', 718 - ], 719 - 'text-halo-width': [ 720 - 'match', 721 - ['get', 'class'], 722 - 'city', 723 - 2, 724 - 'town', 725 - 1.5, 726 - 1, 727 - ], 664 + 'text-halo-color': [...MATCH, 'city', 'hsla(0, 0%, 100%, 0.75)', WHITE], 665 + 'text-halo-width': [...MATCH, 'city', 2, 'town', 1.5, 1], 728 666 }, 729 667 }, 730 668 { ··· 737 675 'filter': [ALL, ['==', '$type', 'Point'], ['==', 'class', 'country']], 738 676 'layout': { 739 677 'text-field': '{name:latin}', 740 - 'text-font': [ 741 - 'case', 742 - ['has', 'iso_a2'], 743 - ['literal', ['Noto Sans Medium']], 744 - ['literal', ['Noto Sans Regular']], 745 - ], 678 + 'text-font': ['case', ['has', 'iso_a2'], FONT_MED, FONT_REG], 746 679 'text-max-width': 10, 747 680 'text-size': { 'stops': [[3, 12], [8, 22]] }, 748 681 'visibility': 'visible', ··· 784 717 'type': 'fill', 785 718 'source': 'world', 786 719 'source-layer': 'water', 787 - 'paint': { 'fill-color': BLUE }, 720 + 'paint': { 'fill-color': COLOR_WATER }, 788 721 }, 789 722 790 723 // ── Landcover — colours match layers.ts exactly ─────────────────────────── ··· 800 733 ], 801 734 'paint': { 802 735 'fill-color': [ 803 - 'match', 804 - ['get', 'class'], 736 + ...MATCH, 805 737 'grass', 806 - 'hsl(82, 46%, 72%)', 738 + COLOR_GRASS, 807 739 'wood', 808 - 'hsl(82, 46%, 72%)', 740 + COLOR_GRASS, 809 741 'wetland', 810 742 'hsl(180, 25%, 78%)', 811 743 'sand', 812 - 'rgba(232, 214, 38, 1)', 744 + COLOR_SAND, 813 745 'rock', 814 746 'hsl(30, 8%, 72%)', 815 747 'ice', 816 - 'hsl(47, 22%, 94%)', 817 - 'hsl(82, 46%, 72%)', 748 + COLOR_ICE_2, 749 + COLOR_GRASS, 818 750 ], 819 751 'fill-opacity': [ 820 752 'interpolate', 821 753 ['linear'], 822 754 ['zoom'], 823 755 0, 824 - [ 825 - 'match', 826 - ['get', 'class'], 827 - 'ice', 828 - 1, 829 - 'wood', 830 - 0.6, 831 - 'sand', 832 - 0.3, 833 - 'grass', 834 - 0.45, 835 - 0.5, 836 - ], 756 + [...MATCH, 'ice', 1, 'wood', 0.6, 'sand', 0.3, 'grass', 0.45, 0.5], 837 757 6, 838 - [ 839 - 'match', 840 - ['get', 'class'], 841 - 'ice', 842 - 0.75, 843 - 'wood', 844 - 0.6, 845 - 'sand', 846 - 0.3, 847 - 'grass', 848 - 0.45, 849 - 0.5, 850 - ], 758 + [...MATCH, 'ice', 0.75, 'wood', 0.6, 'sand', 0.3, 'grass', 0.45, 0.5], 851 759 9, 852 - [ 853 - 'match', 854 - ['get', 'class'], 855 - 'ice', 856 - 0.5, 857 - 'wood', 858 - 0.8, 859 - 'sand', 860 - 0.3, 861 - 'grass', 862 - 0.45, 863 - 0.5, 864 - ], 760 + [...MATCH, 'ice', 0.5, 'wood', 0.8, 'sand', 0.3, 'grass', 0.45, 0.5], 865 761 ], 866 762 }, 867 763 }, ··· 873 769 'source': 'world', 874 770 'source-layer': 'park', 875 771 'paint': { 876 - 'fill-color': '#E1EBB0', 772 + 'fill-color': COLOR_GRASS_2, 877 773 'fill-opacity': { 'base': 1, 'stops': [[3, 0], [7, 0.75]] }, 878 774 }, 879 775 }, ··· 886 782 'source-layer': 'waterway', 887 783 'minzoom': 6, 888 784 'paint': { 889 - 'line-color': BLUE, 785 + 'line-color': COLOR_WATER, 890 786 'line-opacity': 1, 891 787 'line-width': { 'base': 1.4, 'stops': [[6, 0.5], [9, 3]] }, 892 788 }, ··· 948 844 'maxzoom': 7, 949 845 'layout': { 950 846 'text-field': ['coalesce', ['get', 'name:latin'], ['get', 'name']], 951 - 'text-font': [ 952 - 'case', 953 - ['has', 'iso_a2'], 954 - ['literal', ['Noto Sans Medium']], 955 - ['literal', ['Noto Sans Regular']], 956 - ], 847 + 'text-font': ['case', ['has', 'iso_a2'], FONT_MED, FONT_REG], 957 848 'text-max-width': 10, 958 849 'text-size': { 'stops': [[3, 12], [8, 22]] }, 959 850 }, ··· 1002 893 'layout': { 1003 894 'text-field': ['coalesce', ['get', 'name:latin'], ['get', 'name']], 1004 895 'text-font': ['Noto Sans Regular'], 1005 - 'text-max-width': ['match', ['get', 'class'], 'city', 10, 6], 896 + 'text-max-width': [...MATCH, 'city', 10, 6], 1006 897 'text-size': [ 1007 898 'interpolate', 1008 899 ['linear'], 1009 900 ['zoom'], 1010 901 6, 1011 - ['match', ['get', 'class'], 'city', 11, 'town', 10, 0], 902 + [...MATCH, 'city', 11, 'town', 10, 0], 1012 903 8, 1013 - ['match', ['get', 'class'], 'city', 12, 'town', 11, 10], 904 + [...MATCH, 'city', 12, 'town', 11, 10], 1014 905 9, 1015 - ['match', ['get', 'class'], 'city', 15, 'town', 14, 14], 906 + [...MATCH, 'city', 15, 'town', 14, 14], 1016 907 ], 1017 908 }, 1018 909 'paint': { 1019 - 'text-color': [ 1020 - 'match', 1021 - ['get', 'class'], 1022 - 'city', 1023 - 'hsl(0, 0%, 0%)', 1024 - 'hsl(0, 0%, 25%)', 1025 - ], 910 + 'text-color': [...MATCH, 'city', BLACK, 'hsl(0, 0%, 25%)'], 1026 911 'text-halo-blur': 0, 1027 912 'text-halo-color': 'rgba(255, 255, 255, 0.75)', 1028 913 'text-halo-width': 2,