From 7da0f7f9af5210858227e96cf4b661b4544ed3b7 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Fri, 19 Sep 2025 18:57:54 +0200 Subject: [PATCH] SupportedCrs --- MapControl/Shared/WmtsTileLayer.cs | 4 ++-- MapControl/Shared/WmtsTileMatrixSet.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index e1bc2861..b1c9dc51 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -200,10 +200,10 @@ namespace MapControl var capabilities = await WmtsCapabilities.ReadCapabilitiesAsync(CapabilitiesUri, Layer); foreach (var tileMatrixSet in capabilities.TileMatrixSets - .Where(s => !TileMatrixSets.ContainsKey(s.SupportedMapProjection) || + .Where(s => !TileMatrixSets.ContainsKey(s.SupportedCrs) || PreferredTileMatrixSets != null && PreferredTileMatrixSets.Contains(s.Identifier))) { - TileMatrixSets[tileMatrixSet.SupportedMapProjection] = tileMatrixSet; + TileMatrixSets[tileMatrixSet.SupportedCrs] = tileMatrixSet; } Layer = capabilities.Layer; diff --git a/MapControl/Shared/WmtsTileMatrixSet.cs b/MapControl/Shared/WmtsTileMatrixSet.cs index 8eb26e2d..5dd16328 100644 --- a/MapControl/Shared/WmtsTileMatrixSet.cs +++ b/MapControl/Shared/WmtsTileMatrixSet.cs @@ -6,16 +6,16 @@ namespace MapControl { public class WmtsTileMatrixSet { - public WmtsTileMatrixSet(string identifier, string supportedMapProjection, IEnumerable tileMatrixes) + public WmtsTileMatrixSet(string identifier, string supportedCrs, IEnumerable tileMatrixes) { if (string.IsNullOrEmpty(identifier)) { throw new ArgumentException($"The {nameof(identifier)} argument must not be null or empty.", nameof(identifier)); } - if (string.IsNullOrEmpty(supportedMapProjection)) + if (string.IsNullOrEmpty(supportedCrs)) { - throw new ArgumentException($"The {nameof(supportedMapProjection)} argument must not be null or empty.", nameof(supportedMapProjection)); + throw new ArgumentException($"The {nameof(supportedCrs)} argument must not be null or empty.", nameof(supportedCrs)); } if (tileMatrixes == null || !tileMatrixes.Any()) @@ -24,12 +24,12 @@ namespace MapControl } Identifier = identifier; - SupportedMapProjection = supportedMapProjection; + SupportedCrs = supportedCrs; TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList(); } public string Identifier { get; } - public string SupportedMapProjection { get; } + public string SupportedCrs { get; } public IList TileMatrixes { get; } } }