Hello
EN //
here modify for Color Airplanes
depending on the flight altitude
##############
DE //
Modifikation für farbige Flugzeuge
Abhänig der Flughöhe
This dont work with old version
cp planeObject.js planeObject.js_orig
search
PlaneObject.prototype.updateIcon = function() {
var col = MarkerColor;
// If this marker is selected we should make it lighter than the rest.
if (this.selected)
col = SelectedColor;
// If we have not seen a recent position update, change color
if (this.seen_pos > 15)
col = StaleColor;
// If the squawk code is one of the international emergency codes,
// match the info window alert color.
if (this.squawk in SpecialSquawks)
col = SpecialSquawks[this.squawk].markerColor;
----->
var weight = this.selected ? 2 : 1;
var rotation = (this.track === null ? 0 : this.track);
and modify to
PlaneObject.prototype.updateIcon = function() {
var col = MarkerColor;
// If this marker is selected we should make it lighter than the rest.
if (this.selected)
col = SelectedColor;
// If we have not seen a recent position update, change color
if (this.seen_pos > 15)
col = StaleColor;
// If the squawk code is one of the international emergency codes,
// match the info window alert color.
if (this.squawk in SpecialSquawks)
col = SpecialSquawks[this.squawk].markerColor;
//BEGIN COLORING OF AIRCRAFT BY ALTITUDE
if( this.altitude >= 0 && this.altitude < 3000 ) {
col = “rgb(255,0,0)”;
}
if( this.altitude >= 3000 && this.altitude < 5000 ) {
col = “rgb(255,165,0)”;
}
if( this.altitude >= 5000 && this.altitude < 10000 ) {
col = “rgb(127,255,212)”;
}
if( this.altitude >= 10000 && this.altitude < 20000 ) {
col = “rgb(255,20,147)”;
}
if( this.altitude >= 20000 && this.altitude < 30000 ) {
col = “rgb(0,255,0)”;
}
if( this.altitude >= 30000 && this.altitude < 50000 ) {
//this.markerColor = “rgb(255,255,0)”;
col = “rgb(139,0,139)”;
}
//END OLORING OF AIRCRAFT BY ALTITUDE
var weight = this.selected ? 2 : 1;
var rotation = (this.track === null ? 0 : this.track);
and save . reload your Browser.
HAPPY COLOR FLIGHTING