Skip to content

Commit

Permalink
Add fuel poi icon
Browse files Browse the repository at this point in the history
  • Loading branch information
whubsch committed Dec 2, 2023
1 parent c5c4f05 commit 43eb4fc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
3 changes: 3 additions & 0 deletions icons/poi_fuel.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 @@ -383,6 +383,14 @@
"description": "Intermittent lakes are translucent with a dashed line representing the lakeshore.",
"doc_url": "https://openmaptiles.org/schema/#water"
},
{
"key": "amenity",
"value": "fuel",
"object_types": ["node", "area"],
"description": "Fuel stations are marked by an icon representing a gas pump.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_fuel.svg"
},
{
"key": "amenity",
"value": "school",
Expand Down
20 changes: 18 additions & 2 deletions src/layer/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ var iconDefs = {
color: Color.poi.consumer,
description: "Coffee shop",
},
fuel: {
classes: {
fuel: ["fuel"],
},
sprite: "poi_fuel",
color: Color.poi.consumer,
description: "Gas station",
},
hospital: {
classes: {
hospital: ["hospital"],
Expand Down Expand Up @@ -238,7 +246,11 @@ export const poi = {
"text-color": [
"match",
["get", "subclass"],
[...getSubclasses(iconDefs.bar), ...getSubclasses(iconDefs.coffee)],
[
...getSubclasses(iconDefs.fuel),
...getSubclasses(iconDefs.bar),
...getSubclasses(iconDefs.coffee),
],
Color.poi.consumer,
[
"bus_station",
Expand Down Expand Up @@ -297,7 +309,11 @@ export const poi = {
"tram_stop",
],
15,
[...getSubclasses(iconDefs.bar), ...getSubclasses(iconDefs.coffee)],
[
...getSubclasses(iconDefs.fuel),
...getSubclasses(iconDefs.bar),
...getSubclasses(iconDefs.coffee),
],
16,
["clinic", "doctors", "parking"],
17,
Expand Down

0 comments on commit 43eb4fc

Please sign in to comment.