explore: fix by-type layer visibility — only show selected types

This commit is contained in:
Davide Scaini
2026-05-14 15:43:12 +02:00
parent 4e32cf4f21
commit 298fe3ea39
+2 -1
View File
@@ -146,7 +146,8 @@
map.setLayoutProperty('explore-lines', 'visibility', view === 'lines' ? 'visible' : 'none'); map.setLayoutProperty('explore-lines', 'visibility', view === 'lines' ? 'visible' : 'none');
map.setLayoutProperty('explore-heat-global', 'visibility', view === 'heatmap' && heatMode === 'global' ? 'visible' : 'none'); map.setLayoutProperty('explore-heat-global', 'visibility', view === 'heatmap' && heatMode === 'global' ? 'visible' : 'none');
for (const t of HEAT_TYPES) for (const t of HEAT_TYPES)
map.setLayoutProperty(`explore-heat-${t}`, 'visibility', view === 'heatmap' && heatMode === 'bytype' ? 'visible' : 'none'); map.setLayoutProperty(`explore-heat-${t}`, 'visibility',
view === 'heatmap' && heatMode === 'bytype' && selectedTypes.has(t) ? 'visible' : 'none');
} }
function _fitBounds(ts: Track[]) { function _fitBounds(ts: Track[]) {