aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapMarkerController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-27 20:26:21 +1300
committerGitHub <noreply@github.com>2016-12-27 20:26:21 +1300
commitecdf23611e30707f1bc5f89420f9409acaa56652 (patch)
tree2bf13878f536d0b63e2b4645b57c264a171fb078 /web/app/view/MapMarkerController.js
parent082f7926b846f876613f27f21779b594e79ea0c7 (diff)
parent747c16cadc803fdf0e4de0dc331c84e29dd56e9c (diff)
downloadtrackermap-web-ecdf23611e30707f1bc5f89420f9409acaa56652.tar.gz
trackermap-web-ecdf23611e30707f1bc5f89420f9409acaa56652.tar.bz2
trackermap-web-ecdf23611e30707f1bc5f89420f9409acaa56652.zip
Merge pull request #371 from Abyss777/charts
Charts implementation
Diffstat (limited to 'web/app/view/MapMarkerController.js')
-rw-r--r--web/app/view/MapMarkerController.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js
index 510e11bd..f8f0e43f 100644
--- a/web/app/view/MapMarkerController.js
+++ b/web/app/view/MapMarkerController.js
@@ -276,26 +276,10 @@ Ext.define('Traccar.view.MapMarkerController', {
}
},
- getReportColor: function (deviceId) {
- var index, reportColor, device = Ext.getStore('Devices').getById(deviceId);
- if (device) {
- reportColor = device.get('attributes')['web.reportColor'];
- }
- if (reportColor) {
- return reportColor;
- } else {
- index = 0;
- if (deviceId !== undefined) {
- index = deviceId % Traccar.Style.mapRouteColor.length;
- }
- return Traccar.Style.mapRouteColor[index];
- }
- },
-
getRouteStyle: function (deviceId) {
return new ol.style.Style({
stroke: new ol.style.Stroke({
- color: this.getReportColor(deviceId),
+ color: Traccar.app.getReportColor(deviceId),
width: Traccar.Style.mapRouteWidth
})
});
@@ -325,7 +309,7 @@ Ext.define('Traccar.view.MapMarkerController', {
},
getReportMarker: function (deviceId, angle) {
- return this.getMarkerStyle(false, this.getReportColor(deviceId), angle, 'arrow');
+ return this.getMarkerStyle(false, Traccar.app.getReportColor(deviceId), angle, 'arrow');
},
resizeMarker: function (style, zoom) {