mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Support for URNs in WmtsCapabilities
This commit is contained in:
parent
86db4768a5
commit
b423cc2d36
|
|
@ -160,7 +160,7 @@ namespace MapControl
|
|||
|
||||
urlTemplate = capabilitiesUrl.Substring(0, requestIndex)
|
||||
+ "Request=GetTile"
|
||||
+ capabilitiesUrl.Substring(requestIndex + 23)
|
||||
+ capabilitiesUrl.Substring(requestIndex + "Request=GetCapabilities".Length)
|
||||
+ "&Version=1.0.0"
|
||||
+ "&Layer=" + layerIdentifier
|
||||
+ "&Format=" + format
|
||||
|
|
@ -199,6 +199,16 @@ namespace MapControl
|
|||
throw new ArgumentException($"No ows:SupportedCRS element found in TileMatrixSet \"{identifier}\".");
|
||||
}
|
||||
|
||||
if (supportedCrs.StartsWith("urn:")) // e.g. "urn:ogc:def:crs:EPSG:6.18:3857")
|
||||
{
|
||||
var urn = supportedCrs.Split(':');
|
||||
|
||||
if (urn.Length == 7 && urn[3] == "crs" && urn[4] == "EPSG")
|
||||
{
|
||||
supportedCrs = "EPSG:" + urn[6];
|
||||
}
|
||||
}
|
||||
|
||||
var tileMatrixes = new List<WmtsTileMatrix>();
|
||||
|
||||
foreach (var tileMatrixElement in tileMatrixSetElement.Descendants(ns + "TileMatrix"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue