read legendURL and Dimension from WMTS capabilities docs
This commit is contained in:
@@ -112,6 +112,7 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
|
||||
var layer = {
|
||||
styles: [],
|
||||
formats: [],
|
||||
dimensions: [],
|
||||
tileMatrixSetLinks: []
|
||||
};
|
||||
layer.layers = [];
|
||||
@@ -218,7 +219,23 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
|
||||
obj.serviceMetadataUrl = {};
|
||||
obj.serviceMetadataUrl.href = node.getAttribute("xlink:href");
|
||||
// TODO: other attributes of <ServiceMetadataURL> element
|
||||
}
|
||||
},
|
||||
"LegendURL": function(node, obj) {
|
||||
obj.legend = {};
|
||||
obj.legend.href = node.getAttribute("xlink:href");
|
||||
obj.legend.format = node.getAttribute("format");
|
||||
},
|
||||
"Dimension": function(node, obj) {
|
||||
var dimension = {values: []};
|
||||
this.readChildNodes(node, dimension);
|
||||
obj.dimensions.push(dimension);
|
||||
},
|
||||
"Default": function(node, obj) {
|
||||
obj["default"] = this.getChildValue(node);
|
||||
},
|
||||
"Value": function(node, obj) {
|
||||
obj.values.push(this.getChildValue(node));
|
||||
}
|
||||
},
|
||||
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user