mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapTileLayerBase.cs
This commit is contained in:
parent
1f8164e82d
commit
60c76a4b0b
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue