diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index 937cea2c..13267154 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -201,10 +201,10 @@ namespace MapControl var capabilities = await WmtsCapabilities.ReadCapabilitiesAsync(CapabilitiesUri, Layer); foreach (var tileMatrixSet in capabilities.TileMatrixSets - .Where(s => !TileMatrixSets.ContainsKey(s.SupportedCrs) || + .Where(s => !TileMatrixSets.ContainsKey(s.SupportedCrsId) || PreferredTileMatrixSets != null && PreferredTileMatrixSets.Contains(s.Identifier))) { - TileMatrixSets[tileMatrixSet.SupportedCrs] = tileMatrixSet; + TileMatrixSets[tileMatrixSet.SupportedCrsId] = tileMatrixSet; } Layer = capabilities.Layer; diff --git a/MapControl/Shared/WmtsTileMatrixSet.cs b/MapControl/Shared/WmtsTileMatrixSet.cs index 199494a2..6b8bb93d 100644 --- a/MapControl/Shared/WmtsTileMatrixSet.cs +++ b/MapControl/Shared/WmtsTileMatrixSet.cs @@ -6,11 +6,11 @@ namespace MapControl { public class WmtsTileMatrixSet { - public WmtsTileMatrixSet(string identifier, string supportedCrs, IEnumerable tileMatrixes) + public WmtsTileMatrixSet(string identifier, string supportedCrsId, IEnumerable tileMatrixes) { - if (string.IsNullOrEmpty(supportedCrs)) + if (string.IsNullOrEmpty(supportedCrsId)) { - throw new ArgumentException($"The {nameof(supportedCrs)} argument must not be null or empty.", nameof(supportedCrs)); + throw new ArgumentException($"The {nameof(supportedCrsId)} argument must not be null or empty.", nameof(supportedCrsId)); } if (tileMatrixes == null || !tileMatrixes.Any()) @@ -19,12 +19,12 @@ namespace MapControl } Identifier = identifier; - SupportedCrs = supportedCrs; + SupportedCrsId = supportedCrsId; TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList(); } public string Identifier { get; } - public string SupportedCrs { get; } + public string SupportedCrsId { get; } public IList TileMatrixes { get; } } }