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.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index bc8ca843c..2f4eb5a3c 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -76,10 +76,11 @@ Ext.define('Traccar.view.MapController', {
this.getView().getVectorSource().addFeature(marker);
style = this.getLatestMarker();
- style.getImage().setRotation(position.get('course') * 180 / Math.PI);
style.getText().setText(device.get('name'));
marker.setStyle(style);
}
+
+ marker.getStyle().getImage().setRotation(position.get('course') * Math.PI / 180);
}
},
@@ -109,7 +110,7 @@ Ext.define('Traccar.view.MapController', {
this.getView().getVectorSource().addFeature(marker);
style = this.getReportMarker();
- style.getImage().setRotation(position.get('course') * 180 / Math.PI);
+ style.getImage().setRotation(position.get('course') * Math.PI / 180 );
style.getText().setText(
Ext.Date.format(position.get('fixTime'), Traccar.Style.dateTimeFormat));