@tileflow/maps 0.1.0-alpha.17 → 0.1.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,22 +81,20 @@ Streets has twelve theme/time combinations. Inspector offers **Default**, **Fade
81
81
  presets. Default retains the configuration key `light`: `theme="light" timeOfDay="night"`
82
82
  selects `dark`, while `theme="light" timeOfDay="day"` selects `light`. The other concrete themes
83
83
  are `dawn`, `dusk`, `faded`, `monochrome`, `dawn-faded`, `dawn-monochrome`, `dusk-faded`,
84
- `dusk-monochrome`, `dark-faded`, and `dark-monochrome`. Each combination selects a complete
85
- palette and artwork; time presets do not apply a global lighting tint to the flat map.
86
-
87
- Scene lighting is calibrated against Mapbox Standard. Streets owns its cartography: slate-blue
88
- roads with stronger regional outlines, neutral urban surfaces, pale warm rural ground, green
89
- parks and subtle cream buildings. Its palette is not a fixed copy of the provider's reference
90
- colors. Day uses category-colored POI discs; dark mode uses pale discs with dark pictograms.
91
- Maki pictograms distinguish transport modes and POI types. Scene-sun lighting preserves
92
- unshadowed roof paint while allowing light color to affect walls.
93
-
94
- At regional scales, the default day theme uses a packaged, attributed climate underlay to
95
- separate humid and dry regions. It fades out by zoom 11, where mapped land cover and land use
96
- supply local detail. Climate is broad context, not a claim of surveyed vegetation at a specific
97
- site. The other themes retain their own authored land-cover palettes. Urban and education
98
- areas use neutral surfaces; farmland stays pale, while mapped orchards and nurseries remain
99
- green. Underground footprints flagged `hide_3d` are omitted from the flat building layers. Streets
84
+ `dusk-monochrome`, `dark-faded`, and `dark-monochrome`. All twelve appearances share roads, label placement, fonts and icon artwork.
85
+ Colors and lighting vary; flat-map colors are authored independently.
86
+
87
+ Scene lighting is calibrated against Mapbox Standard while retaining Streets' slate-blue roads,
88
+ neutral urban surfaces, pale warm rural ground, green parks and cream buildings. All appearances
89
+ share category-colored POI discs and Maki pictograms. Lighting preserves sunlit roof paint and
90
+ tints walls. Daylight uses neutral direct light (0.2) and ambient fill (0.8); buildings and
91
+ map-shaded models keep ambient fill at night, with local occlusion at contacts and recesses.
92
+
93
+ Below zoom 11, daylight draws a climate image separating humid and dry regions; it is
94
+ loaded only there and is broad context, not surveyed vegetation. Other appearances keep it clear.
95
+ Urban and education areas use neutral surfaces; farmland stays pale, mapped orchards and nurseries
96
+ green. Activity areas tint the ground by activity until buildings take over. Footprints drawn
97
+ by building parts (`extrude: false`) are omitted from the flat building layers. Streets
100
98
  suspends duplicate flat building footprints in 3D so roads remain visible under open landmarks;
101
99
  2D mode restores ordinary footprints. Normal 3D buildings keep a small neutral/active tone difference. Authored models use
102
100
  the neutral building color and independently configurable window shading.
@@ -119,12 +117,12 @@ at junctions. Links remain narrower and draw before receiving roads. Tunnel casi
119
117
  surface and bridge casings are continuous. Construction fills and marks draw below roads in
120
118
  service. Crosswalks and compact blue-gray arrows fade in from z16.5.
121
119
 
122
- Daytime surface footpaths and cycleways use white strokes over mapped green ground and a
123
- muted gray-earth stroke elsewhere, at 92% of their authored width and without a casing.
120
+ Surface footpaths and cycleways share geometry across appearances, at 92% of their authored
121
+ width and without casings. Day uses white over mapped green ground and gray-earth elsewhere.
124
122
  The shared `roads.pathGround` compiler and browser protocol clip the green portions from the
125
123
  same vector tiles; a complete ground-colored path remains visible if context cannot load.
126
124
  Road carriageway outlines draw above these paths. This treatment belongs to the Streets
127
- definition and survives normal artifact regeneration; other themes retain their own path styles.
125
+ definition and survives normal artifact regeneration in every palette and time preset.
128
126
  Road palettes, width profiles, building outlines and the overview backgrounds are authored here
129
127
  in Maps; consumers inherit them without installing a separately edited style snapshot.
130
128
 
@@ -150,10 +148,9 @@ Streets rounds exterior building corners with a 1.5-metre radius and softens the
150
148
  lighting transition (`threeDimensional.edgeRadius: 1.5`). Courtyards and tile cuts retain their shape.
151
149
  Shields use 9 px DINish Bold and closer spacing at z11–13. Street names yield to destinations
152
150
  and draw above flat footprints but below 3D buildings, with viewport-aligned letters.
153
- 3D lights use Standard's effective theme presets, retrieved on 2026-10-18: southern sun by day,
154
- southeast at dawn, southwest at dusk and western moonlight at night. Monochrome has distinct
155
- directions and strengths. Tileflow holds zoom 14+ values; Standard varies intensity below z14.
156
- Shading differs; `controller.setSun({date, location})` uses the real sun instead of presets.
151
+ 3D lights use a southern sun by day, southeast at dawn, southwest at dusk and western moonlight
152
+ at night. At each moment, palettes share light direction, strength and shadow geometry;
153
+ only light colors change. `controller.setSun({date, location})` uses the real sun instead.
157
154
  Streets enables `camera.adaptivePerspective`. See camera, landmark and lighting settings in
158
155
  [3D buildings](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/README.md).
159
156
  The buildings' `threeDimensional.lighting` and `shadows` options control the effect, and each
@@ -169,7 +166,8 @@ Pedestrian paths group separately. Compact types preserve language;
169
166
  `labels.roadNameFormat: 'full'` keeps source names.
170
167
  Disabling roads omits their names.
