mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Update Tile class
This commit is contained in:
parent
6903c4a436
commit
7fa2e37266
7 changed files with 17 additions and 10 deletions
|
|
@ -235,11 +235,11 @@ namespace MapControl
|
|||
tile = new Tile(z, x, y);
|
||||
|
||||
var equivalentTile = Tiles.FirstOrDefault(
|
||||
t => t.ZoomLevel == z && t.XIndex == tile.XIndex && t.Y == y && !t.Pending);
|
||||
t => !t.Pending && t.ZoomLevel == z && t.Y == y && t.XIndex == tile.XIndex);
|
||||
|
||||
if (equivalentTile != null)
|
||||
{
|
||||
tile.SetImage(equivalentTile.Image.Source, false); // no fade-in animation
|
||||
tile.SetImageSource(equivalentTile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,13 @@ namespace MapControl
|
|||
|
||||
public bool Pending { get; set; } = true;
|
||||
|
||||
public void SetImageSource(Tile tile)
|
||||
{
|
||||
Pending = false;
|
||||
Image.Opacity = 1d;
|
||||
Image.Source = tile.Image.Source;
|
||||
}
|
||||
|
||||
private void FadeIn()
|
||||
{
|
||||
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue