Link to FlightAware

The "to-do" list for Virtual Radar Server is as long as my arm, but if you want to pile more work onto it then this is for you.
Post Reply
jfm
Posts: 82
Joined: Thu May 10, 2012 4:09 pm

Link to FlightAware

Post by jfm » Fri Mar 15, 2013 5:29 pm

When viewing the details of a flight, the current links are:

www.airliners.net :: www.airframes.org

Would it be possible to add a link to FlightAware based on the callsign? In the case of flights without the operator code, this would need to be appended (like with the routes). For example, Westjet would end up being:

http://flightaware.com/live/flight/WJA671

This would be useful when trying to submit route updates.

Thanks!

agw
Posts: 2249
Joined: Fri Feb 17, 2012 3:20 am

Re: Link to FlightAware

Post by agw » Fri Mar 15, 2013 5:44 pm

Certainly could do - I have a feeling someone asked for something similar a while back but I've forgotten which site they wanted adding.

However there is already a callsign-based link to FlightAware in the submit routes website.

jfm
Posts: 82
Joined: Thu May 10, 2012 4:09 pm

Re: Link to FlightAware

Post by jfm » Mon Mar 18, 2013 2:33 pm

agw wrote:However there is already a callsign-based link to FlightAware in the submit routes website.
That's true. It would be nice to have a quick link when just viewing the map, too.

Jester
Posts: 54
Joined: Tue Apr 09, 2013 6:23 pm

Re: Link to FlightAware

Post by Jester » Wed Apr 10, 2013 7:47 pm

easy change if you want to play around and compile yourself,

just edit GoogleMapsAircraftDetail.js and add

if(afr.length > 0) html += ' :: <a href="http://flightaware.com/live/flight/' + afr + '" target="_flightawarecom">www.flightaware.com</a>';

Works fine in my test build..

jfm
Posts: 82
Joined: Thu May 10, 2012 4:09 pm

Re: Link to FlightAware

Post by jfm » Sat Apr 13, 2013 9:06 pm

Thanks for the suggestion! I expanded it a bit to use the callsign first, then the registration. It also tries to fix callsigns that don't have the operator code prefix (like WestJet):

Code: Select all

if((aircraft.Call != null && aircraft.Call != "") || (aircraft.Reg != null && aircraft.Reg != "")) {
	if(aircraft.Reg != null && aircraft.Reg != "") {
		html += ' :: ';
	}
	var afr = aircraft.getAFR();
	html += '<a href="http://flightaware.com/live/flight/' + ( (aircraft.Call != null && aircraft.Call != "") ? (!isNaN(aircraft.Call) && aircraft.OpIcao ? aircraft.OpIcao + aircraft.Call : aircraft.Call) : afr ) + '" target="_flightawarecom">flightaware.com</a>';
}

Post Reply