Jump to content

Livemap and Inair


massilia68

Recommended Posts

Hello and sorry for my english ... I tried to edit the file by entering acars.php

viewmapbig public function ()

{

$ this-> set ('acarsdata', ACARSData :: GetACARSData ());

$ this-> render ('acarsmapbig.tpl');

}

.

I also created the file "acarsmapbig.tpl" copied and pasted the code I found here, unfortunately it does not work ... how to solve? thanks in advance for any response ... Regards

Ok, I've coded the full screen module for you ;)

Put this in your ACARS.php Module:

public function viewmapbig()
{
$this->set('acarsdata', ACARSData::GetACARSData());
$this->render('acarsmapbig.tpl');

}

Then you have to create a new template file in your "phpvms/lib/skins/YOURSKINFOLDER/" folder named acarsmapbig.tpl which contains the following stuff:

<head>
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
</style>
</head>
<?php
/**
* These are some options for the ACARS map, you can change here
*
* By default, the zoom level and center are ignored, and the map
* will try to fit the all the flights in. If you want to manually set
* the zoom level and center, set "autozoom" to false.
*
* You can use these MapTypeId's:
* http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeId
*
* Change the "TERRAIN" to the "Constant" listed there - they are case-sensitive
*
* Also, how to style the acars pilot list table. You can use these style selectors:
*
* table.acarsmap { }
* table.acarsmap thead { }
* table.acarsmap tbody { }
* table.acarsmap tbody tr.even { }
* table.acarsmap tbody tr.odd { }
*/
?>
<script type="text/javascript">
<?php
/* These are the settings for the Google map. You can see the
Google API reference if you want to add more options.

There's two options I've added:

autozoom: This will automatically center in on/zoom
so all your current flights are visible. If false,
then the zoom and center you specify will be used instead

refreshTime: Time, in seconds * 1000 to refresh the map.
The default is 10000 (10 seconds)
*/
?>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=false">
</script>
<script type="text/javascript">
var acars_map_defaults = {
autozoom: false,
zoom: 4,
center: new google.maps.LatLng("<?php echo Config::Get('MAP_CENTER_LAT')?>", "<?php echo Config::Get('MAP_CENTER_LNG')?>"),
mapTypeId: google.maps.MapTypeId.SATELLITE,
refreshTime: 10000
};
</script>
<div id="acarsmap" style="margin: 0; width: 100%; height: 100%; position: absolute;"></div>
</div>
<script type="text/javascript" src="<?php echo fileurl('/lib/js/acarsmap.js');?>"></script>
<?php
/* This is the template which is used in the table above, for each row.
Be careful modifying it. You can simply add/remove columns, combine
columns too. Keep each "section" (<%=...%>) intact

Variables you can use (what they are is pretty obvious)

Variable:	 Notes:
<%=flight.pilotid%>
<%=flight.firstname%>
<%=flight.lastname%>
<%=flight.pilotname%> First and last combined
<%=flight.flightnum%>
<%=flight.depapt%>	 Gives the airport name
<%=flight.depicao%>
<%=flight.arrapt%>	 Gives the airport name
<%=flight.arricao%>
<%=flight.phasedetail%>
<%=flight.heading%>
<%=flight.alt%>
<%=flight.gs%>
<%=flight.disremaining%>
<%=flight.timeremaning%>
<%=flight.aircraft%> Gives the registration
<%=flight.aircraftname%> Gives the full name
<%=flight.client%>	 FSACARS/Xacars/FSFK, etc
<%=flight.trclass%>	 "even" or "odd"
 <%=flight.realid%>
<%=flight.percomplete%>
<%=flight.onlineimage%>

You can also use logic in the templating, if you so choose:
http://ejohn.org/blog/javascript-micro-templating/
*/

