Document handling of KML MultiGeometries

This commit is contained in:
Peter Robins
2016-04-29 10:56:43 +01:00
parent 690ef18ee2
commit c28fd2ae1c

View File

@@ -1869,7 +1869,9 @@ ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
/** /**
* Read the first feature from a KML source. * Read the first feature from a KML source. MultiGeometries are converted into
* GeometryCollections if they are a mix of geometry types, and into MultiPoint/
* MultiLineString/MultiPolygon if they are all of the same type.
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
@@ -1902,7 +1904,9 @@ ol.format.KML.prototype.readFeatureFromNode = function(node, opt_options) {
/** /**
* Read all features from a KML source. * Read all features from a KML source. MultiGeometries are converted into
* GeometryCollections if they are a mix of geometry types, and into MultiPoint/
* MultiLineString/MultiPolygon if they are all of the same type.
* *
* @function * @function
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
@@ -2961,7 +2965,8 @@ ol.format.KML.OUTER_BOUNDARY_NODE_FACTORY_ =
/** /**
* Encode an array of features in the KML format. * Encode an array of features in the KML format. GeometryCollections, MultiPoints,
* MultiLineStrings, and MultiPolygons are output as MultiGeometries.
* *
* @function * @function
* @param {Array.<ol.Feature>} features Features. * @param {Array.<ol.Feature>} features Features.
@@ -2973,7 +2978,8 @@ ol.format.KML.prototype.writeFeatures;
/** /**
* Encode an array of features in the KML format as an XML node. * Encode an array of features in the KML format as an XML node. GeometryCollections,
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
* *
* @param {Array.<ol.Feature>} features Features. * @param {Array.<ol.Feature>} features Features.
* @param {olx.format.WriteOptions=} opt_options Options. * @param {olx.format.WriteOptions=} opt_options Options.