diff --git a/MapControl/Shared/ImageLoader.cs b/MapControl/Shared/ImageLoader.cs index 5b0f401e..fc2320dc 100644 --- a/MapControl/Shared/ImageLoader.cs +++ b/MapControl/Shared/ImageLoader.cs @@ -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); } diff --git a/MapControl/Shared/MapTileLayer.cs b/MapControl/Shared/MapTileLayer.cs index 676cb21b..d9ca85a2 100644 --- a/MapControl/Shared/MapTileLayer.cs +++ b/MapControl/Shared/MapTileLayer.cs @@ -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 } } diff --git a/MapControl/UWP/Tile.UWP.cs b/MapControl/UWP/Tile.UWP.cs index a8366a53..e0b2aeb4 100644 --- a/MapControl/UWP/Tile.UWP.cs +++ b/MapControl/UWP/Tile.UWP.cs @@ -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) diff --git a/MapControl/WPF/Tile.WPF.cs b/MapControl/WPF/Tile.WPF.cs index 09ddd05c..27b1663b 100644 --- a/MapControl/WPF/Tile.WPF.cs +++ b/MapControl/WPF/Tile.WPF.cs @@ -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)