Open florentsuc opened 3 months ago
Thanks for the detailed report.
As you always got so far with the research it would be nice if you could provide a PR with the adjustment and the corresponding tests. Otherwise this might need some time to be fixed.
Bug
Describe the bug Converting from SLD to OpenLayers style, offsets on MarkSymbolizer are no longer handled, even though the SLD uses displacement. Displacement is transformed to
undefined
.To Reproduce Steps to reproduce the behavior:
Example:
Expected behavior
offset
property should not be undefinedDesktop (please complete the following information): OS: Mac OS Browser: Chrome Version: 122.0
Additional context The bug has been introduced here: https://github.com/geostyler/geostyler-openlayers-parser/blob/2d8a80444227e9f3523a744c9e842af0b98b9ee1/src/OlStyleParser.ts#L1046
Proposed solution
offset
is not anumber
, it is anarray
, so we could checkArray.isArray(offset)