Support for multiple resource urls
With this change, createLayer generates url arrays for both KVP and REST encoding if multiple resource urls are provided. To make this work, the WMTSCapabilities format got a new resourceUrls property, because previously only the first resourceUrl for a format was stored.
This commit is contained in:
@@ -195,10 +195,16 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
|
||||
},
|
||||
"ResourceURL": function(node, obj) {
|
||||
obj.resourceUrl = obj.resourceUrl || {};
|
||||
obj.resourceUrl[node.getAttribute("resourceType")] = {
|
||||
var resourceType = node.getAttribute("resourceType");
|
||||
if (!obj.resourceUrls) {
|
||||
obj.resourceUrls = [];
|
||||
}
|
||||
var resourceType = obj.resourceUrl[resourceType] = {
|
||||
format: node.getAttribute("format"),
|
||||
template: node.getAttribute("template")
|
||||
template: node.getAttribute("template"),
|
||||
resourceType: resourceType
|
||||
};
|
||||
obj.resourceUrls.push(resourceType);
|
||||
},
|
||||
// not used for now, can be added in the future though
|
||||
/*"Themes": function(node, obj) {
|
||||
|
||||
Reference in New Issue
Block a user