[GeoJSON] Add support for feature with null geometries

This commit is contained in:
Antoine Abt
2014-02-14 15:12:16 +01:00
parent d9c5102bcd
commit 24ee4cb742

View File

@@ -57,6 +57,9 @@ ol.format.GeoJSON.EXTENSIONS_ = ['.geojson'];
* @return {ol.geom.Geometry} Geometry.
*/
ol.format.GeoJSON.readGeometry_ = function(object) {
if (goog.isNull(object)) {
return null;
}
var geometryReader = ol.format.GeoJSON.GEOMETRY_READERS_[object.type];
goog.asserts.assert(goog.isDef(geometryReader));
return geometryReader(object);