aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/GeofenceMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/map/GeofenceMap.js')
-rw-r--r--web/app/view/map/GeofenceMap.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/app/view/map/GeofenceMap.js b/web/app/view/map/GeofenceMap.js
index 6b06ae9..8cef574 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);
},