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

allow to search presets by tag #8869

Closed
tyrasd opened this issue Jan 3, 2022 · 1 comment
Closed

allow to search presets by tag #8869

tyrasd opened this issue Jan 3, 2022 · 1 comment
Labels
preset An issue with an OpenStreetMap preset or tag usability An issue with ease-of-use or design

Comments

@tyrasd
Copy link
Member

tyrasd commented Jan 3, 2022

Some people might remember a preset by its OSM tag, or want to look up a preset which matches a tag documented in the OSM wiki.

The preset search bar could show presets if (one of) their tags matches the entered search text (e.g. landuse=railway should match the Railway Corridor preset). This could also be relaxed to match any one or two word input which corresponds to an OSM tag's key and/or value.

See openstreetmap/id-tagging-schema#301

@tyrasd tyrasd added usability An issue with ease-of-use or design preset An issue with an OpenStreetMap preset or tag labels Jan 3, 2022
@1ec5
Copy link
Collaborator

1ec5 commented Jan 3, 2022

The search results already include matches based on the value, but not the key=value syntax:

// matches value to preset.tags values
const leadingTagValues = searchable
.filter(a => Object.values(a.tags || {}).filter(val => val !== '*').some(leading));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preset An issue with an OpenStreetMap preset or tag usability An issue with ease-of-use or design
Projects
None yet
Development

No branches or pull requests

2 participants