refactoring: Fix generate:layeroverview

This commit is contained in:
Pieter Vander Vennet 2023-03-29 17:56:42 +02:00
parent 41e6a2c760
commit 9b2f92dedc
25 changed files with 194 additions and 216 deletions

View file

@ -228,10 +228,13 @@ class ExpandTagRendering extends Conversion<
let found: TagRenderingConfigJson = Utils.Clone(matchingTrs[i])
if (this._options?.applyCondition) {
// The matched tagRenderings are 'stolen' from another layer. This means that they must match the layer condition before being shown
if (found.condition === undefined) {
found.condition = layer.source.osmTags
} else {
found.condition = { and: [found.condition, layer.source.osmTags] }
if (typeof layer.source !== "string") {
if (found.condition === undefined) {
found.condition = layer.source.osmTags
} else {
found.condition = { and: [found.condition, layer.source.osmTags] }
}
}
}