XAML-Map-Control/MapControl/Tile.cs
ClemensF 91ff46c506 Version 2.3.0:
- Added BingMapsTileLayer
- Added TileLayer.DescriptionInlines property
- Added global Settings class
- Added Phone Silverlight 8.1 build target
- Use expiration time of downloaded images for caching
2014-10-19 21:50:23 +02:00

40 lines
901 B
C#

// XAML Map Control - http://xamlmapcontrol.codeplex.com/
// Copyright © 2014 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
using System;
#if WINDOWS_RUNTIME
using Windows.UI.Xaml.Controls;
#else
using System.Windows.Controls;
#endif
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 };
public Tile(int zoomLevel, int x, int y)
{
ZoomLevel = zoomLevel;
X = x;
Y = y;
}
public bool HasImageSource { get; private set; }
public int XIndex
{
get
{
var numTiles = 1 << ZoomLevel;
return ((X % numTiles) + numTiles) % numTiles;
}
}
}
}