aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapMarkerController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-30 22:31:24 +1300
committerGitHub <noreply@github.com>2016-12-30 22:31:24 +1300
commit37001649c81ab0d9eb31b517fc0def473440fb21 (patch)
tree63cbceb8bc3e4eaf783f53342a6d7cc0c9c3fcb7 /web/app/view/MapMarkerController.js
parentf5030b90ecde5a50e05cd81ed8d08b6387b8dead (diff)
parentc142bc62a8f004630efac97cf15eb9ba604c3981 (diff)
downloadtrackermap-web-37001649c81ab0d9eb31b517fc0def473440fb21.tar.gz
trackermap-web-37001649c81ab0d9eb31b517fc0def473440fb21.tar.bz2
trackermap-web-37001649c81ab0d9eb31b517fc0def473440fb21.zip
Merge pull request #378 from Abyss777/not_show_markers
Add an option to not show report markers
Diffstat (limited to 'web/app/view/MapMarkerController.js')
-rw-r--r--web/app/view/MapMarkerController.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js
index 907451b6..0a87b5d3 100644
--- a/web/app/view/MapMarkerController.js
+++ b/web/app/view/MapMarkerController.js
@@ -240,15 +240,15 @@ 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'));
+ 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());