aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r--web/app/view/MapController.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index ac2188ef..59fd285e 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -19,6 +19,11 @@ Ext.define('Traccar.view.MapController', {
extend: 'Ext.app.ViewController',
alias: 'controller.map',
+ requires: [
+ 'Traccar.model.Position',
+ 'Traccar.model.Device'
+ ],
+
config: {
listen: {
controller: {
@@ -294,7 +299,9 @@ Ext.define('Traccar.view.MapController', {
},
selectReport: function (position, center) {
- this.selectMarker(this.reportMarkers[position.get('id')], center);
+ if (position instanceof Traccar.model.Position) {
+ this.selectMarker(this.reportMarkers[position.get('id')], center);
+ }
},
selectFeature: function (feature) {