From 16a3fd730cdd9c7b7ffbc2e889b4c42127e8c3bf Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Wed, 25 May 2022 15:07:41 +0200 Subject: [PATCH] fix: prevent duplicates in attribute popup --- src/components/MapPopup.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MapPopup.svelte b/src/components/MapPopup.svelte index dff1ec5..824ad6e 100644 --- a/src/components/MapPopup.svelte +++ b/src/components/MapPopup.svelte @@ -74,7 +74,7 @@ features = map .queryRenderedFeatures(queryBox, { - layers: layers.polygons.concat(layers.lines.concat(layers.points)), + layers: layers.polygons.filter(s=>!s.endsWith('-outline')).concat(layers.lines.concat(layers.points)), }) ?.sortBy({ prop: 'sourceLayer' }) .map((f) => {