diff --git a/src/SldStyleParser.ts b/src/SldStyleParser.ts index 005c2957..0b238896 100644 --- a/src/SldStyleParser.ts +++ b/src/SldStyleParser.ts @@ -812,7 +812,10 @@ export class SldStyleParser implements StyleParser { } textSymbolizer.color = color ? color : '#000000'; - textSymbolizer.opacity = isNil(opacity) ? 1 : numberExpression(opacity); + + if (!isNil(opacity)) { + textSymbolizer.opacity = numberExpression(opacity); + } const haloRadius = get(sldSymbolizer, 'Halo.Radius.#text'); if (!isNil(haloRadius)) {