?>
<script type="text/html" id="acars_map_row">
<tr height="10px" class="<%=flight.trclass%>">
</tr>
</script>
<?php
/* This is the template for the little map bubble which pops up when you click on a flight
Same principle as above, keep the <%=...%> tags intact. The same variables are available
to use here as are available above.
*/
?>
<script type="text/html" id="acars_map_bubble">
<span style="font-size: 10px; text-align:left; width: 100%" align="left">
<b><%=flight.pilotid%> - <%=flight.pilotname%></b><br />
<strong>Flight <%=flight.flightnum%></strong> (<%=flight.depicao%> to <%=flight.arricao%>)<br />
<strong>Aircraft: </strong><%=flight.aircraftname%><br />
<strong>Status: </strong><%=flight.phasedetail%><br />
<strong>Dist/Time Remain: </strong><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%><br />
</span>
</script>


The map should be accessible with a link looking like this:

http://www.YOURLINK/YOURPHPVMSFOLDER/index.php/acars/viewmapbig

or if you have installed phpvms into your root folder

http://www.YOURLINK/index.php/acars/viewmapbig

You will only have to put a normal button or link to your default livemap linking to the fullscreen one.

I have a live demo here if you want to check it out:

http://skyline-va.de...cars/viewmapbig

Hope this helps ;)

Link to comment
Share on other sites

  • 2 weeks later...

I am trying to have different images for different airline ICAO and only one part is working.

In the acarsmap.js I replaced this:

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair/"+data.heading+".png",

flightdetails: data,

infowindow_content: detailed_bubble

});

with this and it does not work:

if (data.code == "AIO"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair"+data.heading+".png",

flightdetails: data,

infowindow_content: detailed_bubble

});

}

else if (data.code == "PAG"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair2"+data.heading+".png",

flightdetails: data,

infowindow_content: detailed_bubble

});

}

When I make a test flight no images at all show up. I have AIO images in the inair folder and the PAG images in the inair2 folder. I've checked permissions on my folders and that is fine. I know the image path's are working because when I switch out inair with inair2 in the image path of the original code, I get the correct images from the folder I am referencing in the original code. However the code that should select the image depending on ICAO code does not work!

What could be the problem?

Any help appreciated!

Link to comment
Share on other sites

I am trying to have different images for different airline ICAO and only one part is working.

In the acarsmap.js I replaced this:

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair/"+data.heading+".png",

flightdetails: data,

infowindow_content: detailed_bubble

});

with this and it does not work:

if (data.code == "AIO"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair"+data.heading+".png",

flightdetails: data,

infowindow_content: detailed_bubble

});

}

else if (data.code == "PAG"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair2"+data.heading+".png",

flightdetails: data,

infowindow_content: detailed_bubble

});

}

When I make a test flight no images at all show up. I have AIO images in the inair folder and the PAG images in the inair2 folder. I've checked permissions on my folders and that is fine. I know the image path's are working because when I switch out inair with inair2 in the image path of the original code, I get the correct images from the folder I am referencing in the original code. However the code that should select the image depending on ICAO code does not work!

What could be the problem?

Any help appreciated!

The good code is

icon: url+"/lib/images/inair/"+data[i].code+"/"+data[i].heading+".png"

instead

icon: url+"/lib/images/inair/"+data[i].heading+".png"

  • Like 1
Link to comment
Share on other sites

FSX30HD,

That did not work either. Now I have the code below and it's not working either. Also, when I connect via acars no image shows up when on the ground, but the image does show when I am in the air, although it is the wrong image because the code is not working in acarsmap.js .

Here is my complete code as of now. I think I have changed things so much I have just messed up the code completely.

/**
* phpVMS - Virtual Airline Administration Software
* Copyright (c) 2008 Nabeel Shahzad
* For more information, visit www.phpvms.net
* Forums: http://www.phpvms.net/forum
* Documentation: http://www.phpvms.net/docs
*
* phpVMS is licenced under the following license:
*   Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
*   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
*
* @author Nabeel Shahzad
* @copyright Copyright (c) 2008, Nabeel Shahzad
* @link http://www.phpvms.net
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
*
* Rewritten for Google Maps v3
*/

var flightMarkers = [];
var routeMarkers = [];
var flightPath = null;
var depMarker = null, arrMarker = null;
var info_window= null;
var run_once = false;

