aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-09 16:54:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-09 16:54:10 +1300
commit3d05dfd49802696882bc77165e48b3b4db6d1603 (patch)
treedbafb802e38b744a42633050ec8bc2ff4fd28545 /web/app/view/MapController.js
parentd04c2e83b12b6a546493a60f13ebf63253953787 (diff)
downloadtraccar-server-3d05dfd49802696882bc77165e48b3b4db6d1603.tar.gz
traccar-server-3d05dfd49802696882bc77165e48b3b4db6d1603.tar.bz2
traccar-server-3d05dfd49802696882bc77165e48b3b4db6d1603.zip
Set rotation in radians and keep it
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r--web/app/view/MapController.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index 9ccc3d57c..7abce1ff5 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -76,7 +76,7 @@ Ext.define('Traccar.view.MapController', {
this.getView().getVectorSource().addFeature(marker);
style = this.getLatestMarker();
- style.getImage().setRotation(position.get('course'));
+ style.getImage().setRotation(position.get('course') * 180 / Math.PI);
style.getText().setText(device.get('name'));
marker.setStyle(style);
}
@@ -109,7 +109,7 @@ Ext.define('Traccar.view.MapController', {
this.getView().getVectorSource().addFeature(marker);
style = this.getReportMarker();
- style.getImage().setRotation(position.get('course'));
+ style.getImage().setRotation(position.get('course') * 180 / Math.PI);
// style.getText().setText('2000-01-01 00:00:00'); // TODO show time
marker.setStyle(style);
@@ -187,7 +187,8 @@ Ext.define('Traccar.view.MapController', {
image: new ol.style.Arrow({
radius: radius,
fill: style.getImage().getFill(),
- stroke: style.getImage().getStroke()
+ stroke: style.getImage().getStroke(),
+ rotation: style.getImage().getRotation()
}),
text: style.getText()
});