Closed MichaelTang778 closed 3 months ago
Thanks for the info @MichaelTang778
The openlayers parser does not support rectangular shapes and non-numeric scales, yet. Currently, we support:
Would you like to create a PR that introduces that feature?
I would love to, but I'm moving on from my current role in January and will be working on other stuff. Maybe someone else can implement this :)
I think the core issue is that the geostyler-style only accepts a single value for the size of a marker (radius
). Changing this would be a breaking change. But we could consider to allow both. A single value or an array of values.
I created an issue in the geostyler-style in favour: https://github.com/geostyler/geostyler-style/issues/619
Bug
Describe the bug
When converting from openlayer style to geoserver style, the rectangle shape fails to parse correctly for ol.style.RegularShape. The reason for this is because the scale doesn't get parsed correctly. For rectangle shapes the scale have an array of two numbers and for shapes that are not of rectangle have a scale with one number stored.
A clear and concise description of what the bug is.
rectangleStyle: images -> scale_ = [1, 0.5]
olStyleNew images -> scale_ = 1
Expected behavior It is expected that the rectangle shape can be parsed correctly from openlayer style to geoserver style.
Screenshots If applicable, add screenshots to help explain your problem.
Screenshot showing original rectangleStyle![style](https://user-images.githubusercontent.com/77065939/144265815-658c7b8c-cc83-4788-91fb-f0cd5a0323fe.png)
Screenshot showing ol style to geoserver style![olToGeoserver](https://user-images.githubusercontent.com/77065939/144265853-f2af1f32-c53f-4ca3-aa61-568e20694603.png)
screenshot showing geoserver style converted back to ol style![GeoserverToOl](https://user-images.githubusercontent.com/77065939/144265891-6593f4a2-6108-4892-8069-02efe4b1d053.png)
Desktop (please complete the following information):