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 {
|
||||
var httpGet = capabilities.operationsMetadata.GetTile.dcp.http.get;
|
||||
url = [];
|
||||
var constraint;
|
||||
for (var i = 0, ii = httpGet.length; i < ii; i++) {
|
||||
if (httpGet[i].constraints && httpGet[i].constraints.
|
||||
GetEncoding.allowedValues[requestEncoding]) {
|
||||
cnstraint = httpGet[i].constraints;
|
||||
if (!constraint || (constraint && constraint.
|
||||
GetEncoding.allowedValues[requestEncoding])) {
|
||||
url.push(httpGet[i].url);
|
||||
}
|
||||
}
|
||||
// fallback for backwards compatibility
|
||||
if (url.length === 0) {
|
||||
url = httpGet[0].url;
|
||||
}
|
||||
}
|
||||
|
||||
return new OpenLayers.Layer.WMTS(
|
||||
|
||||
Reference in New Issue
Block a user