Skip to content

Commit

Permalink
fix: offset y for textsymbolizer #566
Browse files Browse the repository at this point in the history
  • Loading branch information
pprev94 committed Jun 20, 2024
1 parent 56f231b commit e50fe61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SldStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ export class SldStyleParser implements StyleParser<string> {
const y = get(displacement, 'DisplacementY.#text');
textSymbolizer.offset = [
Number.isFinite(x) ? numberExpression(x) : 0,
Number.isFinite(y) ? numberExpression(y) : 0,
Number.isFinite(y) ? -numberExpression(y) : 0,
];
}
const rotation = get(pointPlacement, 'Rotation.#text');
Expand Down Expand Up @@ -1934,7 +1934,7 @@ export class SldStyleParser implements StyleParser<string> {
}]
}, {
[DisplacementY]: [{
'#text': textSymbolizer.offset[1].toString()
'#text': (-textSymbolizer.offset[1]).toString()
}]
}]
});
Expand Down

0 comments on commit e50fe61

Please sign in to comment.