Updated MapTileLayer

This commit is contained in:
ClemensF 2020-10-29 21:46:41 +01:00
parent 8eb3c072f5
commit 0a17a73949
3 changed files with 99 additions and 95 deletions

View file

@ -2,7 +2,6 @@
// © 2020 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@ -19,11 +18,6 @@ namespace MapControl
{
public partial class Tile
{
public readonly int ZoomLevel;
public readonly int X;
public readonly int Y;
public readonly Image Image = new Image { Opacity = 0d, Stretch = Stretch.Fill };
public Tile(int zoomLevel, int x, int y)
{
ZoomLevel = zoomLevel;
@ -31,7 +25,9 @@ namespace MapControl
Y = y;
}
public bool Pending { get; set; } = true;
public int ZoomLevel { get; }
public int X { get; }
public int Y { get; }
public int XIndex
{
@ -42,6 +38,10 @@ namespace MapControl
}
}
public Image Image { get; } = new Image { Opacity = 0d, Stretch = Stretch.Fill };
public bool Pending { get; set; } = true;
private void FadeIn()
{
Image.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation