Jump to content

ACARSmap plotting routes


onelifexv

Recommended Posts

  • 6 months later...

same here, it doesn't render the route. It's just a straight line from A to B

I guess because the Routemap has this in it and acarsmap doesn't. So if anyone can check how to add that to acarsmap.....

One sidenote to make : this should get it's info from the acarsdata table in the db instead of the schedules. Acarsdata copies the route from the schedules anyway and if a pilot enters his own route, that one is taken.

<?php
/* Populate the route */
if(is_array($mapdata->route_details))
{
$list = array();

foreach($mapdata->route_details as $route)
{
if($route->type == NAV_VOR)
{
$icon = fileurl('/lib/images/icon_vor.png');
}
else
{
$icon = fileurl('/lib/images/icon_fix.png');
}

echo 'var loc = new google.maps.LatLng('.$route->lat.', '.$route->lng.');
var _marker = new google.maps.Marker({
position: loc,
map: map,
icon: "'.$icon.'",
title: "'.$route->title.'"
});
bounds.extend(loc);';

// For the polyline
$list[] = "new google.maps.LatLng({$route->lat}, {$route->lng})";
}
}
?>

Link to comment
Share on other sites

  • 3 months later...
  • 5 weeks later...

I think I finally fixed this.

The culprit is ACARS.php, with the line:

$flight->route_details = NavData::parseRoute($flight->route);

parseRoute actually needs several items from that route (lat, lng, and route). The following worked for me:

$schedule = SchedulesData::getSchedulebyFlight(substr($flight->flightnum,0,3),substr($flight->flightnum,3));

$flight->route_details = NavData::parseRoute($schedule);

Now to figure out why it calls the clearPreviousMarkers() a few seconds after it displays.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...