Skip to content

Commit

Permalink
Merge pull request #1014 from wmisener/wmisener/library
Browse files Browse the repository at this point in the history
Add library icon
  • Loading branch information
ZeLonewolf committed Jan 21, 2024
2 parents de350f7 + e0edc17 commit d79a6d1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
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

0 comments on commit d79a6d1

Please sign in to comment.