diff --git a/app/utils/osm-icons.js b/app/utils/osm-icons.js index 7faada3..0f86be8 100644 --- a/app/utils/osm-icons.js +++ b/app/utils/osm-icons.js @@ -160,6 +160,7 @@ export const POI_ICON_RULES = [ { tags: { tourism: 'hostel' }, icon: 'person-sleeping-in-bed' }, { tags: { tourism: 'motel' }, icon: 'person-sleeping-in-bed' }, { tags: { tourism: 'guest_house' }, icon: 'person-sleeping-in-bed' }, + { tags: { leisure: 'resort' }, icon: 'person-sleeping-in-bed' }, // Sports / Motorsports { tags: { sport: 'motor' }, icon: 'flag-checkered' }, diff --git a/app/utils/poi-categories.js b/app/utils/poi-categories.js index 68c6b4f..cd27c6d 100644 --- a/app/utils/poi-categories.js +++ b/app/utils/poi-categories.js @@ -55,7 +55,10 @@ export const POI_CATEGORIES = [ id: 'accommodation', label: 'Hotels', icon: 'person-sleeping-in-bed', - filter: ['["tourism"~"^(hotel|hostel|motel|chalet|guest_house)$"]'], + filter: [ + '["tourism"~"^(hotel|hostel|motel|chalet|guest_house)$"]', + '["leisure"="resort"]', + ], types: ['node', 'way', 'relation'], }, ]; diff --git a/tests/unit/utils/osm-icons-test.js b/tests/unit/utils/osm-icons-test.js index eb3d7d5..14d96e8 100644 --- a/tests/unit/utils/osm-icons-test.js +++ b/tests/unit/utils/osm-icons-test.js @@ -38,6 +38,11 @@ module('Unit | Utility | osm-icons', function () { assert.strictEqual(result, null); }); + test('it returns person-sleeping-in-bed for leisure=resort', function (assert) { + let result = getIconNameForTags({ leisure: 'resort' }); + assert.strictEqual(result, 'person-sleeping-in-bed'); + }); + test('all icons used in POI_ICON_RULES exist in the icons utility', function (assert) { for (let rule of POI_ICON_RULES) { let icon = getIcon(rule.icon); diff --git a/tests/unit/utils/poi-category-matcher-test.js b/tests/unit/utils/poi-category-matcher-test.js index 4f74706..4140c74 100644 --- a/tests/unit/utils/poi-category-matcher-test.js +++ b/tests/unit/utils/poi-category-matcher-test.js @@ -35,4 +35,11 @@ module('Unit | Utility | poi-category-matcher', function () { assert.ok(categoryIds.includes('things-to-do')); }); + + test('leisure=resort matches accommodation category', function (assert) { + const tags = { leisure: 'resort' }; + const categoryIds = getMatchingPoiCategoryIds(tags, POI_CATEGORIES); + + assert.ok(categoryIds.includes('accommodation')); + }); });