From 3ebbdbb48f92384c242e9eb3baf50e97419ab751 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 4 Aug 2013 12:54:24 +0200 Subject: [PATCH] Use goog.functions.sequence --- src/ol/parser/ogc/gml.js | 2 +- src/ol/parser/ogc/gml_v3.js | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ol/parser/ogc/gml.js b/src/ol/parser/ogc/gml.js index 03630f8ef1..085fb0a0e7 100644 --- a/src/ol/parser/ogc/gml.js +++ b/src/ol/parser/ogc/gml.js @@ -74,7 +74,7 @@ ol.parser.ogc.GML = function(opt_options) { }, 'http://www.opengis.net/gml': { '_inherit': function(node, obj, container) { - // To be implemented by version specific parsers + // Version specific parsers extend this with goog.functions.sequence var srsName; if (!goog.isDef(this.srsName)) { srsName = this.srsName = node.getAttribute('srsName'); diff --git a/src/ol/parser/ogc/gml_v3.js b/src/ol/parser/ogc/gml_v3.js index ebf321c37b..416f5e31c4 100644 --- a/src/ol/parser/ogc/gml_v3.js +++ b/src/ol/parser/ogc/gml_v3.js @@ -1,6 +1,7 @@ goog.provide('ol.parser.ogc.GML_v3'); goog.require('goog.array'); +goog.require('goog.functions'); goog.require('goog.object'); goog.require('ol.geom.GeometryType'); goog.require('ol.parser.ogc.GML'); @@ -60,17 +61,17 @@ ol.parser.ogc.GML_v3 = function(opt_options) { } return node; }; - var baseInherit = this.readers['http://www.opengis.net/gml']['_inherit']; goog.object.extend(this.readers['http://www.opengis.net/gml'], { - '_inherit': function(node, obj, container) { - baseInherit.call(this, node, obj, container); - // SRSReferenceGroup attributes - var dim = parseInt(node.getAttribute('srsDimension'), 10) || - (container && container.srsDimension); - if (dim) { - obj.srsDimension = dim; - } - }, + '_inherit': goog.functions.sequence( + this.readers['http://www.opengis.net/gml']['_inherit'], + function(node, obj, container) { + // SRSReferenceGroup attributes + var dim = parseInt(node.getAttribute('srsDimension'), 10) || + (container && container.srsDimension); + if (dim) { + obj.srsDimension = dim; + } + }), 'featureMembers': function(node, obj) { this.readChildNodes(node, obj); },