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)
|
private void UpdateTiles(WmtsTileMatrixSet tileMatrixSet)
|
||||||
{
|
{
|
||||||
var tiles = new List<Tile>();
|
var tiles = new List<Tile>();
|
||||||
|
var cacheName = SourceName;
|
||||||
|
|
||||||
foreach (var layer in ChildLayers)
|
foreach (var layer in ChildLayers)
|
||||||
{
|
{
|
||||||
|
|
@ -161,14 +162,11 @@ namespace MapControl
|
||||||
tiles.AddRange(layer.Tiles);
|
tiles.AddRange(layer.Tiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
var tileSource = TileSource as WmtsTileSource;
|
if (tileMatrixSet != null && TileSource is WmtsTileSource tileSource)
|
||||||
var cacheName = SourceName;
|
|
||||||
|
|
||||||
if (tileSource != null && tileMatrixSet != null)
|
|
||||||
{
|
{
|
||||||
tileSource.TileMatrixSet = tileMatrixSet;
|
tileSource.TileMatrixSet = tileMatrixSet;
|
||||||
|
|
||||||
if (cacheName != null)
|
if (!string.IsNullOrEmpty(cacheName))
|
||||||
{
|
{
|
||||||
cacheName += "/" + tileMatrixSet.Identifier
|
cacheName += "/" + tileMatrixSet.Identifier
|
||||||
.Replace(':', '_')
|
.Replace(':', '_')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue