Use goog.functions.sequence
This commit is contained in:
@@ -74,7 +74,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
},
|
},
|
||||||
'http://www.opengis.net/gml': {
|
'http://www.opengis.net/gml': {
|
||||||
'_inherit': function(node, obj, container) {
|
'_inherit': function(node, obj, container) {
|
||||||
// To be implemented by version specific parsers
|
// Version specific parsers extend this with goog.functions.sequence
|
||||||
var srsName;
|
var srsName;
|
||||||
if (!goog.isDef(this.srsName)) {
|
if (!goog.isDef(this.srsName)) {
|
||||||
srsName = this.srsName = node.getAttribute('srsName');
|
srsName = this.srsName = node.getAttribute('srsName');
|
||||||
|
|||||||
+11
-10
@@ -1,6 +1,7 @@
|
|||||||
goog.provide('ol.parser.ogc.GML_v3');
|
goog.provide('ol.parser.ogc.GML_v3');
|
||||||
|
|
||||||
goog.require('goog.array');
|
goog.require('goog.array');
|
||||||
|
goog.require('goog.functions');
|
||||||
goog.require('goog.object');
|
goog.require('goog.object');
|
||||||
goog.require('ol.geom.GeometryType');
|
goog.require('ol.geom.GeometryType');
|
||||||
goog.require('ol.parser.ogc.GML');
|
goog.require('ol.parser.ogc.GML');
|
||||||
@@ -60,17 +61,17 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
};
|
};
|
||||||
var baseInherit = this.readers['http://www.opengis.net/gml']['_inherit'];
|
|
||||||
goog.object.extend(this.readers['http://www.opengis.net/gml'], {
|
goog.object.extend(this.readers['http://www.opengis.net/gml'], {
|
||||||
'_inherit': function(node, obj, container) {
|
'_inherit': goog.functions.sequence(
|
||||||
baseInherit.call(this, node, obj, container);
|
this.readers['http://www.opengis.net/gml']['_inherit'],
|
||||||
// SRSReferenceGroup attributes
|
function(node, obj, container) {
|
||||||
var dim = parseInt(node.getAttribute('srsDimension'), 10) ||
|
// SRSReferenceGroup attributes
|
||||||
(container && container.srsDimension);
|
var dim = parseInt(node.getAttribute('srsDimension'), 10) ||
|
||||||
if (dim) {
|
(container && container.srsDimension);
|
||||||
obj.srsDimension = dim;
|
if (dim) {
|
||||||
}
|
obj.srsDimension = dim;
|
||||||
},
|
}
|
||||||
|
}),
|
||||||
'featureMembers': function(node, obj) {
|
'featureMembers': function(node, obj) {
|
||||||
this.readChildNodes(node, obj);
|
this.readChildNodes(node, obj);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user