From 7549a78f785edf092099b42a015e4e556bb480b9 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 30 Dec 2016 13:51:02 +0500 Subject: Add option to not show report markers --- web/app/view/MapMarkerController.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'web/app/view/MapMarkerController.js') diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js index 907451b6..2b447600 100644 --- a/web/app/view/MapMarkerController.js +++ b/web/app/view/MapMarkerController.js @@ -240,15 +240,17 @@ Ext.define('Traccar.view.MapMarkerController', { maxx = Math.max(point[0], maxx); maxy = Math.max(point[1], maxy); } - geometry = new ol.geom.Point(point); - marker = new ol.Feature(geometry); - marker.set('record', position); - style = this.getReportMarker(position.get('deviceId'), position.get('course')); - /*style.getText().setText( - Ext.Date.format(position.get('fixTime'), Traccar.Style.dateTimeFormat24));*/ - marker.setStyle(style); - this.reportMarkers[position.get('id')] = marker; - this.getView().getMarkersSource().addFeature(marker); + if (store.showMarkers !== false) { + geometry = new ol.geom.Point(point); + marker = new ol.Feature(geometry); + marker.set('record', position); + style = this.getReportMarker(position.get('deviceId'), position.get('course')); + /*style.getText().setText( + Ext.Date.format(position.get('fixTime'), Traccar.Style.dateTimeFormat24));*/ + marker.setStyle(style); + this.reportMarkers[position.get('id')] = marker; + this.getView().getMarkersSource().addFeature(marker); + } } if (minx !== maxx || miny !== maxy) { this.getView().getMapView().fit([minx, miny, maxx, maxy], this.getView().getMap().getSize()); -- cgit v1.2.3