mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
WmtsTileMatrixSet.SupportedCrsId
This commit is contained in:
parent
8b3a12fccf
commit
bec830c6ec
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ namespace MapControl
|
|||
{
|
||||
public class WmtsTileMatrixSet
|
||||
{
|
||||
public WmtsTileMatrixSet(string identifier, string supportedCrs, IEnumerable<WmtsTileMatrix> tileMatrixes)
|
||||
public WmtsTileMatrixSet(string identifier, string supportedCrsId, IEnumerable<WmtsTileMatrix> 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<WmtsTileMatrix> TileMatrixes { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue