mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Removed azimuthal and "auto" map projections
Removing these projections - which were never really well implemented - greatly simplifies the code. There is no ProjectionCenter anymore and MapProjection methods do not return null Locations or Points.
This commit is contained in:
parent
f4481c31f0
commit
76b879dfac
37 changed files with 181 additions and 1076 deletions
|
|
@ -180,7 +180,7 @@ namespace MapControl
|
|||
updateTimer.Stop();
|
||||
|
||||
ImageSource image = null;
|
||||
MapRect mapRect = null;
|
||||
Rect? mapRect = null;
|
||||
|
||||
if (ParentMap != null &&
|
||||
(SupportedCrsIds == null || SupportedCrsIds.Contains(ParentMap.MapProjection.CrsId)))
|
||||
|
|
@ -193,8 +193,8 @@ namespace MapControl
|
|||
var x = (ParentMap.ActualWidth - width) / 2d;
|
||||
var y = (ParentMap.ActualHeight - height) / 2d;
|
||||
|
||||
mapRect = ParentMap.ViewToMapRect(new Rect(x, y, width, height));
|
||||
image = await GetImageAsync(mapRect.Rect, loadingProgress);
|
||||
mapRect = ParentMap.ViewTransform.ViewToMapBounds(new Rect(x, y, width, height));
|
||||
image = await GetImageAsync(mapRect.Value, loadingProgress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
private void SwapImages(ImageSource image, MapRect mapRect)
|
||||
private void SwapImages(ImageSource image, Rect? mapRect)
|
||||
{
|
||||
if (Children.Count >= 2)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue