Skip to content

Commit

Permalink
filtering across layers
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfleis committed Jan 22, 2025
1 parent 22624b9 commit 70baeea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,14 @@
const value = e.target.value;
if (value === 'all') {
map.setFilter('buildings', null);
map.setFilter('morphotopes', null);
map.setFilter('h3', null);
map.setFilter('grid', null);
} else {
map.setFilter('buildings', ['==', ['get', 'final_without_noise'], value]);
map.setFilter('morphotopes', ['==', ['get', 'final_without_noise'], value]);
map.setFilter('h3', ['==', ['get', 'final_without_noise'], value]);
map.setFilter('grid', ['==', ['get', 'final_without_noise'], value]);
}
};

Expand Down

0 comments on commit 70baeea

Please sign in to comment.