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

Add toilet POI icon for marking bathrooms/restrooms/toilets #1102

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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_toilet.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 @@ -597,6 +597,14 @@
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/poi_fire_station.svg"
},
{
"key": "amenity",
"value": "toilets",
"object_types": ["node", "area"],
"description": "Restrooms are marked by an icon representing a flush toilet.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_toilet.svg"
},
{
"key": "amenity",
"value": "townhall",
Expand Down
11 changes: 10 additions & 1 deletion src/layer/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ var iconDefs = {
color: Color.poi.infrastructure,
description: "College or university",
},
toilets: {
classes: {
toilets: ["toilets"],
},
sprite: "poi_toilet",
color: Color.poi.infrastructure,
Copy link
Member

@1ec5 1ec5 Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure this fits very well with other things in the infrastructure category, or the blue category. Much of the time, it’s actually part of some other POI.

Consider creating a different category for hyperlocal features that would also include street furniture. I’m assuming it would be less prominent than the infrastructure category: perhaps black, and appearing at a higher zoom level. Maybe a scaled-down icon and font.

The tradeoff would be in more remote settings where the amenity=toilet represents something significant in its own right. But I think that starts to get into a use case that OpenTrailMap would serve better anyways.

Copy link
Member Author

@Pengor Pengor Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much of the time, it’s actually part of some other POI

I don't believe places with toilets=yes get mapped to the toilets class in the OpenMapTiles schema, so the only toilets that should show up are POIs where the toilets are the prominent "feature" of that object, right? So assuming things are mapped "correctly" (i.e. an amenity=toilets is a dedicated restroom) we shouldn't run into the scenario you're describing very frequently, right? I think I'm hesitant to decrease how quickly these bathrooms/restrooms/toilets appear because I haven't seen any conflicts with other POIs so far (at least in places I'm looking).

Otherwise, I think a new category is fine, but maybe that can be a separate PR (or Issue to track that change)?

description: "Restroom",
},
townhall: {
classes: {
town_hall: ["townhall"],
Expand Down Expand Up @@ -356,6 +364,7 @@ export const poi = {
"school",
...getSubclasses(iconDefs.college),
"library",
"toilets",
"townhall",
...getSubclasses(iconDefs.post_office),
...getSubclasses(iconDefs.pow_christian),
Expand Down Expand Up @@ -417,7 +426,7 @@ export const poi = {
...getSubclasses(iconDefs.hostel),
],
16,
["clinic", "doctors", "parking"],
["clinic", "doctors", "parking", "toilets"],
17,
99,
],
Expand Down