Skip to content

Commit 8febcd2

Browse files
committed
color changes
1 parent fa7b767 commit 8febcd2

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

assets/javascripts/app.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,28 @@ var App = (function ($, publ) {
297297

298298
case 5:
299299
case 6:
300-
color = "#1E90FF";
300+
// color = "#1E90FF";
301+
color = "#228B22";
302+
break;
303+
}
304+
}
305+
306+
return color;
307+
};
308+
309+
publ.getFontColor = function (feature) {
310+
// console.log(feature.get("tracker_id"));
311+
color = "#666666";
312+
313+
if(feature.get('status_id')) {
314+
switch (feature.get('status_id')) {
315+
case 1:
316+
color = "#FFFFFF";
317+
break;
318+
319+
case 5:
320+
case 6:
321+
color = "#FFFFFF";
301322
break;
302323
}
303324
}
@@ -367,10 +388,10 @@ var App = (function ($, publ) {
367388
gradient: false,
368389
glyph: publ.getSymbol(feature),
369390
fontSize: 0.6,
370-
radius: 22,
391+
radius: 18,
371392
rotation: 0,
372393
rotateWithView: false,
373-
color: "#333333",
394+
color: publ.getFontColor(feature),
374395
fill: new ol.style.Fill({
375396
color: publ.getColor(feature)
376397
}),

0 commit comments

Comments
 (0)