Redefine some PARSERS_ that are different in v2 and v3
This commit is contained in:
+13
-26
@@ -412,10 +412,12 @@ ol.format.GML.prototype.readFlatCoordinatesFromNode_ = function(node,
|
|||||||
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
|
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML.POLYGONMEMBER_PARSERS_ = {
|
ol.format.GML.MULTIPOINT_PARSERS_ = {
|
||||||
'http://www.opengis.net/gml' : {
|
'http://www.opengis.net/gml' : {
|
||||||
'Polygon': ol.xml.makeArrayPusher(
|
'pointMember': ol.xml.makeArrayPusher(
|
||||||
ol.format.GML.prototype.readPolygon)
|
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>>}
|
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML.GEOMETRY_PARSERS_ = {
|
ol.format.GML.MULTIPOLYGON_PARSERS_ = {
|
||||||
'http://www.opengis.net/gml' : {
|
'http://www.opengis.net/gml' : {
|
||||||
'Point': ol.xml.makeReplacer(ol.format.GML.prototype.readPoint_),
|
'polygonMember': ol.xml.makeArrayPusher(
|
||||||
'MultiPoint': ol.xml.makeReplacer(ol.format.GML.prototype.readMultiPoint_),
|
ol.format.GML.prototype.polygonMemberParser_),
|
||||||
'LineString': ol.xml.makeReplacer(ol.format.GML.prototype.readLineString_),
|
'polygonMembers': ol.xml.makeArrayPusher(
|
||||||
'MultiLineString': ol.xml.makeReplacer(
|
ol.format.GML.prototype.polygonMemberParser_)
|
||||||
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_)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -494,12 +483,10 @@ ol.format.GML.LINESTRINGMEMBER_PARSERS_ = {
|
|||||||
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
|
* @type {Object.<string, Object.<string, ol.xml.Parser>>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML.MULTIPOINT_PARSERS_ = {
|
ol.format.GML.POLYGONMEMBER_PARSERS_ = {
|
||||||
'http://www.opengis.net/gml' : {
|
'http://www.opengis.net/gml' : {
|
||||||
'pointMember': ol.xml.makeArrayPusher(
|
'Polygon': ol.xml.makeArrayPusher(
|
||||||
ol.format.GML.prototype.pointMemberParser_),
|
ol.format.GML.prototype.readPolygon)
|
||||||
'pointMembers': ol.xml.makeArrayPusher(
|
|
||||||
ol.format.GML.prototype.pointMemberParser_)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -151,3 +151,24 @@ ol.format.GML.v2.FLAT_LINEAR_RINGS_PARSERS_ = {
|
|||||||
'outerBoundaryIs': ol.format.GML.v2.prototype.outerBoundaryIsParser_
|
'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)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user