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 refining layers

- Show minor roads even later
- Move buildings to be in a 3-step process:
- z12: area > ~1460 sqm (ZRES12^2) — malls, apartment blocks, factories
- z13: area > ~365 sqm (ZRES13^2) — houses, shops
- z14: everything else — sheds, garages
- Adjusts styles to fade-in the three tiers of buildings

+31 -12
+11 -2
data/cli/shared/tilemaker/process.lua
··· 707 707 SetMinZoomByAreaWithLimit(0) 708 708 end 709 709 710 - -- Buildings: all pop in together at z12 with a style-driven opacity fade. 710 + -- Buildings: 3 tiers by footprint area, each with a style-driven opacity 711 + -- fade so no tier pops in abruptly. The "mz" attribute lets the style 712 + -- drive per-feature fade-in via interpolate + case. 711 713 function SetBuildingMinZoomByArea() 712 - MinZoom(12) 714 + local area=Area() 715 + local mz 716 + if area>ZRES12^2 then mz=12 -- large: malls, factories, blocks 717 + elseif area>ZRES13^2 then mz=13 -- medium: houses, shops 718 + else mz=14 -- small: sheds, garages 719 + end 720 + MinZoom(mz) 721 + AttributeNumeric("mz", mz) 713 722 end 714 723 715 724 -- Set minimum zoom level by area but not below given minzoom
+20 -10
www/utils/layers.ts
··· 184 184 'paint': { 185 185 'fill-antialias': true, 186 186 'fill-color': 'rgba(222, 211, 190, 1)', 187 - 'fill-opacity': { 'base': 1, 'stops': [[12, 0], [13, 1]] }, 188 - 'fill-outline-color': { 189 - 'stops': [ 190 - [12, 'rgba(212, 177, 146, 0)'], 191 - [13, 'rgba(212, 177, 146, 0.5)'], 192 - ], 193 - }, 187 + // Per-tier fade: each building's "mz" attribute (12/13/14) controls 188 + // when it becomes visible. Interpolation between stops produces a 189 + // smooth one-zoom-level fade for each tier. 190 + 'fill-opacity': [ 191 + 'interpolate', 192 + ['linear'], 193 + ['zoom'], 194 + 11, 195 + 0, 196 + 12, 197 + ['case', ['<=', ['get', 'mz'], 12], 1, 0], 198 + 13, 199 + ['case', ['<=', ['get', 'mz'], 13], 1, 0], 200 + 14, 201 + 1, 202 + ], 203 + 'fill-outline-color': 'rgba(212, 177, 146, 0.5)', 194 204 }, 195 205 }, 196 206 { ··· 346 356 'interpolate', 347 357 ['linear'], 348 358 ['zoom'], 349 - 12, 350 - [...MATCH, 'tertiary', 0, 'minor', 0, 'service', 0, 1], 351 359 13, 352 - [...MATCH, 'minor', 0, 'service', 0, 1], 360 + [...MATCH, 'tertiary', 0, 'minor', 0, 'service', 0, 1], 353 361 14, 362 + [...MATCH, 'minor', 0, 'service', 0, 1], 363 + 16, 354 364 1, 355 365 ], 356 366 'line-width': [