Version 5.4. Reworked TileSource

This commit is contained in:
ClemensF 2020-10-23 23:35:48 +02:00
parent 5c815e951e
commit 5336d07704
22 changed files with 145 additions and 233 deletions

View file

@ -8,18 +8,13 @@ namespace MapControl
{
public class WmtsTileSource : TileSource
{
public WmtsTileSource(string uriFormat)
: base(uriFormat)
{
}
public WmtsTileMatrixSet TileMatrixSet { get; set; }
public override Uri GetUri(int x, int y, int zoomLevel)
{
Uri uri = null;
if (TileMatrixSet != null && zoomLevel >= 0 && zoomLevel < TileMatrixSet.TileMatrixes.Count)
if (UriFormat != null && TileMatrixSet != null && zoomLevel >= 0 && zoomLevel < TileMatrixSet.TileMatrixes.Count)
{
uri = new Uri(UriFormat
.Replace("{TileMatrixSet}", TileMatrixSet.Identifier)