171
168
  Road rings, ramp and surface ordering use [Core's replaceable defaults](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/README.md).
172
- Streets owns colors, widths, typography and time-of-day themes.
169
+ All non-day themes grade day's ground, water, roads, trees and 2D/3D materials across zooms:
170
+ yellow warmth at dawn, dimmer stone at dusk, cool night. Day palettes stay unchanged.
173
171
  Each theme paints a [street sky](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/README.md) with night stars; `atmosphere: true`
174
172
  on a globe map adds space around it. Mercator and native targets remain supported.
175
173
 
@@ -206,7 +204,7 @@ export default defineMap({
206
204
 
207
205
  POIs follow World ranks and category density, with extra detail for parks and transport.
208
206
  Generic airport POIs are limited to rank 0 to reduce misplaced business listings; the dedicated
209
- aerodrome layer continues to label mapped airports. This display policy does not repair source data.
207
+ airport label layer continues to label mapped airports. This display policy does not repair source data.
210
208
  Road-reference repetition is reduced at z11–13 and retains its detail interval from z14.
211
209
  Gardens stay at ranks 0–1 at every zoom, keeping principal destinations while omitting botanical
212
210
  collections and some small independent gardens. Other park and landmark types retain their usual
@@ -327,7 +325,14 @@ concrete theme names remain available for existing applications and captures. Th
327
325
  is inherited when extending Streets without overriding it.
328
326
  See the [time-of-day contract](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/README.md#style-with-themes-and-semantic-modules).
329
327
 
330
- Streets packages its low-zoom climate artwork and attribution, contrasted routes and compact trees.
331
- Models inherit ordinary-building shading. Glass parts can be recoloured independently through
332
- `modelColors.glass`; windows use `modelLighting.window.colorScale: 0.94`.
328
+ Streets packages contrasted routes and compact trees. Climate artwork and its attribution are
329
+ retained for future URL delivery, but the underlay is not included in compiled styles.
330
+ When the 3D view is active, available buildings and models appear at full height from zoom 14.25
331
+ without zoom entrance animations.
332
+ Pitch is capped at 38° through zoom 15; closer views use the application's maximum.
333
+ Daylight combines warm limestone buildings, ivory model surfaces, smoked-blue glazing and warm
334
+ roof tones under neutral sunlight and skylight. Models share ordinary-building shading, with
335
+ soft contact shadows and ambient occlusion in recesses. Monochrome materials stay neutral.
336
+ Glass parts can be recoloured independently through `modelColors.glass`; window roles retain
337
+ that glass tint even on a shared stone part, with `modelLighting.window.colorScale: 0.96`.
333
338
  Other maps can override their colour and material without regenerating the model.
@@ -1,7 +1,11 @@
1
- """Rebuild the embedded, historical climate colour image (requires Pillow and NumPy)."""
1
+ """Rebuild the shared climate colour image, streets-climate-v1.png (requires Pillow and NumPy).
2
+
3
+ Tileflow serves the PNG unchanged at an immutable URL named by its SHA-256; recipe.json records
4
+ that digest, and Streets reads the URL from src/official/streets-climate.ts.
5
+ """
2
6
  from pathlib import Path
3
7
  from PIL import Image, ImageFilter
4
- import hashlib, json, base64, io
8
+ import hashlib, json, io
5
9
  import numpy as np
6
10
  ROOT = Path(__file__).resolve().parent
7
11
  SOURCE = ROOT / 'koppen-geiger-1991-2020.tif'
@@ -37,11 +41,13 @@ projected = np.uint8(np.round(colour[low] * (1 - fraction[:, None, None]) +
37
41
  world = Image.fromarray(projected).resize((size, size), Image.Resampling.BILINEAR)
38
42
  buffer = io.BytesIO()
39
43
  world.save(buffer, format='PNG', optimize=True)
40
- uri = 'data:image/png;base64,' + base64.b64encode(buffer.getvalue()).decode()
41
- output = ROOT / '../../../src/official/streets-climate-image.ts'
42
- output.write_text('// Generated by assets/streets/climate/build.py. See its NOTICE.txt.\nexport const streetsClimateImage = ' + json.dumps(uri) + ';\n')
44
+ image = buffer.getvalue()
45
+ (ROOT / 'streets-climate-v1.png').write_bytes(image)
46
+ recipe.update(image='streets-climate-v1.png', imageBytes=len(image),
47
+ imageSha256=hashlib.sha256(image).hexdigest())
43
48
  (ROOT / 'recipe.json').write_text(json.dumps(recipe, indent=2)+'\n')
44
49
  # Keep generated sources reproducible under the package formatter.
45
50
  import subprocess
46
- subprocess.run(['pnpm', 'exec', 'prettier', '--write', str(output.resolve()), str(ROOT / 'recipe.json')], cwd=ROOT.parents[4], check=True)
47
- print(json.dumps({'imageBytes':len(buffer.getvalue()), 'sourceSha256':recipe['sourceSha256']}))
51
+ subprocess.run(['pnpm', 'exec', 'prettier', '--write', str(ROOT / 'recipe.json')], cwd=ROOT.parents[4], check=True)
52
+ print(json.dumps({'imageBytes': len(image), 'imageSha256': recipe['imageSha256'],
53
+ 'sourceSha256': recipe['sourceSha256']}))
@@ -9,5 +9,8 @@
9
9
  "blurDegrees": 0.25,
10
10
  "maxzoom": 4,
11
11
  "tileSize": 256,
12
- "period": "1991\u20132020"
12
+ "period": "1991\u20132020",
13
+ "image": "streets-climate-v1.png",
14
+ "imageBytes": 820873,
15
+ "imageSha256": "bede2213b0ba74d77111fe182458ee30d219b989a9c11fe5ce121de1c549dfc4"
13
16
  }