diff --git a/MapControl/Shared/MapImageLayer.cs b/MapControl/Shared/MapImageLayer.cs index b7969bb2..4571ad34 100644 --- a/MapControl/Shared/MapImageLayer.cs +++ b/MapControl/Shared/MapImageLayer.cs @@ -57,13 +57,13 @@ namespace MapControl public static readonly DependencyProperty LoadingProgressProperty = DependencyProperty.Register( nameof(LoadingProgress), typeof(double), typeof(MapImageLayer), new PropertyMetadata(1d)); - private readonly Progress imageProgress; + private readonly Progress loadingProgress; private readonly DispatcherTimer updateTimer; private bool updateInProgress; public MapImageLayer() { - imageProgress = new Progress(p => LoadingProgress = p); + loadingProgress = new Progress(p => LoadingProgress = p); updateTimer = this.CreateTimer(UpdateInterval); updateTimer.Tick += async (s, e) => await UpdateImageAsync(); @@ -196,7 +196,7 @@ namespace MapControl { try { - image = await GetImageAsync(boundingBox, imageProgress); + image = await GetImageAsync(boundingBox, loadingProgress); } catch (Exception ex) { diff --git a/MapControl/Shared/MapTileLayerBase.cs b/MapControl/Shared/MapTileLayerBase.cs index 29e4529c..4aae48dd 100644 --- a/MapControl/Shared/MapTileLayerBase.cs +++ b/MapControl/Shared/MapTileLayerBase.cs @@ -59,7 +59,7 @@ namespace MapControl public static readonly DependencyProperty LoadingProgressProperty = DependencyProperty.Register( nameof(LoadingProgress), typeof(double), typeof(MapTileLayerBase), new PropertyMetadata(1d)); - private readonly IProgress loadingProgress; + private readonly Progress loadingProgress; private readonly DispatcherTimer updateTimer; private MapBase parentMap; diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index a7e851b3..89451550 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -177,7 +177,7 @@ namespace MapControl { var cacheName = SourceName; - if (tileMatrixSet != null && TileSource is WmtsTileSource tileSource) + if (TileSource is WmtsTileSource tileSource) { tileSource.TileMatrixSet = tileMatrixSet;