mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Minor code changes
This commit is contained in:
parent
c6f7b2d665
commit
b91faba9e7
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ namespace MapControl
|
|||
{
|
||||
var cacheName = SourceName;
|
||||
|
||||
if (tileMatrixSet != null && TileSource is WmtsTileSource tileSource)
|
||||
if (TileSource is WmtsTileSource tileSource)
|
||||
{
|
||||
tileSource.TileMatrixSet = tileMatrixSet;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue