From 9c455a64287da0dbd7ebc628705d7b575f52236b Mon Sep 17 00:00:00 2001 From: jansule Date: Mon, 12 Feb 2024 17:06:59 +0100 Subject: [PATCH] refactor: use existing vars for subpaths --- src/SldStyleParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SldStyleParser.ts b/src/SldStyleParser.ts index 9ac0c9e6..19809e91 100644 --- a/src/SldStyleParser.ts +++ b/src/SldStyleParser.ts @@ -707,7 +707,7 @@ export class SldStyleParser implements StyleParser { const linePlacement = get(placement, 'LinePlacement'); if (!isNil(pointPlacement)) { textSymbolizer.placement = 'point'; - const displacement = get(placement, 'PointPlacement.Displacement'); + const displacement = get(pointPlacement, 'Displacement'); if (!isNil(displacement)) { const x = get(displacement, 'DisplacementX.#text'); const y = get(displacement, 'DisplacementY.#text'); @@ -716,7 +716,7 @@ export class SldStyleParser implements StyleParser { Number.isFinite(y) ? numberExpression(y) : 0, ]; } - const rotation = get(placement, 'PointPlacement.Rotation.#text'); + const rotation = get(pointPlacement, 'Rotation.#text'); if (!isNil(rotation)) { textSymbolizer.rotate = numberExpression(rotation); }