Accept feature without geometry in ol.interaction.Modify

This commit is contained in:
Frederic Junod
2016-08-23 13:48:12 +02:00
parent 9eadf1505a
commit 243f1061df
2 changed files with 17 additions and 1 deletions

View File

@@ -248,7 +248,7 @@ ol.inherits(ol.interaction.Modify, ol.interaction.Pointer);
*/
ol.interaction.Modify.prototype.addFeature_ = function(feature) {
var geometry = feature.getGeometry();
if (geometry.getType() in this.SEGMENT_WRITERS_) {
if (geometry && geometry.getType() in this.SEGMENT_WRITERS_) {
this.SEGMENT_WRITERS_[geometry.getType()].call(this, feature, geometry);
}
var map = this.getMap();