diff --git a/src/ol/format/gml/base.js b/src/ol/format/gml/base.js index 937532f2d4..d8df504013 100644 --- a/src/ol/format/gml/base.js +++ b/src/ol/format/gml/base.js @@ -412,10 +412,12 @@ ol.format.GML.prototype.readFlatCoordinatesFromNode_ = function(node, * @type {Object.>} * @private */ -ol.format.GML.POLYGONMEMBER_PARSERS_ = { +ol.format.GML.MULTIPOINT_PARSERS_ = { 'http://www.opengis.net/gml' : { - 'Polygon': ol.xml.makeArrayPusher( - ol.format.GML.prototype.readPolygon) + 'pointMember': ol.xml.makeArrayPusher( + ol.format.GML.prototype.pointMemberParser_), + 'pointMembers': ol.xml.makeArrayPusher( + ol.format.GML.prototype.pointMemberParser_) } }; @@ -440,25 +442,12 @@ ol.format.GML.MULTILINESTRING_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML.GEOMETRY_PARSERS_ = { +ol.format.GML.MULTIPOLYGON_PARSERS_ = { 'http://www.opengis.net/gml' : { - 'Point': ol.xml.makeReplacer(ol.format.GML.prototype.readPoint_), - 'MultiPoint': ol.xml.makeReplacer(ol.format.GML.prototype.readMultiPoint_), - 'LineString': ol.xml.makeReplacer(ol.format.GML.prototype.readLineString_), - 'MultiLineString': ol.xml.makeReplacer( - ol.format.GML.prototype.readMultiLineString_), - 'LinearRing' : ol.xml.makeReplacer( - ol.format.GML.prototype.readLinearRing_), - 'Polygon': ol.xml.makeReplacer(ol.format.GML.prototype.readPolygon_), - 'MultiPolygon': ol.xml.makeReplacer( - ol.format.GML.prototype.readMultiPolygon_), - 'Surface': ol.xml.makeReplacer(ol.format.GML.prototype.readSurface_), - 'MultiSurface': ol.xml.makeReplacer( - ol.format.GML.prototype.readMultiSurface_), - 'Curve': ol.xml.makeReplacer(ol.format.GML.prototype.readCurve_), - 'MultiCurve': ol.xml.makeReplacer( - ol.format.GML.prototype.readMultiCurve_), - 'Envelope': ol.xml.makeReplacer(ol.format.GML.prototype.readEnvelope_) + 'polygonMember': ol.xml.makeArrayPusher( + ol.format.GML.prototype.polygonMemberParser_), + 'polygonMembers': ol.xml.makeArrayPusher( + ol.format.GML.prototype.polygonMemberParser_) } }; @@ -494,12 +483,10 @@ ol.format.GML.LINESTRINGMEMBER_PARSERS_ = { * @type {Object.>} * @private */ -ol.format.GML.MULTIPOINT_PARSERS_ = { +ol.format.GML.POLYGONMEMBER_PARSERS_ = { 'http://www.opengis.net/gml' : { - 'pointMember': ol.xml.makeArrayPusher( - ol.format.GML.prototype.pointMemberParser_), - 'pointMembers': ol.xml.makeArrayPusher( - ol.format.GML.prototype.pointMemberParser_) + 'Polygon': ol.xml.makeArrayPusher( + ol.format.GML.prototype.readPolygon) } }; diff --git a/src/ol/format/gml/v2.js b/src/ol/format/gml/v2.js index 32b04137d5..5d147a25e2 100644 --- a/src/ol/format/gml/v2.js +++ b/src/ol/format/gml/v2.js @@ -151,3 +151,24 @@ ol.format.GML.v2.FLAT_LINEAR_RINGS_PARSERS_ = { 'outerBoundaryIs': ol.format.GML.v2.prototype.outerBoundaryIsParser_ } }; + + +/** + * @const + * @type {Object.>} + * @private + */ +ol.format.GML.v2.GEOMETRY_PARSERS_ = { + 'http://www.opengis.net/gml' : { + 'Point': ol.xml.makeReplacer(ol.format.GML.prototype.readPoint), + 'MultiPoint': ol.xml.makeReplacer(ol.format.GML.prototype.readMultiPoint), + 'LineString': ol.xml.makeReplacer(ol.format.GML.prototype.readLineString), + 'MultiLineString': ol.xml.makeReplacer( + ol.format.GML.prototype.readMultiLineString), + 'LinearRing' : ol.xml.makeReplacer( + ol.format.GML.prototype.readLinearRing), + 'Polygon': ol.xml.makeReplacer(ol.format.GML.prototype.readPolygon), + 'MultiPolygon': ol.xml.makeReplacer( + ol.format.GML.prototype.readMultiPolygon) + } +};