Skip to content

Commit

Permalink
Merge pull request #689 from wmisener/willkmis_school
Browse files Browse the repository at this point in the history
Add school icons
  • Loading branch information
ZeLonewolf authored Jan 15, 2023
2 parents 92ae77a + 0f6c2fd commit a28ec79
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
5 changes: 5 additions & 0 deletions icons/poi_school.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,34 @@
"object_types": ["area"],
"description": "Intermittent lakes are translucent with a dashed line representing the lakeshore.",
"doc_url": "https://openmaptiles.org/schema/#water"
},
{
"key": "amenity",
"value": "school",
"object_types": ["node", "area"],
"description": "Schools are represented by an icon.",
"doc_url": "https://openmaptiles.org/schema/#poi"
},
{
"key": "amenity",
"value": "kindergarten",
"object_types": ["node", "area"],
"description": "Schools are represented by an icon.",
"doc_url": "https://openmaptiles.org/schema/#poi"
},
{
"key": "amenity",
"value": "college",
"object_types": ["node", "area"],
"description": "Schools are represented by an icon.",
"doc_url": "https://openmaptiles.org/schema/#poi"
},
{
"key": "amenity",
"value": "university",
"object_types": ["node", "area"],
"description": "Schools are represented by an icon.",
"doc_url": "https://openmaptiles.org/schema/#poi"
}
]
}
12 changes: 10 additions & 2 deletions src/layer/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var iconDefs = {
hospital: "hospital",
medical: ["doctors", "clinic"],
parking: "parking",
school: ["kindergarten", "school", "college", "university"],
};

export const poi = {
Expand All @@ -23,7 +24,7 @@ export const poi = {
["get", "subclass"],
[...iconDefs.bar, ...iconDefs.coffee],
Color.poi.consumer,
["hospital", "parking"],
["hospital", "parking", "school"],
Color.poi.infrastructure,
Color.poi.infrastructure,
],
Expand All @@ -34,7 +35,7 @@ export const poi = {
[
"match",
["get", "subclass"],
"hospital",
["hospital", ...iconDefs.school],
15,
[...iconDefs.bar, ...iconDefs.coffee],
16,
Expand Down Expand Up @@ -66,6 +67,8 @@ export const poi = {
"poi_hospital",
iconDefs.parking,
"poi_p",
iconDefs.school,
"poi_school",
"poi_square_dot", //icon for generic POI, not currently used
],
"icon-size": 1.0,
Expand Down Expand Up @@ -108,4 +111,9 @@ export const legendEntries = [
layers: [poi.id],
filter: ["==", ["get", "subclass"], iconDefs.parking],
},
{
description: "School",
layers: [poi.id],
filter: ["in", ["get", "subclass"], ["literal", iconDefs.school]],
},
];

0 comments on commit a28ec79

Please sign in to comment.