Fix: don't count layers if they are not shown by default, fix #1840

This commit is contained in:
Pieter Vander Vennet 2024-03-28 03:05:21 +01:00
parent c870544d85
commit d848171c3d

View file

@ -159,7 +159,7 @@ export default class LayerConfig extends WithContextLoader {
}
this.minzoomVisible = json.minzoomVisible ?? this.minzoom
this.shownByDefault = json.shownByDefault ?? true
this.doCount = json.isCounted ?? true
this.doCount = json.isCounted ?? this.shownByDefault ?? true
this.forceLoad = json.forceLoad ?? false
if (json.presets === null) json.presets = undefined
if (json.presets !== undefined && json.presets?.map === undefined) {