Minor code changes

This commit is contained in:
ClemensFischer 2023-08-13 07:52:11 +02:00
parent c6f7b2d665
commit b91faba9e7
3 changed files with 5 additions and 5 deletions

View file

@ -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<double> imageProgress;
private readonly Progress<double> loadingProgress;
private readonly DispatcherTimer updateTimer;
private bool updateInProgress;
public MapImageLayer()
{
imageProgress = new Progress<double>(p => LoadingProgress = p);
loadingProgress = new Progress<double>(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)
{

View file

@ -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<double> loadingProgress;
private readonly Progress<double> loadingProgress;
private readonly DispatcherTimer updateTimer;
private MapBase parentMap;

View file

@ -177,7 +177,7 @@ namespace MapControl
{
var cacheName = SourceName;
if (tileMatrixSet != null && TileSource is WmtsTileSource tileSource)
if (TileSource is WmtsTileSource tileSource)
{
tileSource.TileMatrixSet = tileMatrixSet;