Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add library icon #1014

Merged
merged 10 commits into from
Jan 21, 2024
6 changes: 6 additions & 0 deletions icons/poi_book_upright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,14 @@
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_health_cross.svg"
},
{
"key": "amenity",
"value": "library",
"object_types": ["node", "area"],
"description": "Libraries are marked by an icon representing a book.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_book_upright.svg"
},
{
"key": "amenity",
"value": "parking",
Expand Down
10 changes: 10 additions & 0 deletions src/layer/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ var iconDefs = {
color: Color.poi.infrastructure,
description: "Hospital",
},
library: {
classes: {
library: ["library"],
},
sprite: "poi_book_upright",
color: Color.poi.infrastructure,
description: "Library",
},
medical: {
classes: {
hospital: ["clinic"],
Expand Down Expand Up @@ -303,6 +311,7 @@ export const poi = {
"police",
"school",
"college",
"library",
"townhall",
...getSubclasses(iconDefs.pow_christian),
...getSubclasses(iconDefs.pow_buddhist),
Expand Down Expand Up @@ -330,6 +339,7 @@ export const poi = {
[
"bus_stop",
"hospital",
"library",
"museum",
"police",
...getSubclasses(iconDefs.fuel),
Expand Down
8 changes: 8 additions & 0 deletions test/sample_locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
"height": 400
}
},
{
"location": "17/40.753326/-73.982224",
"name": "library_z17",
"viewport": {
"width": 400,
"height": 400
}
},
{
"location": "13.25/49.552/5.8107",
"name": "europe_e-road_routes",
Expand Down
Loading