how to keep style.Text normal when apply css rotate to .ol-layers
scil opened this issue · 1 comments
Hello @scil ,
I think it is not possible because you rotate a whole layer canvas, styles are applied inside canvas context.
Maybe you can replace text styles with vl-overlay components. It is html container bound to some map coordinate and it is overlays a layer/map canvas. But probably you also need to adjust coordinates in a some way according to rotation/perspective.
There is also exists an implementation of perspective map in the ol-ext lib https://viglino.github.io/ol-ext/examples/map/map.perspective.html. However in the current state it can't be used as is due to the fact that their ol.PerspectiveMap need a target HTML element at the construction time, in the VueLayers ol.Map constructing without HTML element and then bound to this.$el
in the Vue mounted
hook. But their implementation may be useful if make it as a decorator to the ol.Map instance.