fix: remove old feature masks, v1.108.0

This commit is contained in:
Azgaar 2025-02-15 13:06:14 +01:00
parent e39ca793f2
commit 764993b680
5 changed files with 49 additions and 42 deletions

View file

@ -963,7 +963,6 @@ export function resolveVersionConflicts(mapVersion) {
defs.select("#land").selectAll("path, use").remove();
defs.select("#water").selectAll("path, use").remove();
viewbox.select("#coastline").selectAll("path, use").remove();
drawFeatures();
// v1.104.0 introduced bugs with state borders
regions
@ -983,4 +982,16 @@ export function resolveVersionConflicts(mapVersion) {
if (layerIsOn("toggleMarkers")) drawMarkers();
if (layerIsOn("toggleMilitary")) drawMilitary();
}
if (isOlderThan("1.108.0")) {
// v1.108.0 changed features rendering method
pack.features.forEach(f => {
// fix lakes with missing group
if (f?.type === "lake" && !f.group) f.group = "freshwater";
});
drawFeatures();
// some old maps has incorrect "heights" groups
viewbox.selectAll("#heights").remove();
}
}