Merge pull request #49 from mutability/show-stale-planes

Change the marker color for aircraft with no recent updates.
This commit is contained in:
MalcolmRobb 2014-10-29 15:32:30 +00:00
commit 7b2e4ca67d
2 changed files with 7 additions and 0 deletions

View file

@ -20,6 +20,7 @@ CONST_ZOOMLVL = 5;
// The default marker color
MarkerColor = "rgb(127, 127, 127)";
SelectedColor = "rgb(225, 225, 225)";
StaleColor = "rgb(190, 190, 190)";
// -- Site Settings ---------------------------------------
SiteShow = false; // true or false

View file

@ -53,10 +53,16 @@ var planeObject = {
// Should create an icon for us to use on the map...
funcGetIcon : function() {
this.markerColor = MarkerColor;
// If this marker is selected we should make it lighter than the rest.
if (this.is_selected == true) {
this.markerColor = SelectedColor;
}
// If we have not seen a recent update, change color
if (this.seen > 15) {
this.markerColor = StaleColor;
}
// Plane marker
var baseSvg = {