Fire change events for multi-part geometries

This commit is contained in:
ahocevar
2013-10-04 23:36:16 -06:00
parent 703564fcbb
commit 52552c9b18
19 changed files with 253 additions and 114 deletions
+3 -2
View File
@@ -315,8 +315,9 @@ ol.parser.GeoJSON.prototype.encodeGeometry_ = function(geometry) {
*/
ol.parser.GeoJSON.prototype.encodeGeometryCollection_ = function(collection) {
var geometries = [];
for (var i = 0, ii = collection.components.length; i < ii; ++i) {
geometries.push(this.encodeGeometry_(collection.components[i]));
var components = collection.getComponents();
for (var i = 0, ii = components.length; i < ii; ++i) {
geometries.push(this.encodeGeometry_(components[i]));
}
return /** @type {GeoJSONGeometryCollection} */({
type: 'GeometryCollection',