From 1a7cbfd6ac09643af29ae7137ea469ee7976ef5b Mon Sep 17 00:00:00 2001 From: Florent gravin Date: Fri, 3 Oct 2014 10:01:31 +0200 Subject: [PATCH] Use Object() for objects in prototype to avoid linter warning --- src/ol/format/gml/gml2.js | 12 ++++----- src/ol/format/gml/gml3.js | 48 ++++++++++++++++++------------------ src/ol/format/gml/gmlbase.js | 32 ++++++++++++------------ 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/ol/format/gml/gml2.js b/src/ol/format/gml/gml2.js index 1a6e3a00d7..076f753cc3 100644 --- a/src/ol/format/gml/gml2.js +++ b/src/ol/format/gml/gml2.js @@ -141,12 +141,12 @@ ol.format.GML2.prototype.outerBoundaryIsParser_ = * @type {Object.>} * @private */ -ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { +ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'coordinates': ol.xml.makeReplacer( ol.format.GML2.prototype.readFlatCoordinates_) } -}; +}); /** @@ -154,12 +154,12 @@ ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { +ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_, 'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_ } -}; +}); /** @@ -167,7 +167,7 @@ ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML2.prototype.GEOMETRY_PARSERS_ = { +ol.format.GML2.prototype.GEOMETRY_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint), 'MultiPoint': ol.xml.makeReplacer( @@ -182,4 +182,4 @@ ol.format.GML2.prototype.GEOMETRY_PARSERS_ = { 'MultiPolygon': ol.xml.makeReplacer( ol.format.GMLBase.prototype.readMultiPolygon) } -}; +}); diff --git a/src/ol/format/gml/gml3.js b/src/ol/format/gml/gml3.js index d36d7e7428..3a12b20a20 100644 --- a/src/ol/format/gml/gml3.js +++ b/src/ol/format/gml/gml3.js @@ -448,12 +448,12 @@ ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) { * @type {Object.>} * @private */ -ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { +ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_), 'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_) } -}; +}); /** @@ -461,12 +461,12 @@ ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { +ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'interior': ol.format.GML3.prototype.interiorParser_, 'exterior': ol.format.GML3.prototype.exteriorParser_ } -}; +}); /** @@ -474,7 +474,7 @@ ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.GEOMETRY_PARSERS_ = { +ol.format.GML3.prototype.GEOMETRY_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint), 'MultiPoint': ol.xml.makeReplacer( @@ -496,7 +496,7 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = { ol.format.GML3.prototype.readMultiCurve_), 'Envelope': ol.xml.makeReplacer(ol.format.GML3.prototype.readEnvelope_) } -}; +}); /** @@ -504,14 +504,14 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.MULTICURVE_PARSERS_ = { +ol.format.GML3.prototype.MULTICURVE_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'curveMember': ol.xml.makeArrayPusher( ol.format.GML3.prototype.curveMemberParser_), 'curveMembers': ol.xml.makeArrayPusher( ol.format.GML3.prototype.curveMemberParser_) } -}; +}); /** @@ -519,14 +519,14 @@ ol.format.GML3.prototype.MULTICURVE_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = { +ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'surfaceMember': ol.xml.makeArrayPusher( ol.format.GML3.prototype.surfaceMemberParser_), 'surfaceMembers': ol.xml.makeArrayPusher( ol.format.GML3.prototype.surfaceMemberParser_) } -}; +}); /** @@ -534,13 +534,13 @@ ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = { +ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'LineString': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readLineString), 'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_) } -}; +}); /** @@ -548,12 +548,12 @@ ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = { +ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon), 'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_) } -}; +}); /** @@ -561,11 +561,11 @@ ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.SURFACE_PARSERS_ = { +ol.format.GML3.prototype.SURFACE_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_) } -}; +}); /** @@ -573,11 +573,11 @@ ol.format.GML3.prototype.SURFACE_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.CURVE_PARSERS_ = { +ol.format.GML3.prototype.CURVE_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_) } -}; +}); /** @@ -585,14 +585,14 @@ ol.format.GML3.prototype.CURVE_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.ENVELOPE_PARSERS_ = { +ol.format.GML3.prototype.ENVELOPE_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'lowerCorner': ol.xml.makeArrayPusher( ol.format.GML3.prototype.readFlatPosList_), 'upperCorner': ol.xml.makeArrayPusher( ol.format.GML3.prototype.readFlatPosList_) } -}; +}); /** @@ -600,12 +600,12 @@ ol.format.GML3.prototype.ENVELOPE_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.PATCHES_PARSERS_ = { +ol.format.GML3.prototype.PATCHES_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'PolygonPatch': ol.xml.makeReplacer( ol.format.GML3.prototype.readPolygonPatch_) } -}; +}); /** @@ -613,12 +613,12 @@ ol.format.GML3.prototype.PATCHES_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML3.prototype.SEGMENTS_PARSERS_ = { +ol.format.GML3.prototype.SEGMENTS_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'LineStringSegment': ol.xml.makeReplacer( ol.format.GML3.prototype.readLineStringSegment_) } -}; +}); /** diff --git a/src/ol/format/gml/gmlbase.js b/src/ol/format/gml/gmlbase.js index 55dffca46f..1c917c3c2e 100644 --- a/src/ol/format/gml/gmlbase.js +++ b/src/ol/format/gml/gmlbase.js @@ -113,14 +113,14 @@ ol.format.GMLBase.prototype.readFeatures_ = function(node, objectStack) { /** * @type {Object.>} */ -ol.format.GMLBase.prototype.FEATURE_COLLECTION_PARSERS = { +ol.format.GMLBase.prototype.FEATURE_COLLECTION_PARSERS = Object({ 'http://www.opengis.net/gml': { 'featureMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readFeatures_), 'featureMembers': ol.xml.makeReplacer( ol.format.GMLBase.prototype.readFeatures_) } -}; +}); /** @@ -418,14 +418,14 @@ ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = { +ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'pointMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.pointMemberParser_), 'pointMembers': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.pointMemberParser_) } -}; +}); /** @@ -433,14 +433,14 @@ ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = { +ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'lineStringMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.lineStringMemberParser_), 'lineStringMembers': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.lineStringMemberParser_) } -}; +}); /** @@ -448,14 +448,14 @@ ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = { +ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'polygonMember': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.polygonMemberParser_), 'polygonMembers': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.polygonMemberParser_) } -}; +}); /** @@ -463,12 +463,12 @@ ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = { +ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'Point': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_) } -}; +}); /** @@ -476,12 +476,12 @@ ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = { +ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'LineString': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readLineString) } -}; +}); /** @@ -489,12 +489,12 @@ ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = { +ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = Object({ 'http://www.opengis.net/gml' : { 'Polygon': ol.xml.makeArrayPusher( ol.format.GMLBase.prototype.readPolygon) } -}; +}); /** @@ -502,12 +502,12 @@ ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = { * @type {Object.>} * @protected */ -ol.format.GMLBase.prototype.RING_PARSERS = { +ol.format.GMLBase.prototype.RING_PARSERS = Object({ 'http://www.opengis.net/gml' : { 'LinearRing': ol.xml.makeReplacer( ol.format.GMLBase.prototype.readFlatLinearRing_) } -}; +}); /**