-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
Implement map rotation #116
Comments
I think the challenge here will be to determine what "box" the map tiles need to render in. (e.g. rotating the map may result in tiles in the viewport not being fetched) kinda similar to this problem: https://stackoverflow.com/questions/10392658/calculate-the-bounding-boxs-x-y-height-and-width-of-a-rotated-element-via-jav/11771163 except the blue rectangle needs to be large enough such that the red rectangle (the viewport) is covered. i think Flutter supports rotation so i don't see that piece being a huge effort. |
Yes exactly. Thanks for making an illustration. I'm going to mark this as "help wanted" since this is a slightly challenging problem! |
Just thinking about this, rotation would be nice, but what about things like text on a tile, wouldn't that mean it's now upside down if we rotate 180, would that be a bad experience ? Would it only be useful for tiles without text, or vector tiles or something ? |
@ibrierley I think it would still be useful even with text on tiles. Humans are pretty good at reading stuff that is rotated. I have noticed that google maps automatically rotates street names (maybe it's a separate layer or something?). That is of course the optimal solution but I don't think many free map providers offer this? (Correct me if I'm wrong) |
Yes I suspect that is one of the reasons Leaflet does not support rotation. |
We will need this functionality in our project. So I will have a closer look at this. |
Not sure if that is enough for you needs. It only allows to rotate the map from the App side. |
This issue still isn't fully resolved AFAICT. There's still work to be done to make sure that tiles on the edge of the viewport are displayed |
That is strange because I haven't seen that when I tested it can you show me an example? Flutter_map has sometimes a problem not to fill the whole space. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
It would be nice to be able to rotate the map.
Take a look at flutter/flutter#17345.
The
mapOptions
could also take an optional argumentallowMapRotation
, that would default to true. Maybe everyone doesn't need or want map rotation...The text was updated successfully, but these errors were encountered: