diff --git a/icons/poi_book_upright.svg b/icons/poi_book_upright.svg new file mode 100644 index 000000000..b13bdc7bc --- /dev/null +++ b/icons/poi_book_upright.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/scripts/taginfo_template.json b/scripts/taginfo_template.json index 7ca152068..a1891714f 100644 --- a/scripts/taginfo_template.json +++ b/scripts/taginfo_template.json @@ -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", diff --git a/src/layer/poi.js b/src/layer/poi.js index 6059fdd24..59b4dc77e 100644 --- a/src/layer/poi.js +++ b/src/layer/poi.js @@ -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"], @@ -303,6 +311,7 @@ export const poi = { "police", "school", "college", + "library", "townhall", ...getSubclasses(iconDefs.pow_christian), ...getSubclasses(iconDefs.pow_buddhist), @@ -330,6 +339,7 @@ export const poi = { [ "bus_stop", "hospital", + "library", "museum", "police", ...getSubclasses(iconDefs.fuel), diff --git a/test/sample_locations.json b/test/sample_locations.json index 2505eb3dd..8b448923e 100644 --- a/test/sample_locations.json +++ b/test/sample_locations.json @@ -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",