Skip to content

Commit

Permalink
allow filtering by third party app requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Feb 4, 2024
1 parent d2c002b commit 920cf1e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/routes/map/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
let upToDateLayer = leaflet.featureGroup.subGroup(markers);
let outdatedLayer = leaflet.featureGroup.subGroup(markers);
let legacyLayer = leaflet.featureGroup.subGroup(markers);
let thirdPartyLayer = leaflet.featureGroup.subGroup(markers);
let categories: MapGroups = {};
// add location information
Expand Down Expand Up @@ -209,6 +210,13 @@
legacyLayer.addLayer(marker);
}
if (
elementOSM.tags &&
elementOSM.tags['payment:lightning:requires_companion_app'] === 'yes'
) {
thirdPartyLayer.addLayer(marker);
}
if (!categories[category]) {
categories[category] = leaflet.featureGroup.subGroup(markers);
}
Expand All @@ -230,7 +238,8 @@
let overlayMaps: MapGroups = {
'Up-To-Date': upToDateLayer,
Outdated: outdatedLayer,
Legacy: legacyLayer
Legacy: legacyLayer,
'Third Party App': thirdPartyLayer
};
Object.keys(categories)
Expand All @@ -244,6 +253,7 @@
map.addLayer(upToDateLayer);
map.addLayer(outdatedLayer);
map.addLayer(legacyLayer);
map.addLayer(thirdPartyLayer);
map.addLayer(categories[category]);
});
Expand Down

0 comments on commit 920cf1e

Please sign in to comment.