mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-20 22:05:07 +00:00
Support for URNs in WmtsCapabilities
This commit is contained in:
parent
86db4768a5
commit
b423cc2d36
1 changed files with 11 additions and 1 deletions
|
|
@ -160,7 +160,7 @@ namespace MapControl
|
||||||
|
|
||||||
urlTemplate = capabilitiesUrl.Substring(0, requestIndex)
|
urlTemplate = capabilitiesUrl.Substring(0, requestIndex)
|
||||||
+ "Request=GetTile"
|
+ "Request=GetTile"
|
||||||
+ capabilitiesUrl.Substring(requestIndex + 23)
|
+ capabilitiesUrl.Substring(requestIndex + "Request=GetCapabilities".Length)
|
||||||
+ "&Version=1.0.0"
|
+ "&Version=1.0.0"
|
||||||
+ "&Layer=" + layerIdentifier
|
+ "&Layer=" + layerIdentifier
|
||||||
+ "&Format=" + format
|
+ "&Format=" + format
|
||||||
|
|
@ -199,6 +199,16 @@ namespace MapControl
|
||||||
throw new ArgumentException($"No ows:SupportedCRS element found in TileMatrixSet \"{identifier}\".");
|
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>();
|
var tileMatrixes = new List<WmtsTileMatrix>();
|
||||||
|
|
||||||
foreach (var tileMatrixElement in tileMatrixSetElement.Descendants(ns + "TileMatrix"))
|
foreach (var tileMatrixElement in tileMatrixSetElement.Descendants(ns + "TileMatrix"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue