diff options
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/view/GeofenceDialogController.js | 6 | ||||
-rw-r--r-- | web/app/view/GeofenceMap.js | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/web/app/view/GeofenceDialogController.js b/web/app/view/GeofenceDialogController.js index c8d518514..b04935b9c 100644 --- a/web/app/view/GeofenceDialogController.js +++ b/web/app/view/GeofenceDialogController.js @@ -37,10 +37,14 @@ Ext.define('Traccar.view.GeofenceDialogController', { }, onAreaClick: function (button) { + var dialog, record; + dialog = button.up('window').down('form'); + record = dialog.getRecord(); Ext.create('Traccar.view.BaseWindow', { title: Strings.sharedArea, items: { - xtype: 'geofenceMapView' + xtype: 'geofenceMapView', + area: record.get('area') } }).show(); } diff --git a/web/app/view/GeofenceMap.js b/web/app/view/GeofenceMap.js index e8a4dc5de..70584f41d 100644 --- a/web/app/view/GeofenceMap.js +++ b/web/app/view/GeofenceMap.js @@ -19,7 +19,8 @@ Ext.define('Traccar.view.GeofenceMap', { xtype: 'geofenceMapView', requires: [ - 'Traccar.view.GeofenceMapController' + 'Traccar.view.GeofenceMapController', + 'Traccar.GeofenceConverter' ], controller: 'geofenceMap', @@ -56,6 +57,9 @@ Ext.define('Traccar.view.GeofenceMap', { map = this.map; this.features = new ol.Collection(); + if (this.area !== "") { + this.features.push(new ol.Feature(Traccar.GeofenceConverter.wktToGeometry(this.mapView, this.area))); + } featureOverlay = new ol.layer.Vector({ source: new ol.source.Vector({ features: this.features |