Merge pull request #2658 from oterral/fix_getcap
Set inherited values when parsing a GetCapabilities
This commit is contained in:
@@ -327,6 +327,7 @@ ol.format.WMSCapabilities.readLayer_ = function(node, objectStack) {
|
|||||||
if (goog.isDef(parentValue)) {
|
if (goog.isDef(parentValue)) {
|
||||||
var childValue = goog.object.setIfUndefined(layerObject, key, []);
|
var childValue = goog.object.setIfUndefined(layerObject, key, []);
|
||||||
childValue = childValue.concat(parentValue);
|
childValue = childValue.concat(parentValue);
|
||||||
|
goog.object.set(layerObject, key, childValue);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ describe('ol.format.WMSCapabilities', function() {
|
|||||||
expect(layer.Layer.length).to.eql(4);
|
expect(layer.Layer.length).to.eql(4);
|
||||||
expect(layer.Layer[0].Name).to.eql('ROADS_RIVERS');
|
expect(layer.Layer[0].Name).to.eql('ROADS_RIVERS');
|
||||||
expect(layer.Layer[0].Title).to.eql('Roads and Rivers');
|
expect(layer.Layer[0].Title).to.eql('Roads and Rivers');
|
||||||
expect(layer.Layer[0].CRS).to.eql(['EPSG:26986']);
|
expect(layer.Layer[0].CRS).to.eql(['EPSG:26986', 'CRS:84']);
|
||||||
expect(layer.Layer[0].Identifier).to.eql(['123456']);
|
expect(layer.Layer[0].Identifier).to.eql(['123456']);
|
||||||
expect(layer.Layer[0].BoundingBox).to.eql([{
|
expect(layer.Layer[0].BoundingBox).to.eql([{
|
||||||
crs: 'CRS:84',
|
crs: 'CRS:84',
|
||||||
|
|||||||
Reference in New Issue
Block a user