Unable to display the map


#1

It shows the blank screen, please guide me for this

send me some example code flightmap


#2

Here is a FlightXML2 (beta) sample in PHP:



<?php
# This example uses the built-in SoapClient provided in PHP5.
# http://us2.php.net/SoapClient 

$options = array(
                 'trace' => true,
                 'exceptions' => 0,
                 'login' => 'xxxxxx',
                 'password' => 'xxxxxxxxxxxxxxxxxxxx',
                 );
$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);

$params = array("ident" => "DAL101", "mapWidth" => 640, "mapHeight" => 480);
$result = $client->MapFlight($params);

if (!isset($result) || empty($result)) {
  print "Error while generating graph";
} else {
  header("Content-type: image/gif");
  print base64_decode($result->MapFlightResult);
}

?>


Replace the “DAL101” with the flight you want to track. Also replace the login and password fields above with your username and FlightXML apiKey.

Be aware that the flight must actually be in the air for MapFlight to produce a useful image. You can use http://flightaware.com/live/fleet/DAL to pick a flight that is currently in the air, as a test.