mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
TileSources, WMTS
This commit is contained in:
parent
605185db6e
commit
ce7c33f6e4
7 changed files with 70 additions and 63 deletions
|
|
@ -80,8 +80,6 @@ namespace MapControl
|
|||
|
||||
protected IEnumerable<WmtsTileMatrixLayer> ChildLayers => Children.Cast<WmtsTileMatrixLayer>();
|
||||
|
||||
protected virtual WmtsTileSource CreateTileSource(string uriTemplate) => new() { UriTemplate = uriTemplate };
|
||||
|
||||
protected override Size MeasureOverride(Size availableSize)
|
||||
{
|
||||
foreach (var layer in ChildLayers)
|
||||
|
|
@ -126,7 +124,10 @@ namespace MapControl
|
|||
cacheName += "/" + Layer.Replace(':', '_');
|
||||
}
|
||||
|
||||
cacheName += "/" + tileMatrixSet.Identifier.Replace(':', '_');
|
||||
if (!string.IsNullOrEmpty(tileMatrixSet.Identifier))
|
||||
{
|
||||
cacheName += "/" + tileMatrixSet.Identifier.Replace(':', '_');
|
||||
}
|
||||
}
|
||||
|
||||
BeginLoadTiles(ChildLayers.SelectMany(layer => layer.Tiles), cacheName);
|
||||
|
|
@ -207,7 +208,7 @@ namespace MapControl
|
|||
}
|
||||
|
||||
Layer = capabilities.Layer;
|
||||
TileSource = CreateTileSource(capabilities.UrlTemplate);
|
||||
TileSource = new WmtsTileSource { UriTemplate = capabilities.UriTemplate };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue