Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding vehicle POI icons #1027

Merged
merged 7 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions icons/poi_car_repair.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions icons/poi_car_shop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions icons/poi_taxi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,14 @@
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_school.svg"
},
{
"key": "amenity",
"value": "taxi",
"object_types": ["node", "area"],
"description": "Taxi stands are marked by an icon representing the front view of a taxi cab.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_taxi.svg"
},
{
"key": "amenity",
"value": "kindergarten",
Expand Down Expand Up @@ -632,6 +640,22 @@
"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": "car",
"object_types": ["node", "area"],
"description": "Car dealerships are marked by an icon representing a front facing vehicle.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_car_shop.svg"
},
{
"key": "shop",
"value": "car_repair",
"object_types": ["node", "area"],
"description": "Car mechanic shops are marked by an icon representing a front facing vehicle with a wrench above it.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_car_repair.svg"
},
{
"key": "shop",
"value": "supermarket",
Expand Down
35 changes: 34 additions & 1 deletion src/layer/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,30 @@ var iconDefs = {
color: Color.poi.transport,
description: "Bus stop",
},
car_repair: {
classes: {
car: ["car_repair"],
},
sprite: "poi_car_repair",
color: Color.poi.consumer,
description: "Car mechanic",
},
car_shop: {
classes: {
car: ["car"],
},
sprite: "poi_car_shop",
color: Color.poi.consumer,
description: "Car dealership",
},
taxi: {
classes: {
office: ["taxi"],
},
sprite: "poi_taxi",
color: Color.poi.transport,
description: "Taxi stand",
},
coffee: {
classes: {
cafe: ["cafe"],
Expand Down Expand Up @@ -259,13 +283,16 @@ export const poi = {
...getSubclasses(iconDefs.bar),
...getSubclasses(iconDefs.coffee),
...getSubclasses(iconDefs.supermarket),
...getSubclasses(iconDefs.car_shop),
...getSubclasses(iconDefs.car_repair),
],
Color.poi.consumer,
[
"bus_station",
"bus_stop",
...getSubclasses(iconDefs.railway_station),
...getSubclasses(iconDefs.railway_stop),
...getSubclasses(iconDefs.taxi),
],
Color.poi.transport,
["museum"],
Expand Down Expand Up @@ -320,7 +347,13 @@ export const poi = {
"tram_stop",
],
15,
[...getSubclasses(iconDefs.bar), ...getSubclasses(iconDefs.coffee)],
[
...getSubclasses(iconDefs.bar),
...getSubclasses(iconDefs.coffee),
...getSubclasses(iconDefs.car_shop),
...getSubclasses(iconDefs.car_repair),
...getSubclasses(iconDefs.taxi),
],
16,
["clinic", "doctors", "parking"],
17,
Expand Down
8 changes: 8 additions & 0 deletions test/sample_locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,13 @@
"width": 400,
"height": 400
}
},
{
"location": "16/38.896954/-77.108406",
"name": "virginia_",
"viewport": {
"width": 400,
"height": 400
}
}
]
Loading