mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
ImageTileList constructor
This commit is contained in:
parent
d513ea249e
commit
722408645b
|
|
@ -5,6 +5,15 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
public class ImageTileList : List<ImageTile>
|
public class ImageTileList : List<ImageTile>
|
||||||
{
|
{
|
||||||
|
public ImageTileList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageTileList(ImageTileList source, TileMatrix tileMatrix, int columnCount)
|
||||||
|
{
|
||||||
|
FillMatrix(source, tileMatrix.ZoomLevel, tileMatrix.XMin, tileMatrix.YMin, tileMatrix.XMax, tileMatrix.YMax, columnCount);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds existing ImageTile from the source collection or newly created ImageTile to fill the specified tile matrix.
|
/// Adds existing ImageTile from the source collection or newly created ImageTile to fill the specified tile matrix.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -83,14 +83,11 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
TileMatrix = new TileMatrix(TileMatrix.ZoomLevel, xMin, yMin, xMax, yMax);
|
TileMatrix = new TileMatrix(TileMatrix.ZoomLevel, xMin, yMin, xMax, yMax);
|
||||||
|
Tiles = new ImageTileList(Tiles, TileMatrix, WmtsTileMatrix.MatrixWidth);
|
||||||
var tiles = new ImageTileList();
|
|
||||||
tiles.FillMatrix(Tiles, TileMatrix.ZoomLevel, xMin, yMin, xMax, yMax, WmtsTileMatrix.MatrixWidth);
|
|
||||||
Tiles = tiles;
|
|
||||||
|
|
||||||
Children.Clear();
|
Children.Clear();
|
||||||
|
|
||||||
foreach (var tile in tiles)
|
foreach (var tile in Tiles)
|
||||||
{
|
{
|
||||||
Children.Add(tile.Image);
|
Children.Add(tile.Image);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue