mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-20 22:05:07 +00:00
WmtsTileMatrixSet.SupportedCrsId
This commit is contained in:
parent
8b3a12fccf
commit
bec830c6ec
2 changed files with 7 additions and 7 deletions
|
|
@ -201,10 +201,10 @@ namespace MapControl
|
||||||
var capabilities = await WmtsCapabilities.ReadCapabilitiesAsync(CapabilitiesUri, Layer);
|
var capabilities = await WmtsCapabilities.ReadCapabilitiesAsync(CapabilitiesUri, Layer);
|
||||||
|
|
||||||
foreach (var tileMatrixSet in capabilities.TileMatrixSets
|
foreach (var tileMatrixSet in capabilities.TileMatrixSets
|
||||||
.Where(s => !TileMatrixSets.ContainsKey(s.SupportedCrs) ||
|
.Where(s => !TileMatrixSets.ContainsKey(s.SupportedCrsId) ||
|
||||||
PreferredTileMatrixSets != null && PreferredTileMatrixSets.Contains(s.Identifier)))
|
PreferredTileMatrixSets != null && PreferredTileMatrixSets.Contains(s.Identifier)))
|
||||||
{
|
{
|
||||||
TileMatrixSets[tileMatrixSet.SupportedCrs] = tileMatrixSet;
|
TileMatrixSets[tileMatrixSet.SupportedCrsId] = tileMatrixSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
Layer = capabilities.Layer;
|
Layer = capabilities.Layer;
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
public class WmtsTileMatrixSet
|
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())
|
if (tileMatrixes == null || !tileMatrixes.Any())
|
||||||
|
|
@ -19,12 +19,12 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
Identifier = identifier;
|
Identifier = identifier;
|
||||||
SupportedCrs = supportedCrs;
|
SupportedCrsId = supportedCrsId;
|
||||||
TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList();
|
TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Identifier { get; }
|
public string Identifier { get; }
|
||||||
public string SupportedCrs { get; }
|
public string SupportedCrsId { get; }
|
||||||
public IList<WmtsTileMatrix> TileMatrixes { get; }
|
public IList<WmtsTileMatrix> TileMatrixes { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue