Open LoriBru opened 4 years ago
This is currently by design. The UWP map control is not intended for working with non-geographic tile sets. If you're just looking for something to display a large tile set, you could try the WPF map control (or even the Multi-scale-image control directly which the WPF control uses). The nuget for the WPF control is here: https://www.nuget.org/packages/Microsoft.Maps.MapControl.WPF
I know that's by design, this is why I am suggesting to change it. I think that this limitation is really a pity. Thank you for the suggestion, I'll have a look even if it looks quite old and not mantained anymore.
The suggestion is appreciated, but it's really an entirely different use case. The UWP map control is pretty fundamentally designed to work with geographic coordinate systems - it wouldn't make sense to try and force it to behave as a simple bitmap display mechanism. It would be quite a bit of work to remove the complicated display logic for displaying a correct 3D surface based on the WGS84 ellipsoid for little user benefit since there are much simpler and more performant existing options for a simple tiled image display.
Thank you for your detailed reply. Of course I understand that this would require some work, but I think it could allow the control to be used in very interesting use cases. The possibility to navigate a tiled image, which has different zoom levels structured in a pyramidal way has a lot in common with what the MapControl already does. You are mentioning simpler and more performant options, but actually I couldn't find anything like this for WPF or (even worse) UWP.
For WPF apps, WPF Map Control NuGet should be much better at addressing this scenario and even though it hasn't been recently updated is still supported and works for arbitrary tiles For UWP, the VirtualSurfaceImageSoure appears to be what best addresses the large bitmap display scenario https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.imaging.virtualsurfaceimagesource?view=winrt-19041
Thanks very much for the support, once again. I didn't know about the VirtualSurfaceImageSoure so thank you for the suggestion. Unfortunately, it requires a different set of skills (DirectX, XAML interop) and there is very little documentation and no sample anywhere. While it's pretty easy to have a small testable prototype using the UWP Map control, trying to use this class would require a much bigger time and resources investment.
Right now there is no way to disable the Mercator projection when using the MapControl. In this way, it is impossible to properly display merely flat, non-geographiacal images.
Having the possibility to disable the Mercator projection would allow the control to be used in a big number of applications where the user needs to navigate big images (e.g. medical images).
For an example, please refer to this post: https://stackoverflow.com/questions/60921659/uwp-mapcontrol-mapprojection-for-non-geographic-images