var defaultOptions = {
autozoom: true,
zoom: 4,
center: new google.maps.LatLng(-25.363882,131.044922),
mapTypeId: google.maps.MapTypeId.TERRAIN,
refreshTime: 12000,
autorefresh: true
};

var options = $.extend({}, defaultOptions, acars_map_defaults);
var map = new google.maps.Map(document.getElementById("acarsmap"), options);

// They clicked the map
google.maps.event.addListener(map, 'click', function()
{
//clearPreviousMarkers();
});

liveRefresh();
if(options.autorefresh == true)
{
   setInterval(function () { liveRefresh(); }, options.refreshTime);
}

function liveRefresh()
{
$.ajax({
type: "GET",
url: url + "/action.php/acars/data",
dataType: "json",
cache: false,
success: function(data) 
{
populateMap(data);
  }
});
};

function populateMap(data)
{
clearMap();
$("#pilotlist").html("");

if (data.length == 0) {
return false;
}

var lat, lng;
var details, row, pilotlink;
var bounds = new google.maps.LatLngBounds();

for (var i = 0; i < data.length; i++) 
{
if(data[i] == null || data[i].lat == null || data[i].lng == null
  || data[i].lat == "" || data[i].lng == "")
{
continue;
  }

lat = data[i].lat;
lng = data[i].lng;

if(i%2 == 0)
data[i].trclass = "even";
else
data[i].trclass = "odd";

// Pull ze templates!
var map_row = tmpl("acars_map_row", {flight: data[i]});
var detailed_bubble = tmpl("acars_map_bubble", {flight: data[i]});

$('#pilotlist').append(map_row);

/* var pos = new google.maps.LatLng(lat, lng);
flightMarkers[flightMarkers.length] = new google.maps.Marker({
position: pos,
map: map,
icon: url+"/lib/images/inair2/"+data[i].heading+".png",
flightdetails: data[i],
infowindow_content: detailed_bubble
});

/* inair images for different airlines */

if (data[i].code == "AIO"){
 var pos = new google.maps.LatLng(lat, lng);
flightMarkers[flightMarkers.length] = new google.maps.Marker({
position: pos,
map: map,
icon: url+"/lib/images/inair"+data[i].code+"/"+data[i].heading+".png",
flightdetails: data[i],
infowindow_content: detailed_bubble
});
 }
else if (data[i].code == "PAG"){
 var pos = new google.maps.LatLng(lat, lng);
flightMarkers[flightMarkers.length] = new google.maps.Marker({
position: pos,
map: map,
icon: url+"/lib/images/inair"+data[i].code+"/"+data[i].heading+".png",
flightdetails: data[i],
infowindow_content: detailed_bubble
});
 }    
/* inair images for different airlines */

bounds.extend(pos);

google.maps.event.addListener(flightMarkers[flightMarkers.length - 1], 'click', function() 
{
clearPreviousMarkers();

var focus_bounds = new google.maps.LatLngBounds();
// Flight details info window
info_window = new google.maps.InfoWindow({ 
content: this.infowindow_content,
position: this.position
});

info_window.open(map, this);

// Add polyline, and start/end points
var dep_location = new google.maps.LatLng(this.flightdetails.deplat, this.flightdetails.deplng);
var arr_location = new google.maps.LatLng(this.flightdetails.arrlat, this.flightdetails.arrlng);

depMarker = new google.maps.Marker({
position: dep_location,
map: map,
icon: depicon,
title: this.flightdetails.depname,
zIndex: 100
});

arrMarker = new google.maps.Marker({
position: arr_location,
map: map,
icon: arricon,
title: this.flightdetails.arrname,
zIndex: 100
});

// Now the flight path, if it exists
var path = new Array();
path[path.length] = dep_location;
focus_bounds.extend(dep_location);
if(this.flightdetails.route_details.length > 0)
{
      $.each(this.flightdetails.route_details, function(i, nav)
      {
          var loc = new google.maps.LatLng(nav.lat, nav.lng);

          if(nav.type == 3)
              icon = "icon_vor.png";
          else
              icon = "icon_fix.png";

          var navpoint_info = tmpl("navpoint_bubble", {nav: nav});
          routeMarkers[routeMarkers.length] = new google.maps.Marker({
          position: loc,
          map: map,
          icon: url + "/lib/images/"+icon,
          title: nav.title,
          zIndex: 100,
          infowindow_content: navpoint_info
          });

          google.maps.event.addListener(routeMarkers[routeMarkers.length - 1], 'click', function() 
  {
  info_window = new google.maps.InfoWindow({ 
  content: this.infowindow_content,
  position: this.position
  });

  info_window.open(map, this);
  });

          path[path.length] = loc;
          focus_bounds.extend(loc);
      });
  }

path[path.length] = arr_location;
focus_bounds.extend(this.position);
focus_bounds.extend(arr_location);

flightPath = new google.maps.Polyline({
path: path,
strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2
});

map.fitBounds(focus_bounds); 
flightPath.setMap(map);
});
}

// If they selected autozoom, only do the zoom first time
if(options.autozoom == true && run_once == false)
{
map.fitBounds(bounds); 
run_once = true;
}
}

function clearPreviousMarkers()
{
if(info_window)
{
info_window.close();
info_window = null;
}

if(depMarker != null)
{
depMarker.setMap(null);
depMarker = null;
}

if(arrMarker != null)
{
arrMarker.setMap(null);
arrMarker = null;
}

if(routeMarkers.length > 0)
{
  for(var i = 0; i < routeMarkers.length; i++) {
routeMarkers[i].setMap(null);
}
}

routeMarkers.length = 0;

if(flightPath != null)
{
flightPath.setMap(null);
flightPath = null;
}
}

function clearMap()
{
if(flightMarkers.length > 0)
{
for(var i = 0; i < flightMarkers.length; i++) {
flightMarkers[i].setMap(null);
}
}

flightMarkers.length = 0;

if(routeMarkers.length > 0)
{
  for(var i = 0; i < routeMarkers.length; i++) {
routeMarkers[i].setMap(null);
}
}

routeMarkers.length = 0;
}

Link to comment
Share on other sites

  • 2 weeks later...

FSX30HD,

That did not work either. Now I have the code below and it's not working either. Also, when I connect via acars no image shows up when on the ground, but the image does show when I am in the air, although it is the wrong image because the code is not working in acarsmap.js .

Here is my complete code as of now. I think I have changed things so much I have just messed up the code completely.


/* var pos = new google.maps.LatLng(lat, lng);
flightMarkers[flightMarkers.length] = new google.maps.Marker({
position: pos,
map: map,
icon: url+"/lib/images/inair2/"+data[i].heading+".png",
flightdetails: data[i],
infowindow_content: detailed_bubble
});

/* inair images for different airlines */

if (data[i].code == "AIO"){
var pos = new google.maps.LatLng(lat, lng);
flightMarkers[flightMarkers.length] = new google.maps.Marker({
position: pos,
map: map,
icon: url+"/lib/images/inair"+data[i].code+"/"+data[i].heading+".png",
flightdetails: data[i],
infowindow_content: detailed_bubble
});
}
else if (data[i].code == "PAG"){
var pos = new google.maps.LatLng(lat, lng);
flightMarkers[flightMarkers.length] = new google.maps.Marker({
position: pos,
map: map,
icon: url+"/lib/images/inair"+data[i].code+"/"+data[i].heading+".png",
flightdetails: data[i],
infowindow_content: detailed_bubble
});
}
/* inair images for different airlines */

Missing else in your condition and more easy to change just the icon value:

/* inair images for different airlines */if (data[i].flightnum.substring(0, 3) == "AIO")

{
var icon = url+"/lib/images/inair"+data[i].flightnum.substring(0, 3)+"/"+data[i].heading+".png";
}
elseif (data[i].flightnum.substring(0, 3) == "PAG")
{
var icon = url+"/lib/images/inair"+data[i].flightnum.substring(0, 3)+"/"+data[i].heading+".png";
}
else
{
var icon = ..... ;
}

/* inair images for different airlines */

Link to comment
Share on other sites

  • 2 months later...

You can simply create the 360 images with an easy php script:

<?php
$count = 0;
while ($count < 360){
$filename = 'orig.png';
$rotang = -$count; // Rotation angle
$source = imagecreatefrompng($filename) or die('Error opening file '.$filename);
imagealphablending($source, false);
imagesavealpha($source, true);
$rotation = imagerotate($source, $rotang, imageColorAllocateAlpha($source, 0, 0, 0, 127));
imagealphablending($rotation, false);
imagesavealpha($rotation, true);
header('Content-type: image/png');
imagepng($rotation, "rotate/{$count}.png");
imagedestroy($source);
imagedestroy($rotation);
$count = $count + 1;

}
?>

Put this php file into a directory and add a folder called rotate and name your original image orig.png and make sure it is oriented this way:

orig.png

(PLEASE! Don't just use our inair icon ;) Be creative and create one of your own. It isn't that hard)

Upload it to the directory you have saved the folder the php file is in and run the script. If everything worked out as it should you will have 360 images in your rotate folder, already named according to the phpvms way ;). You only have to put these into the innair folder.

This is how everything worked out for me. ;)

did all that and i get this Error opening file orig.png

SOLVED!!!!

Link to comment
Share on other sites

  • 3 months later...

I can't even access your website.

But by the way:

There is one thing missing in these instructions. After you have followed the steps I mentioned above you have to use this else command for the one in line 74 of the index.php (phpvms root folder):

else
{
# It's a template sammich!
if (strpos($page_content,'html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }') !== false) {
$BaseTemplate->ShowTemplate('header2.tpl');
echo $page_content;

}
else {
$BaseTemplate->ShowTemplate('header.tpl');
echo $page_content;
$BaseTemplate->ShowTemplate('footer.tpl');

}
}

Then you should get a fullscreen live map.

Happy Christmas!

I'll put it where? in index.php (he's all white) :unsure::wacko:

Link to comment
Share on other sites

  • 1 month later...

Anyone getting this to work with a .php version? No matter what I do with this code I get error 500 page

else

{

# It's a template sammich!

if (strpos($page_content,'html { height: 100% }

body { height: 100%; margin: 0; padding: 0 }') !== false) {

$BaseTemplate->ShowTemplate('header_map.php');

echo $page_content;

}

else {

$BaseTemplate->ShowTemplate('header.php');

echo $page_content;

$BaseTemplate->ShowTemplate('footer.php');

}

}

Link to comment
Share on other sites

  • 5 months later...

Hello,

I try to create images with this script but this error appears

<b>Warning</b>: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Unable to open 'rotate/0.png' for writing: No such file or directory in <b>/home/u195435286/public_html/inair2/execu.php</b> on line <b>15</b><br />

can you help me?

Thanks

Link to comment
Share on other sites

  • 2 months later...

if (data[i].code == "SLN"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair/"+data[i].heading+".png",

flightdetails: data[i],

infowindow_content: detailed_bubble

});

}

else if (data[i].code == "SLK"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair2/"+data[i].heading+".png",

flightdetails: data[i],

infowindow_content: detailed_bubble

});

}

this is for the airline?

where I change to aircraft?

else if (data[i].code == "SLK")

Thanks

Link to comment
Share on other sites

does not work

here is the code

if (data[i].code == "A320"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair/"+data[i].heading+".png",

flightdetails: data[i],

infowindow_content: detailed_bubble

});

}

else if (data[i].code == "A330"){

var pos = new google.maps.LatLng(lat, lng);

flightMarkers[flightMarkers.length] = new google.maps.Marker({

position: pos,

map: map,

icon: url+"/lib/images/inair/a330"+data[i].heading+".png",

flightdetails: data[i],

infowindow_content: detailed_bubble

});

}

thanks

Link to comment
Share on other sites

  • 3 months later...

icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3)+"/"+data[i].heading+".png",

I have a strange question is it possible to force the js to go into another folder I am interested in something like Airline/ used aircraft type / heading image according to the aircraft used on flight?

ok now it works:

icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3)+"/"+data[i].aircraftname+"/"+data[i].heading+".png",

Edited by Txmmy83
Link to comment
Share on other sites

what size would you suggest for

Cessna 150

B1900D

Dash8 Q400

MD80

Embraer 170

Saab 340

Shorts 330

A318-A380

B737- B787

C27J Spartan

as I want them to be not all the same and in way that should reflect the real size of the aircraft any ideas are welcome :)

Edited by Txmmy83
Link to comment
Share on other sites

  • 2 months later...
  • Moderators
On 26/11/2013 at 1:11 PM, skylineVirtual said:

You can simply create the 360 images with an easy php script:

 


<?php
$count = 0;
while ($count < 360){
$filename = 'orig.png';
$rotang = -$count; // Rotation angle
$source = imagecreatefrompng($filename) or die('Error opening file '.$filename);
imagealphablending($source, false);
imagesavealpha($source, true);
$rotation = imagerotate($source, $rotang, imageColorAllocateAlpha($source, 0, 0, 0, 127));
imagealphablending($rotation, false);
imagesavealpha($rotation, true);
header('Content-type: image/png');
imagepng($rotation, "rotate/{$count}.png");
imagedestroy($source);
imagedestroy($rotation);
$count = $count + 1;

}
?>
 

 

Put this php file into a directory and add a folder called rotate and name your original image orig.png and make sure it is oriented this way:

orig.png

(PLEASE! Don't just use our inair icon ;) Be creative and create one of your own. It isn't that hard)

Upload it to the directory you have saved the folder the php file is in and run the script. If everything worked out as it should you will have 360 images in your rotate folder, already named according to the phpvms way ;). You only have to put these into the innair folder.

This is how everything worked out for me. ;)

SOLVED

Edited by joooseb
Link to comment
Share on other sites

  • Moderators

I use the following code into my acarsmap.js but my bigmap now is not display... just show a blankpage :(.

Any help? (I put 5 folders into inair with airline codes for each airline)

if (data[i].flightnum.substring(0,3); == "SKU"){
 var pos = new google.maps.LatLng(lat, lng);
 flightMarkers[flightMarkers.length] = new google.maps.Marker({
  position: pos,
  map: map,
  icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3);+"/"+data[i].heading+".png",
  flightdetails: data[i],
  infowindow_content: detailed_bubble
 });
 }
else if (data[i].flightnum.substring(0,3); == "IBE"){
 var pos = new google.maps.LatLng(lat, lng);
 flightMarkers[flightMarkers.length] = new google.maps.Marker({
  position: pos,
  map: map,
  icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3);+"/"+data[i].heading+".png",
  flightdetails: data[i],
  infowindow_content: detailed_bubble
 });
 }
 else if (data[i].flightnum.substring(0,3); == "IBS"){
 var pos = new google.maps.LatLng(lat, lng);
 flightMarkers[flightMarkers.length] = new google.maps.Marker({
  position: pos,
  map: map,
  icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3);+"/"+data[i].heading+".png",
  flightdetails: data[i],
  infowindow_content: detailed_bubble
 });
 }
 else if (data[i].flightnum.substring(0,3); == "DAL"){
 var pos = new google.maps.LatLng(lat, lng);
 flightMarkers[flightMarkers.length] = new google.maps.Marker({
  position: pos,
  map: map,
  icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3);+"/"+data[i].heading+".png",
  flightdetails: data[i],
  infowindow_content: detailed_bubble
 });
 }
  else if (data[i].flightnum.substring(0,3); == "SKC"){
 var pos = new google.maps.LatLng(lat, lng);
 flightMarkers[flightMarkers.length] = new google.maps.Marker({
  position: pos,
  map: map,
  icon: url+"/lib/images/inair/"+data[i].flightnum.substring(0,3);+"/"+data[i].heading+".png",
  flightdetails: data[i],
  infowindow_content: detailed_bubble
 });
 }

Thanks!

Link to comment
Share on other sites

  • 7 months 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...