Multiple URLs also for unconstrained GetTile resources
This commit is contained in:
@@ -191,16 +191,14 @@ OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.Vers
|
|||||||
else {
|
else {
|
||||||
var httpGet = capabilities.operationsMetadata.GetTile.dcp.http.get;
|
var httpGet = capabilities.operationsMetadata.GetTile.dcp.http.get;
|
||||||
url = [];
|
url = [];
|
||||||
|
var constraint;
|
||||||
for (var i = 0, ii = httpGet.length; i < ii; i++) {
|
for (var i = 0, ii = httpGet.length; i < ii; i++) {
|
||||||
if (httpGet[i].constraints && httpGet[i].constraints.
|
cnstraint = httpGet[i].constraints;
|
||||||
GetEncoding.allowedValues[requestEncoding]) {
|
if (!constraint || (constraint && constraint.
|
||||||
|
GetEncoding.allowedValues[requestEncoding])) {
|
||||||
url.push(httpGet[i].url);
|
url.push(httpGet[i].url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fallback for backwards compatibility
|
|
||||||
if (url.length === 0) {
|
|
||||||
url = httpGet[0].url;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new OpenLayers.Layer.WMTS(
|
return new OpenLayers.Layer.WMTS(
|
||||||
|
|||||||
Reference in New Issue
Block a user