hslayers / hslayers-ng

User interface and map building extensions for OpenLayers
https://ng.hslayers.org/
MIT License
36 stars 20 forks source link

cloneView function is not working properly #2522

Closed FilipLeitner closed 2 years ago

FilipLeitner commented 2 years ago

Bug

Describe the bug

view.getProperties() is not returning all 'options' defined in config.default_view. In result we are not able to change projections.

Expected behavior View shoudl be cloned with all the options

Screenshots image

image

https://github.com/hslayers/hslayers-ng/commit/a307da483adc602743ecde9ed68bce5ae247453b

raitisbe commented 2 years ago

Ah that was the reason why we ended up with options_ before. It's possible to use getProjection(), but not getMultiWorld. Maybe its time to revisit the usage of the original view in default_view instead of cloning it.

jmacura commented 2 years ago

Oddly, the projection does work in my application based on HSL 7.

image

raitisbe commented 2 years ago

The cloning was done due to the fact that OL version in the container application was might be different from the OL in hslayers-ng/node_modules and we ended up with blank screen in some cases. Nowadays we can use paths in tsconfig to circumvent that.