From 148ef7afefebee0d6a8c80aff5dd6a3860bfb92c Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 25 Feb 2016 09:15:31 +0100 Subject: [PATCH] Use {} instead of Object We probably have these to trick the compiler but it's not needed anymore --- src/ol/format/gml/gml2format.js | 16 +++++----- src/ol/format/gml/gml3format.js | 48 +++++++++++++++--------------- src/ol/format/gml/gmlbaseformat.js | 28 ++++++++--------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/ol/format/gml/gml2format.js b/src/ol/format/gml/gml2format.js index dc69fd0330..74943de1de 100644 --- a/src/ol/format/gml/gml2format.js +++ b/src/ol/format/gml/gml2format.js @@ -169,12 +169,12 @@ ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) { * @type {Object.>} * @private */ -ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({ +ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { 'http://www.opengis.net/gml' : { 'coordinates': ol.xml.makeReplacer( ol.format.GML2.prototype.readFlatCoordinates_) } -}); +}; /** @@ -182,12 +182,12 @@ ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({ +ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { 'http://www.opengis.net/gml' : { 'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_, 'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_ } -}); +}; /** @@ -195,12 +195,12 @@ ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML2.prototype.BOX_PARSERS_ = Object({ +ol.format.GML2.prototype.BOX_PARSERS_ = { 'http://www.opengis.net/gml' : { 'coordinates': ol.xml.makeArrayPusher( ol.format.GML2.prototype.readFlatCoordinates_) } -}); +}; /** @@ -208,7 +208,7 @@ ol.format.GML2.prototype.BOX_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML2.prototype.GEOMETRY_PARSERS_ = Object({ +ol.format.GML2.prototype.GEOMETRY_PARSERS_ = { 'http://www.opengis.net/gml' : { 'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint), 'MultiPoint': ol.xml.makeReplacer( @@ -224,4 +224,4 @@ ol.format.GML2.prototype.GEOMETRY_PARSERS_ = Object({ ol.format.GMLBase.prototype.readMultiPolygon), 'Box': ol.xml.makeReplacer(ol.format.GML2.prototype.readBox_) } -}); +}; diff --git a/src/ol/format/gml/gml3format.js b/src/ol/format/gml/gml3format.js index 61dbd5dd5a..d6520546e9 100644 --- a/src/ol/format/gml/gml3format.js +++ b/src/ol/format/gml/gml3format.js @@ -453,12 +453,12 @@ ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) { * @type {Object.>} * @private */ -ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({ +ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { 'http://www.opengis.net/gml' : { 'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_), 'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_) } -}); +}; /** @@ -466,12 +466,12 @@ ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({ +ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { 'http://www.opengis.net/gml' : { 'interior': ol.format.GML3.prototype.interiorParser_, 'exterior': ol.format.GML3.prototype.exteriorParser_ } -}); +}; /** @@ -479,7 +479,7 @@ ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.GEOMETRY_PARSERS_ = Object({ +ol.format.GML3.prototype.GEOMETRY_PARSERS_ = { 'http://www.opengis.net/gml' : { 'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint), 'MultiPoint': ol.xml.makeReplacer( @@ -501,7 +501,7 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = Object({ ol.format.GML3.prototype.readMultiCurve_), 'Envelope': ol.xml.makeReplacer(ol.format.GML3.prototype.readEnvelope_) } -}); +}; /** @@ -509,14 +509,14 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.MULTICURVE_PARSERS_ = Object({ +ol.format.GML3.prototype.MULTICURVE_PARSERS_ = { 'http://www.opengis.net/gml' : { 'curveMember': ol.xml.makeArrayPusher( ol.format.GML3.prototype.curveMemberParser_), 'curveMembers': ol.xml.makeArrayPusher( ol.format.GML3.prototype.curveMemberParser_) } -}); +}; /** @@ -524,14 +524,14 @@ ol.format.GML3.prototype.MULTICURVE_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = Object({ +ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = { 'http://www.opengis.net/gml' : { 'surfaceMember': ol.xml.makeArrayPusher( ol.format.GML3.prototype.surfaceMemberParser_), 'surfaceMembers': ol.xml.makeArrayPusher( ol.format.GML3.prototype.surfaceMemberParser_) } -}); +}; /** @@ -539,13 +539,13 @@ ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = Object({ +ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = { 'http://www.opengis.net/gml' : { 'LineString': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readLineString), 'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_) } -}); +}; /** @@ -553,12 +553,12 @@ ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = Object({ +ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = { 'http://www.opengis.net/gml' : { 'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon), 'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_) } -}); +}; /** @@ -566,11 +566,11 @@ ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.SURFACE_PARSERS_ = Object({ +ol.format.GML3.prototype.SURFACE_PARSERS_ = { 'http://www.opengis.net/gml' : { 'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_) } -}); +}; /** @@ -578,11 +578,11 @@ ol.format.GML3.prototype.SURFACE_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.CURVE_PARSERS_ = Object({ +ol.format.GML3.prototype.CURVE_PARSERS_ = { 'http://www.opengis.net/gml' : { 'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_) } -}); +}; /** @@ -590,14 +590,14 @@ ol.format.GML3.prototype.CURVE_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.ENVELOPE_PARSERS_ = Object({ +ol.format.GML3.prototype.ENVELOPE_PARSERS_ = { 'http://www.opengis.net/gml' : { 'lowerCorner': ol.xml.makeArrayPusher( ol.format.GML3.prototype.readFlatPosList_), 'upperCorner': ol.xml.makeArrayPusher( ol.format.GML3.prototype.readFlatPosList_) } -}); +}; /** @@ -605,12 +605,12 @@ ol.format.GML3.prototype.ENVELOPE_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.PATCHES_PARSERS_ = Object({ +ol.format.GML3.prototype.PATCHES_PARSERS_ = { 'http://www.opengis.net/gml' : { 'PolygonPatch': ol.xml.makeReplacer( ol.format.GML3.prototype.readPolygonPatch_) } -}); +}; /** @@ -618,12 +618,12 @@ ol.format.GML3.prototype.PATCHES_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GML3.prototype.SEGMENTS_PARSERS_ = Object({ +ol.format.GML3.prototype.SEGMENTS_PARSERS_ = { 'http://www.opengis.net/gml' : { 'LineStringSegment': ol.xml.makeReplacer( ol.format.GML3.prototype.readLineStringSegment_) } -}); +}; /** diff --git a/src/ol/format/gml/gmlbaseformat.js b/src/ol/format/gml/gmlbaseformat.js index a641cdf95c..3afda6975d 100644 --- a/src/ol/format/gml/gmlbaseformat.js +++ b/src/ol/format/gml/gmlbaseformat.js @@ -503,14 +503,14 @@ ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, object * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = Object({ +ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = { 'http://www.opengis.net/gml' : { 'pointMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.pointMemberParser_), 'pointMembers': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.pointMemberParser_) } -}); +}; /** @@ -518,14 +518,14 @@ ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = Object({ +ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = { 'http://www.opengis.net/gml' : { 'lineStringMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.lineStringMemberParser_), 'lineStringMembers': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.lineStringMemberParser_) } -}); +}; /** @@ -533,14 +533,14 @@ ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = Object({ +ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = { 'http://www.opengis.net/gml' : { 'polygonMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.polygonMemberParser_), 'polygonMembers': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.polygonMemberParser_) } -}); +}; /** @@ -548,12 +548,12 @@ ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = Object({ +ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = { 'http://www.opengis.net/gml' : { 'Point': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_) } -}); +}; /** @@ -561,12 +561,12 @@ ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = Object({ +ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = { 'http://www.opengis.net/gml' : { 'LineString': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readLineString) } -}); +}; /** @@ -574,12 +574,12 @@ ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = Object({ * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = Object({ +ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = { 'http://www.opengis.net/gml' : { 'Polygon': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readPolygon) } -}); +}; /** @@ -587,12 +587,12 @@ ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = Object({ * @type {Object.>} * @protected */ -ol.format.GMLBase.prototype.RING_PARSERS = Object({ +ol.format.GMLBase.prototype.RING_PARSERS = { 'http://www.opengis.net/gml' : { 'LinearRing': ol.xml.makeReplacer( ol.format.GMLBase.prototype.readFlatLinearRing_) } -}); +}; /**