Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions basemaps/flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ let flavor = {...namedFlavor("light"),buildings:"red"}

## Sprites

### Default Sprites

Each of the five default Flavors has an associated spritesheet. Sprites are necessary for displaying:

* Townspots - circles for cities and named places at low zoom levels.
Expand All @@ -77,8 +79,30 @@ make # builds all 5 default flavor spritesheets in dist/
./target/release/spritegen refill.svg flavors/custom.json dist/custom
```

### Custom Sprites

A custom spritesheet (`custom.json`, `custom.png`, `[email protected]`, `[email protected]`) can be referenced from a [MapLibre JSON style](maplibre):

```js
sprite: "https://example.com/assets/custom"
```

Sprites can be replaced with custom sets by assigning new icons to the same sprite names. Sprite names can be found in [light.json](https://github.com/protomaps/basemaps/blob/main/sprites/flavors/light.json):

```csv
townspot
capital
arrow
generic_shield-1char
...
```

To generate a spritesheet with a sigle icon based on the CC0 [Maki icon set created by Mapbox](https://github.com/mapbox/maki), use the [spreet](https://github.com/flother/spreet) command line tool:

```sh
mv airport.svg icons/aerodrome.svg
spreet icons output
# creates output.json and output.png
spreet --retina icons output@2x
#creates [email protected] and [email protected], used on HiDPI displays
```
29 changes: 20 additions & 9 deletions basemaps/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a
| `airfield` | |
| `alpine_hut` | |
| `amusement_ride` | |
| `animal` | |
| `animal` | <Icon kind="animal" :sprites="sprites"/> |
| `art` | |
| `artwork` | |
| `artwork` | <Icon kind="artwork" :sprites="sprites"/> |
| `atm` | |
| `attraction` | |
| `attraction` | <Icon kind="attraction" :sprites="sprites"/> |
| `atv` | |
| `baby_hatch` | |
| `bakery` | |
Expand All @@ -222,11 +222,12 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a
| `bicycle_repair_station` | |
| `boat_storage` | |
| `bookmaker` | |
| `books` | |
| `books` | <Icon kind="books" :sprites="sprites"/> |
| `building` | <Icon kind="building" :sprites="sprites"/> |
| `bureau_de_change` | |
| `bus_stop` | |
| `butcher` | |
| `cafe` | |
| `cafe` | <Icon kind="cafe" :sprites="sprites"/> |
| `camp_site` | |
| `car_parts` | |
| `car_rental` | |
Expand All @@ -243,13 +244,13 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a
| `clothes` | |
| `college` | <Icon kind="fire_station" :sprites="sprites"/> |
| `computer` | |
| `convenience` | |
| `convenience` | <Icon kind="convenience" :sprites="sprites"/> |
| `customs` | |
| `dentist` | |
| `district` | |
| `doctors` | |
| `dog_park` | |
| `drinking_water` | |
| `drinking_water` | <Icon kind="drinking_water" :sprites="sprites"/> |
| `emergency_phone` | |
| `fashion` | |
| `firepit` | |
Expand All @@ -260,6 +261,7 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a
| `fuel` | |
| `gambling` | |
| `garden_centre` | |
| `garden` | <Icon kind="garden" :sprites="sprites"/> |
| `gift` | |
| `golf_course` | |
| `golf` | |
Expand Down Expand Up @@ -322,12 +324,12 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a
| `stationery` | |
| `studio` | |
| `summer_toboggan` | |
| `supermarket` | |
| `supermarket` | <Icon kind="supermarket" :sprites="sprites"/> |
| `swimming_area` | |
| `taxi` | |
| `telephone` | |
| `tobacco` | |
| `toilets` | |
| `toilets` | <Icon kind="toilets" :sprites="sprites"/> |
| `townhall` | <Icon kind="townhall" :sprites="sprites"/> |
| `trail_riding_station` | |
| `travel_agency` | |
Expand All @@ -342,6 +344,15 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a
| `wilderness_hut` | |
| `zoo` | <Icon kind="zoo" :sprites="sprites"/> |


### Ranking

Points of interest are sourced from OpenStreetMap, and the `wikidata` tag is joined with the [QRank](https://github.com/brawer/wikidata-qrank) dataset to determine their prominence. The determined QRank is then used to move prominent POIs to lower zoom levels.

For example, the station [Alexanderplatz](https://www.openstreetmap.org/node/3908141014) has Wikidata ID [Q698497](https://www.wikidata.org/wiki/Q698497) and a QRank of 37850. A neighboring station, [Jannowitzbrücke](https://www.openstreetmap.org/node/21487225) has Wikidata ID [Q1647893](https://www.wikidata.org/wiki/Q1647893) and a QRank of 11176. Alexanderplatz station thus appears at a lower zoom level than other stations.

To view or modify the mapping from QRank thresholds to zoom levels, see [Pois.java](https://github.com/protomaps/basemaps/blob/main/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java).

## roads

Linear transportation features designed for movement, including highways, streets,
Expand Down