Use Object() for objects in prototype

to avoid linter warning
This commit is contained in:
Florent gravin
2014-10-03 10:01:31 +02:00
parent 47e182524f
commit 1a7cbfd6ac
3 changed files with 46 additions and 46 deletions
+6 -6
View File
@@ -141,12 +141,12 @@ ol.format.GML2.prototype.outerBoundaryIsParser_ =
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'coordinates': ol.xml.makeReplacer( 'coordinates': ol.xml.makeReplacer(
ol.format.GML2.prototype.readFlatCoordinates_) ol.format.GML2.prototype.readFlatCoordinates_)
} }
}; });
/** /**
@@ -154,12 +154,12 @@ ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_, 'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_,
'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_ 'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_
} }
}; });
/** /**
@@ -167,7 +167,7 @@ ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML2.prototype.GEOMETRY_PARSERS_ = { ol.format.GML2.prototype.GEOMETRY_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint), 'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
'MultiPoint': ol.xml.makeReplacer( 'MultiPoint': ol.xml.makeReplacer(
@@ -182,4 +182,4 @@ ol.format.GML2.prototype.GEOMETRY_PARSERS_ = {
'MultiPolygon': ol.xml.makeReplacer( 'MultiPolygon': ol.xml.makeReplacer(
ol.format.GMLBase.prototype.readMultiPolygon) ol.format.GMLBase.prototype.readMultiPolygon)
} }
}; });
+24 -24
View File
@@ -448,12 +448,12 @@ ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = { ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_), 'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_),
'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_) 'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_)
} }
}; });
/** /**
@@ -461,12 +461,12 @@ ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = { ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'interior': ol.format.GML3.prototype.interiorParser_, 'interior': ol.format.GML3.prototype.interiorParser_,
'exterior': ol.format.GML3.prototype.exteriorParser_ 'exterior': ol.format.GML3.prototype.exteriorParser_
} }
}; });
/** /**
@@ -474,7 +474,7 @@ ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.GEOMETRY_PARSERS_ = { ol.format.GML3.prototype.GEOMETRY_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint), 'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
'MultiPoint': ol.xml.makeReplacer( 'MultiPoint': ol.xml.makeReplacer(
@@ -496,7 +496,7 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
ol.format.GML3.prototype.readMultiCurve_), ol.format.GML3.prototype.readMultiCurve_),
'Envelope': ol.xml.makeReplacer(ol.format.GML3.prototype.readEnvelope_) 'Envelope': ol.xml.makeReplacer(ol.format.GML3.prototype.readEnvelope_)
} }
}; });
/** /**
@@ -504,14 +504,14 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.MULTICURVE_PARSERS_ = { ol.format.GML3.prototype.MULTICURVE_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'curveMember': ol.xml.makeArrayPusher( 'curveMember': ol.xml.makeArrayPusher(
ol.format.GML3.prototype.curveMemberParser_), ol.format.GML3.prototype.curveMemberParser_),
'curveMembers': ol.xml.makeArrayPusher( 'curveMembers': ol.xml.makeArrayPusher(
ol.format.GML3.prototype.curveMemberParser_) ol.format.GML3.prototype.curveMemberParser_)
} }
}; });
/** /**
@@ -519,14 +519,14 @@ ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = { ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'surfaceMember': ol.xml.makeArrayPusher( 'surfaceMember': ol.xml.makeArrayPusher(
ol.format.GML3.prototype.surfaceMemberParser_), ol.format.GML3.prototype.surfaceMemberParser_),
'surfaceMembers': ol.xml.makeArrayPusher( 'surfaceMembers': ol.xml.makeArrayPusher(
ol.format.GML3.prototype.surfaceMemberParser_) ol.format.GML3.prototype.surfaceMemberParser_)
} }
}; });
/** /**
@@ -534,13 +534,13 @@ ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = { ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'LineString': ol.xml.makeArrayPusher( 'LineString': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.readLineString), ol.format.GMLBase.prototype.readLineString),
'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_) 'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_)
} }
}; });
/** /**
@@ -548,12 +548,12 @@ ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = { ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon), 'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon),
'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_) 'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_)
} }
}; });
/** /**
@@ -561,11 +561,11 @@ ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.SURFACE_PARSERS_ = { ol.format.GML3.prototype.SURFACE_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_) 'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_)
} }
}; });
/** /**
@@ -573,11 +573,11 @@ ol.format.GML3.prototype.SURFACE_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.CURVE_PARSERS_ = { ol.format.GML3.prototype.CURVE_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_) 'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_)
} }
}; });
/** /**
@@ -585,14 +585,14 @@ ol.format.GML3.prototype.CURVE_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.ENVELOPE_PARSERS_ = { ol.format.GML3.prototype.ENVELOPE_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'lowerCorner': ol.xml.makeArrayPusher( 'lowerCorner': ol.xml.makeArrayPusher(
ol.format.GML3.prototype.readFlatPosList_), ol.format.GML3.prototype.readFlatPosList_),
'upperCorner': ol.xml.makeArrayPusher( 'upperCorner': ol.xml.makeArrayPusher(
ol.format.GML3.prototype.readFlatPosList_) ol.format.GML3.prototype.readFlatPosList_)
} }
}; });
/** /**
@@ -600,12 +600,12 @@ ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.PATCHES_PARSERS_ = { ol.format.GML3.prototype.PATCHES_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'PolygonPatch': ol.xml.makeReplacer( 'PolygonPatch': ol.xml.makeReplacer(
ol.format.GML3.prototype.readPolygonPatch_) ol.format.GML3.prototype.readPolygonPatch_)
} }
}; });
/** /**
@@ -613,12 +613,12 @@ ol.format.GML3.prototype.PATCHES_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GML3.prototype.SEGMENTS_PARSERS_ = { ol.format.GML3.prototype.SEGMENTS_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'LineStringSegment': ol.xml.makeReplacer( 'LineStringSegment': ol.xml.makeReplacer(
ol.format.GML3.prototype.readLineStringSegment_) ol.format.GML3.prototype.readLineStringSegment_)
} }
}; });
/** /**
+16 -16
View File
@@ -113,14 +113,14 @@ ol.format.GMLBase.prototype.readFeatures_ = function(node, objectStack) {
/** /**
* @type {Object.<string, Object.<string, Object>>} * @type {Object.<string, Object.<string, Object>>}
*/ */
ol.format.GMLBase.prototype.FEATURE_COLLECTION_PARSERS = { ol.format.GMLBase.prototype.FEATURE_COLLECTION_PARSERS = Object({
'http://www.opengis.net/gml': { 'http://www.opengis.net/gml': {
'featureMember': ol.xml.makeArrayPusher( 'featureMember': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.readFeatures_), ol.format.GMLBase.prototype.readFeatures_),
'featureMembers': ol.xml.makeReplacer( 'featureMembers': ol.xml.makeReplacer(
ol.format.GMLBase.prototype.readFeatures_) ol.format.GMLBase.prototype.readFeatures_)
} }
}; });
/** /**
@@ -418,14 +418,14 @@ ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ =
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = { ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'pointMember': ol.xml.makeArrayPusher( 'pointMember': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.pointMemberParser_), ol.format.GMLBase.prototype.pointMemberParser_),
'pointMembers': ol.xml.makeArrayPusher( 'pointMembers': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.pointMemberParser_) ol.format.GMLBase.prototype.pointMemberParser_)
} }
}; });
/** /**
@@ -433,14 +433,14 @@ ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = { ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'lineStringMember': ol.xml.makeArrayPusher( 'lineStringMember': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.lineStringMemberParser_), ol.format.GMLBase.prototype.lineStringMemberParser_),
'lineStringMembers': ol.xml.makeArrayPusher( 'lineStringMembers': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.lineStringMemberParser_) ol.format.GMLBase.prototype.lineStringMemberParser_)
} }
}; });
/** /**
@@ -448,14 +448,14 @@ ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = { ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'polygonMember': ol.xml.makeArrayPusher( 'polygonMember': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.polygonMemberParser_), ol.format.GMLBase.prototype.polygonMemberParser_),
'polygonMembers': ol.xml.makeArrayPusher( 'polygonMembers': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.polygonMemberParser_) ol.format.GMLBase.prototype.polygonMemberParser_)
} }
}; });
/** /**
@@ -463,12 +463,12 @@ ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = { ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'Point': ol.xml.makeArrayPusher( 'Point': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_) ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_)
} }
}; });
/** /**
@@ -476,12 +476,12 @@ ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = { ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'LineString': ol.xml.makeArrayPusher( 'LineString': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.readLineString) ol.format.GMLBase.prototype.readLineString)
} }
}; });
/** /**
@@ -489,12 +489,12 @@ ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @private * @private
*/ */
ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = { ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'Polygon': ol.xml.makeArrayPusher( 'Polygon': ol.xml.makeArrayPusher(
ol.format.GMLBase.prototype.readPolygon) ol.format.GMLBase.prototype.readPolygon)
} }
}; });
/** /**
@@ -502,12 +502,12 @@ ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
* @type {Object.<string, Object.<string, ol.xml.Parser>>} * @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @protected * @protected
*/ */
ol.format.GMLBase.prototype.RING_PARSERS = { ol.format.GMLBase.prototype.RING_PARSERS = Object({
'http://www.opengis.net/gml' : { 'http://www.opengis.net/gml' : {
'LinearRing': ol.xml.makeReplacer( 'LinearRing': ol.xml.makeReplacer(
ol.format.GMLBase.prototype.readFlatLinearRing_) ol.format.GMLBase.prototype.readFlatLinearRing_)
} }
}; });
/** /**