mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
WMTS tile handling
This commit is contained in:
parent
6d359a5a91
commit
0e27e95c6f
11 changed files with 100 additions and 71 deletions
|
|
@ -10,19 +10,19 @@ namespace MapControl
|
|||
{
|
||||
public WmtsTileMatrixSet TileMatrixSet { get; set; }
|
||||
|
||||
public override Uri GetUri(int x, int y, int zoomLevel)
|
||||
public override Uri GetUri(int column, int row, int zoomLevel)
|
||||
{
|
||||
Uri uri = null;
|
||||
|
||||
if (UriTemplate != null &&
|
||||
TileMatrixSet != null && TileMatrixSet.TileMatrixes.Count > zoomLevel &&
|
||||
x >= 0 && y >= 0 && zoomLevel >= 0)
|
||||
column >= 0 && row >= 0 && zoomLevel >= 0)
|
||||
{
|
||||
uri = new Uri(UriTemplate
|
||||
.Replace("{TileMatrixSet}", TileMatrixSet.Identifier)
|
||||
.Replace("{TileMatrix}", TileMatrixSet.TileMatrixes[zoomLevel].Identifier)
|
||||
.Replace("{TileCol}", x.ToString())
|
||||
.Replace("{TileRow}", y.ToString()));
|
||||
.Replace("{TileCol}", column.ToString())
|
||||
.Replace("{TileRow}", row.ToString()));
|
||||
}
|
||||
|
||||
return uri;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue