diff --git a/basemaps/flavors.md b/basemaps/flavors.md index 8723588..f3ef72b 100644 --- a/basemaps/flavors.md +++ b/basemaps/flavors.md @@ -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. @@ -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`, `custom@2x.json`, `custom@2x.png`) 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 output@2x.json and output@2x.png, used on HiDPI displays +``` diff --git a/basemaps/layers.md b/basemaps/layers.md index 9c2e10f..df2e674 100644 --- a/basemaps/layers.md +++ b/basemaps/layers.md @@ -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` | | | `art` | | -| `artwork` | | +| `artwork` | | | `atm` | | -| `attraction` | | +| `attraction` | | | `atv` | | | `baby_hatch` | | | `bakery` | | @@ -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` | | +| `building` | | | `bureau_de_change` | | | `bus_stop` | | | `butcher` | | -| `cafe` | | +| `cafe` | | | `camp_site` | | | `car_parts` | | | `car_rental` | | @@ -243,13 +244,13 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a | `clothes` | | | `college` | | | `computer` | | -| `convenience` | | +| `convenience` | | | `customs` | | | `dentist` | | | `district` | | | `doctors` | | | `dog_park` | | -| `drinking_water` | | +| `drinking_water` | | | `emergency_phone` | | | `fashion` | | | `firepit` | | @@ -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` | | | `gift` | | | `golf_course` | | | `golf` | | @@ -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` | | | `swimming_area` | | | `taxi` | | | `telephone` | | | `tobacco` | | -| `toilets` | | +| `toilets` | | | `townhall` | | | `trail_riding_station` | | | `travel_agency` | | @@ -342,6 +344,15 @@ _NOTE: The list of kind values is not comprehensive as some raw OSM tag values a | `wilderness_hut` | | | `zoo` | | + +### 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,