Project with rotation to avoid MobileLayerTransformer #1696
Replies: 1 comment 1 reply
-
In regards to the documentation, it's worded that way on purpose. In regards to just including rotation along with the default projections, I'm not really an expert around that stuff :D. I believe it may have come up before, but there were possibly some issues or something. Open to changing this again, just not too quickly after v6! But best to leave me out of the technical conversation around projections. |
Beta Was this translation helpful? Give feedback.
-
I really like the merge of the children properties into one done by #1615
However the
MobileLayerTransformer
feels incorrectly documented as it only rotates the layer, while the docs says:I was confused, that at first all my custom layers seemed to work correctly without it, until I started rotating the map.
That got me thinking, wouldn't it be possible to include the rotation in the projection? Or at least another function that returns the projected points correctly rotated? This way no
MobileLayerTransformer
is needed when writing most custom layers.At least I slightly suffered from this as I implemented some of my layers as
RenderObjectWidget
s where I wasn't able to simply throw in theMobileLayerTransformer
.More importantly though this could improve the marker layer as it removes the need of counter rotating map markers.
Also when the map rotates markers usually have to be re-evaluated anyway (check if marker lies inside the visible bounds/view or not).
I think layers like polygon, circle and line layer should likewise benefit from it.
Other layers like the tile layer could still use a
Transform
widget themselves.Working code to project and rotate:
This has probably been discussed at some point. I'm curious what your thoughts are.
Beta Was this translation helpful? Give feedback.
All reactions