diff options
Diffstat (limited to 'web/app/view/map/GeofenceMap.js')
-rw-r--r-- | web/app/view/map/GeofenceMap.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/app/view/map/GeofenceMap.js b/web/app/view/map/GeofenceMap.js index 6b06ae98..8cef574b 100644 --- a/web/app/view/map/GeofenceMap.js +++ b/web/app/view/map/GeofenceMap.js @@ -105,13 +105,14 @@ Ext.define('Traccar.view.map.GeofenceMap', { }, addInteraction: function (type) { + var self = this; this.draw = new ol.interaction.Draw({ features: this.features, type: type }); this.draw.on('drawstart', function () { - this.features.clear(); - }, this); + self.features.clear(); + }); this.map.addInteraction(this.draw); }, |