Version 4.10.0: Updated target framework versions. Cleanup of TypeConverters, ImageLoader, MBTileSource.

This commit is contained in:
ClemensF 2018-08-14 23:16:10 +02:00
parent d859a9c4f9
commit 147b56260d
4 changed files with 7 additions and 11 deletions

View file

@ -34,7 +34,7 @@ namespace MapControl
{
imageSource = await LoadLocalImageAsync(uri);
}
else if (uri.Scheme == "http" || uri.Scheme == "https")
else if (uri.Scheme == "http")
{
imageSource = await LoadHttpImageAsync(uri);
}

View file

@ -41,7 +41,7 @@ namespace MapControl
{
SourceName = "OpenStreetMap",
Description = "© [OpenStreetMap Contributors](http://www.openstreetmap.org/copyright)",
TileSource = new TileSource { UriFormat = "https://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png" },
TileSource = new TileSource { UriFormat = "http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png" },
MaxZoomLevel = 19
};
}
@ -374,7 +374,7 @@ namespace MapControl
if (equivalentTile != null)
{
tile.SetImage(equivalentTile.Image.Source, false); // no fade-in animation
tile.SetImage(equivalentTile.Image.Source, false); // do not animate to avoid flicker when crossing 180° longitude
}
}

View file

@ -28,8 +28,7 @@ namespace MapControl
}
else
{
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { From = 0d, To = 1d, Duration = FadeDuration, FillBehavior = FillBehavior.Stop });
Image.Opacity = 1d;
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { To = 1d, Duration = FadeDuration });
}
}
else
@ -47,8 +46,7 @@ namespace MapControl
bitmapImage.ImageOpened -= BitmapImageOpened;
bitmapImage.ImageFailed -= BitmapImageFailed;
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { From = 0d, To = 1d, Duration = FadeDuration, FillBehavior = FillBehavior.Stop });
Image.Opacity = 1d;
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation { To = 1d, Duration = FadeDuration });
}
private void BitmapImageFailed(object sender, ExceptionRoutedEventArgs e)

View file

@ -28,8 +28,7 @@ namespace MapControl
}
else
{
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(0d, 1d, FadeDuration, FillBehavior.Stop));
Image.Opacity = 1d;
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(1d, FadeDuration));
}
}
else
@ -47,8 +46,7 @@ namespace MapControl
bitmapSource.DownloadCompleted -= BitmapDownloadCompleted;
bitmapSource.DownloadFailed -= BitmapDownloadFailed;
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(0d, 1d, FadeDuration, FillBehavior.Stop));
Image.Opacity = 1d;
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(1d, FadeDuration));
}
private void BitmapDownloadFailed(object sender, ExceptionEventArgs e)