Comments (3)
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.
from mapsui.
Above comments were made when quickly glancing at the code. If anyone else looks into this I would like to hear your thoughts.
from mapsui.
fixed with #11
from mapsui.
Related Issues (20)
- Add ZoomToBoxWidget
- Add SliderWidget
- MbTiles not load An error occurred while fetching data. Exception: no such table: tiles HOT 5
- Documentation improvements for v5
- WPF: Set background color of MapControl if no map (TileLayer) is active HOT 1
- PNG images not optimised
- Add WidgetEventargs.KeyModifiers
- Allow adding EventHandlers
- Website/documentation high CPU usage HOT 1
- How to modify ZOrder of IFeature ? HOT 4
- Animations freeze in WPF under heavy load. HOT 2
- How to use EditingWidget HOT 1
- Can use RasterizingLayer and open IsMapInfoLayer=true,performance degradation HOT 1
- Replacement of map.home function in 5.0 Beta HOT 3
- Maui performance issues under Android HOT 20
- Wrong attribution link after switching map layer HOT 2
- Performance collapse with many Refresh calls and zooming out HOT 2
- Layer is not updated after fetches because the Delayer hangs HOT 1
- Viewport.Rotation could get to 360 ° or more HOT 9
- Some of the Mapsui.Tests.Fetcher are not working HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapsui.