From bcc51efeccf2c7d7fe380f445f9ce018b5209a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 23 Mar 2026 15:12:07 +0400 Subject: [PATCH] Add catch-alls for place icons, staring with shop --- app/utils/osm-icons.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/utils/osm-icons.js b/app/utils/osm-icons.js index 66f6645..656f127 100644 --- a/app/utils/osm-icons.js +++ b/app/utils/osm-icons.js @@ -138,6 +138,9 @@ export const POI_ICON_RULES = [ { tags: { sport: 'stadium' }, icon: 'round-structure-with-flag' }, { tags: { leisure: 'stadium' }, icon: 'round-structure-with-flag' }, { tags: { leisure: 'sports_centre' }, icon: 'person-running' }, + + // Generic Catch-alls (must be last) + { tags: { shop: true }, icon: 'shopping-basket' }, ]; /** @@ -160,6 +163,12 @@ export function getIconNameForTags(tags) { // Check for exact match or if value is in a semicolon-separated list // e.g. "donut;coffee_shop" const values = tagValue.split(';').map((v) => v.trim()); + + // If expectedValue is boolean true, any value is a match + if (expectedValue === true) { + continue; + } + if (!values.includes(expectedValue)) { match = false; break;