Skip to content

Commit

Permalink
Merge pull request #1013 from whubsch/supermarket-poi
Browse files Browse the repository at this point in the history
Adding supermarket POI icon
  • Loading branch information
ZeLonewolf authored Dec 23, 2023
2 parents a30d2f4 + b13fad3 commit 2a585eb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions icons/poi_supermarket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,14 @@
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_pow_taoist.svg"
},

{
"key": "shop",
"value": "supermarket",
"object_types": ["node", "area"],
"description": "Supermarkets are marked by an icon representing a grocery cart.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_supermarket.svg"
},
{
"key": "highway",
"value": "motorway",
Expand Down
12 changes: 11 additions & 1 deletion src/layer/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ var iconDefs = {
color: Color.poi.infrastructure,
description: "School",
},
supermarket: {
classes: {
grocery: ["supermarket"],
},
sprite: "poi_supermarket",
color: Color.poi.consumer,
description: "Supermarket",
},
college: {
classes: {
college: ["college", "university"],
Expand Down Expand Up @@ -250,6 +258,7 @@ export const poi = {
...getSubclasses(iconDefs.fuel),
...getSubclasses(iconDefs.bar),
...getSubclasses(iconDefs.coffee),
...getSubclasses(iconDefs.supermarket),
],
Color.poi.consumer,
[
Expand Down Expand Up @@ -306,6 +315,7 @@ export const poi = {
...getSubclasses(iconDefs.pow_shinto),
...getSubclasses(iconDefs.pow_taoist),
...getSubclasses(iconDefs.school),
...getSubclasses(iconDefs.supermarket),
"townhall",
"tram_stop",
],
Expand Down Expand Up @@ -335,7 +345,7 @@ export const poi = {
[
"match",
["get", "subclass"],
["bus_stop", "tram_stop", "fuel"],
["bus_stop", "tram_stop", "fuel", "supermarket"],
"",
label.localizedName,
],
Expand Down

0 comments on commit 2a585eb

Please sign in to comment.