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

Multitouch rotation in WPF #10

Closed
pauldendulk opened this issue Sep 9, 2014 · 3 comments
Closed

Multitouch rotation in WPF #10

pauldendulk opened this issue Sep 9, 2014 · 3 comments

Comments

@pauldendulk
Copy link
Member

No description provided.

@pauldendulk
Copy link
Member Author

This issue has big impact and there are many ways to approach it so it requires some thinking. Some initial thoughts in random order:

  • There should be a Rotation field in IViewport
  • First focus on WPF only. Everything else should keep working as long as IViewport.Rotation is zero.
  • Projects affected will be:
    • Mapsui.Rendering.Xaml
    • Mapsiu.UI.Xaml
    • parts of Mapsui (Viewport)
  • Two approached:
    • Render everything as if rotation is zero and rotate the entire result. So in WPF the main render canvas should be rotated. Without further measures the consequence will be that data will be missing in the corners. To counter this the Viewport.Extent should be increased in size to fill the complete viewport. The disadvantage is that more data will be fetched than necessary. I prefer this approach.
    • Rotate every feature individually. Use a rectangular Geometry not a BoundingBox to fetch data so only data is fetched that is actually used. This approach is more in line with how a 3D graphics engine works but has a bigger impact.
  • Perhaps it is also possible to keep the Extent as is and correct for rotation when necessary. But I don't like the idea that the Extent is actually not correct. I expect many places where this correction should be necessary.
  • In the Viewport.Extent the extent should be grown if rotated so all corners of the map are covered.
  • In Mapsui.Rendering.Xaml there are 4 uses of extent of which 3 are in GetFeaturesInView. There you just need the grown extent. One is in the RasterizingProvider. This can be ignored for now.
  • The Viewport.Transform should take rotation into account. This might be hard to get right.

@pauldendulk
Copy link
Member Author

Above comments were made when quickly glancing at the code. If anyone else looks into this I would like to hear your thoughts.

@pauldendulk
Copy link
Member Author

fixed with #11

pauldendulk pushed a commit that referenced this issue Feb 8, 2019
Merge from Mapsui/Mapsui
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

No branches or pull requests

1 participant