Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I rotate only 'TileLayerOptions' #723

Closed
fluttercid opened this issue Aug 7, 2020 · 4 comments · Fixed by #719
Closed

How can I rotate only 'TileLayerOptions' #723

fluttercid opened this issue Aug 7, 2020 · 4 comments · Fixed by #719

Comments

@fluttercid
Copy link

fluttercid commented Aug 7, 2020

I have 3 layers such as TileLayerOptions, ZoomButtonsPluginOption and ScaleLayerPluginOption.
When I appled the rotation function, all layers are rotated.
I want to rotate only TileLayerOptions layer.
Is there any solution for this?
Thank you for your help in advance.

before:
image

after:
image

@maRci002
Copy link
Contributor

maRci002 commented Aug 9, 2020

I'll add this feature in #719.
You are right not all plugins should rotate.

There are two ways to go:

  • specify separately non rotate and rotate layers so rotate layers will be always the bottom one
  • able to mix rotate and non rotate layers with a flag

@fluttercid
Copy link
Author

Thank you so much.
I will try it.

@maRci002
Copy link
Contributor

#719 now implements this behavior: able to mix rotate and non rotate layers with a flag

Note: onTap, onLongPress still gives back the LatLng according to rotation.

I think I'll refactor to specify separately non rotate and rotate layers so rotate layers will be always the bottom one because rotating the whole layer tree is much faster than rotate one by one.

@maRci002
Copy link
Contributor

PR updated now there are layers / nonRotatedLayers and children / nonRotatedChildren examples updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants