Update MapTileLayerBase.cs

This commit is contained in:
ClemensFischer 2025-01-26 21:14:18 +01:00
parent 1f8164e82d
commit 60c76a4b0b

View file

@ -31,7 +31,7 @@ namespace MapControl
{
public static readonly DependencyProperty TileSourceProperty =
DependencyPropertyHelper.Register<MapTileLayerBase, TileSource>(nameof(TileSource), null,
async (layer, oldValue, newValue) => await layer.UpdateAsync(true));
async (layer, oldValue, newValue) => await layer.Update(true));
public static readonly DependencyProperty SourceNameProperty =
DependencyPropertyHelper.Register<MapTileLayerBase, string>(nameof(SourceName));
@ -70,7 +70,7 @@ namespace MapControl
loadingProgress = new Progress<double>(p => SetValue(LoadingProgressProperty, p));
updateTimer = this.CreateTimer(UpdateInterval);
updateTimer.Tick += async (s, e) => await UpdateAsync(false);
updateTimer.Tick += async (s, e) => await Update(false);
MapPanel.SetRenderTransform(this, new MatrixTransform());
#if WPF
@ -201,7 +201,7 @@ namespace MapControl
return TileImageLoader.LoadTilesAsync(tiles, TileSource, cacheName, loadingProgress);
}
private Task UpdateAsync(bool tileSourceChanged)
private Task Update(bool tileSourceChanged)
{
updateTimer.Stop();
@ -212,7 +212,7 @@ namespace MapControl
{
if (e.TransformCenterChanged || e.ProjectionChanged || Children.Count == 0)
{
await UpdateAsync(false); // update immediately
await Update(false); // update immediately
}
else
{