FlightAware Discussions

error in latlon_box input


I’m trying to insert values to latlon_box input and any value that I insert put me the same message:

[message:protected] => invalid number of elements in latlon_box

I’m using MapFlightEx.

Any can help me with a concrete example? Thanks.

Here’s an example using latlon_box in PHP:

$params = array("faFlightID" => $flight_id,
                "mapWidth" => 640, 
                "mapHeight" => 480, 
                "layer_on" => array("US urban areas", "US Cities"),
                "layer_off" => array("US state boundaries"), 
                "show_data_blocks" => 0, 
                "show_airports" => 1, 
                "airports_expand_view" => 0, 
                "latlon_box" => array(0, 0, 45, 45) 
$result = $client->MapFlightEx($params);

Thank you!


Hello, one question more:

Sometimes I receive the map correctly and sometimes, when I refresh the browser for example, I receive an error like this:

[message:protected] => MapFlightEx failed to generate map

Any orientation? Thanks!

Complex map settings are more likely to cause a timeout during generation, which may be what you are seeing. Some map settings may also just be invalid and never produce a valid output. If you’re occasionally seeing a successful map for the same settings, then it’s probably just a timeout and you might be able to just retry your request. We’re working on some map server performance improvements over the next week or two, which may improve this.

Thank you,

so, the problem are in the server… I thought the problem was in my code. I’m going to wait until the problem is fixed.

See you,