mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Version 4.12.2 Reverted to previous ITileImageLoader
This commit is contained in:
parent
ad17312118
commit
21d7fa842d
2 changed files with 37 additions and 45 deletions
|
|
@ -21,10 +21,7 @@ namespace MapControl
|
|||
{
|
||||
public interface ITileImageLoader
|
||||
{
|
||||
TileSource TileSource { get; set; }
|
||||
string SourceName { get; set; }
|
||||
|
||||
void LoadTilesAsync(IEnumerable<Tile> tiles);
|
||||
void LoadTilesAsync(IEnumerable<Tile> tiles, TileSource tileSource, string sourceName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -54,8 +51,7 @@ namespace MapControl
|
|||
new PropertyMetadata(null, (o, e) => ((MapTileLayer)o).TileSourcePropertyChanged()));
|
||||
|
||||
public static readonly DependencyProperty SourceNameProperty = DependencyProperty.Register(
|
||||
nameof(SourceName), typeof(string), typeof(MapTileLayer),
|
||||
new PropertyMetadata(null, (o, e) => ((MapTileLayer)o).TileImageLoader.SourceName = (string)e.NewValue));
|
||||
nameof(SourceName), typeof(string), typeof(MapTileLayer), new PropertyMetadata(null));
|
||||
|
||||
public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register(
|
||||
nameof(Description), typeof(string), typeof(MapTileLayer), new PropertyMetadata(null));
|
||||
|
|
@ -275,8 +271,6 @@ namespace MapControl
|
|||
|
||||
private void TileSourcePropertyChanged()
|
||||
{
|
||||
TileImageLoader.TileSource = TileSource;
|
||||
|
||||
if (TileGrid != null)
|
||||
{
|
||||
Tiles = new List<Tile>();
|
||||
|
|
@ -397,7 +391,7 @@ namespace MapControl
|
|||
Children.Add(tile.Image);
|
||||
}
|
||||
|
||||
TileImageLoader.LoadTilesAsync(Tiles);
|
||||
TileImageLoader.LoadTilesAsync(Tiles, TileSource, SourceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue