aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/MapMarkerController.js
diff options
context:
space:
mode:
authortsmgeek <tsmgeek@gmail.com>2017-08-22 00:21:29 +0100
committertsmgeek <tsmgeek@gmail.com>2017-08-22 00:21:29 +0100
commitfdf35488b5b3cd5725c6c2e179b65377d30c6577 (patch)
treeda0b3927f3049475cd67977fe093d198920c1c37 /web/app/view/map/MapMarkerController.js
parentf8b98b236fd676fe8945d942842640ddea5bbac8 (diff)
parente0bb9b92d07176677b3043530660af3bc30774d7 (diff)
downloadtrackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.gz
trackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.bz2
trackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.zip
Merge from upstream, change .eslintrc.json
Diffstat (limited to 'web/app/view/map/MapMarkerController.js')
-rw-r--r--web/app/view/map/MapMarkerController.js26
1 files changed, 10 insertions, 16 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js
index 09dd83dc..c46faac2 100644
--- a/web/app/view/map/MapMarkerController.js
+++ b/web/app/view/map/MapMarkerController.js
@@ -216,7 +216,7 @@ Ext.define('Traccar.view.map.MapMarkerController', {
projection = mapView.getProjection();
center = ol.proj.fromLonLat([position.get('longitude'), position.get('latitude')]);
pointResolution = ol.proj.getPointResolution(projection, mapView.getResolution(), center);
- radius = (position.get('accuracy') / ol.proj.METERS_PER_UNIT.m) * mapView.getResolution() / pointResolution;
+ radius = position.get('accuracy') / ol.proj.METERS_PER_UNIT.m * mapView.getResolution() / pointResolution;
if (feature) {
feature.getGeometry().setCenter(center);
@@ -257,8 +257,8 @@ Ext.define('Traccar.view.map.MapMarkerController', {
marker.set('record', device);
style = this.getLatestMarker(this.getDeviceColor(device),
- position.get('course'),
- device.get('category'));
+ position.get('course'),
+ device.get('category'));
style.getText().setText(device.get('name'));
marker.setStyle(style);
marker.setId(device.get('id'));
@@ -429,10 +429,8 @@ Ext.define('Traccar.view.map.MapMarkerController', {
resizeMarker: function (style, zoom) {
var image, text;
- image = Traccar.DeviceImages.getImageIcon(style.getImage().fill,
- zoom,
- style.getImage().angle,
- style.getImage().category);
+ image = Traccar.DeviceImages.getImageIcon(
+ style.getImage().fill, zoom, style.getImage().angle, style.getImage().category);
text = style.getText();
text.setOffsetY(-image.getSize()[1] / 2 - Traccar.Style.mapTextOffset);
style.setText(text);
@@ -440,18 +438,14 @@ Ext.define('Traccar.view.map.MapMarkerController', {
},
rotateMarker: function (style, angle) {
- style.setImage(Traccar.DeviceImages.getImageIcon(style.getImage().fill,
- style.getImage().zoom,
- angle,
- style.getImage().category));
+ style.setImage(Traccar.DeviceImages.getImageIcon(
+ style.getImage().fill, style.getImage().zoom, angle, style.getImage().category));
},
updateDeviceMarker: function (style, color, category) {
var image, text;
- image = Traccar.DeviceImages.getImageIcon(color,
- style.getImage().zoom,
- style.getImage().angle,
- category);
+ image = Traccar.DeviceImages.getImageIcon(
+ color, style.getImage().zoom, style.getImage().angle, category);
text = style.getText();
text.setOffsetY(-image.getSize()[1] / 2 - Traccar.Style.mapTextOffset);
style.setText(text);
@@ -608,7 +602,7 @@ Ext.define('Traccar.view.map.MapMarkerController', {
}
},
- filterDevices: function (store) {
+ filterDevices: function () {
Ext.getStore('Devices').each(this.updateDeviceVisibility, this, false);
}
});