You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: basemaps/flavors.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,3 +57,28 @@ Use [ES6 spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/
57
57
import { namedFlavor } from"@protomaps/basemaps"
58
58
let flavor = {...namedFlavor("light"),buildings:"red"}
59
59
```
60
+
61
+
## Sprites
62
+
63
+
Each of the five default Flavors has an associated spritesheet. Sprites are necessary for displaying:
64
+
65
+
* Townspots - circles for cities and named places at low zoom levels.
66
+
* Highway shields - Shields are localized for different countries and road classes. See [shields](layers#shields).
67
+
* Points of interest - used for the `light` and `dark` flavors only.
68
+
69
+
Spritesheets are designed according to the [MapLibre Sprite specification](https://maplibre.org/maplibre-style-spec/sprite/). Because these sprites are stored in a static PNG image, the colors are pre-rendered to match the associated basemap Flavor.
70
+
71
+
A spritesheet can be generated by building the program in [basemaps/sprites](https://github.com/protomaps/basemaps/tree/main/sprites):
72
+
73
+
```sh
74
+
cargo build # creates the binary target/release/spritegen
75
+
make # builds all 5 default flavor spritesheets in dist/
76
+
# Create a new JSON in flavors/custom.json and customize the colors...
@@ -376,6 +377,22 @@ railways and piers from OpenStreetMap. This layer represents built infrastructur
376
377
|`rail`|
377
378
|`aeroway`|
378
379
380
+
### Shields
381
+
382
+
The `network` and `shield_text` are designed for displaying localized highway shields. The values are derived from the OpenStreetMap `ref` tag, and a spatial join with administrative boundaries.
|`US`|| United States [Numbered Highway System](https://en.wikipedia.org/wiki/United_States_Numbered_Highway_System)|
389
+
|`US:I`| <Iconkind="US:I-1char":sprites="sprites"/> | United States [Interstate Highway System](https://en.wikipedia.org/wiki/Interstate_Highway_System)|
For example, an [OpenStreetMap way](https://www.openstreetmap.org/way/584348895) with the tag `ref=S100` where the way is contained within the Netherlands polygon as defined by [ideditor.codes](https://ideditor.codes) will gain the tags `network=NL:S-road`, `shield_text=S100`.
395
+
379
396
## transit
380
397
381
398
Lines representing scheduled passenger services suitable for rendering on the map, even at lower zoom levels. For physical infrastructure, like highways and railways, see the [roads](#roads) layer.
0 commit comments