mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update WmtsTileLayer.cs
This commit is contained in:
parent
00b738a3b5
commit
e50fb1c039
|
|
@ -154,6 +154,7 @@ namespace MapControl
|
|||
private void UpdateTiles(WmtsTileMatrixSet tileMatrixSet)
|
||||
{
|
||||
var tiles = new List<Tile>();
|
||||
var cacheName = SourceName;
|
||||
|
||||
foreach (var layer in ChildLayers)
|
||||
{
|
||||
|
|
@ -161,14 +162,11 @@ namespace MapControl
|
|||
tiles.AddRange(layer.Tiles);
|
||||
}
|
||||
|
||||
var tileSource = TileSource as WmtsTileSource;
|
||||
var cacheName = SourceName;
|
||||
|
||||
if (tileSource != null && tileMatrixSet != null)
|
||||
if (tileMatrixSet != null && TileSource is WmtsTileSource tileSource)
|
||||
{
|
||||
tileSource.TileMatrixSet = tileMatrixSet;
|
||||
|
||||
if (cacheName != null)
|
||||
if (!string.IsNullOrEmpty(cacheName))
|
||||
{
|
||||
cacheName += "/" + tileMatrixSet.Identifier
|
||||
.Replace(':', '_')
|
||||
|
|
|
|||
Loading…
Reference in a new issue