Redefine some PARSERS_ that are different in v2 and v3

This commit is contained in:
Florent gravin
2014-09-24 11:14:45 +02:00
parent 8182396454
commit 07d6b83154
2 changed files with 34 additions and 26 deletions

View File

@@ -412,10 +412,12 @@ ol.format.GML.prototype.readFlatCoordinatesFromNode_ = function(node,
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @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.<string, Object.<string, ol.xml.Parser>>}
* @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.<string, Object.<string, ol.xml.Parser>>}
* @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)
}
};

View File

@@ -151,3 +151,24 @@ ol.format.GML.v2.FLAT_LINEAR_RINGS_PARSERS_ = {
'outerBoundaryIs': ol.format.GML.v2.prototype.outerBoundaryIsParser_
}
};
/**
* @const
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
* @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)
}
};