Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.3 - Added Global Aircraft Location Map
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<div class="mapcenter" align="center"> | ||
<div id="routemap" style="width: 960px; height: 520px;"></div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
var options = { | ||
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.ROADMAP, | ||
} | ||
var map = new google.maps.Map(document.getElementById("routemap"), options); | ||
</script> | ||
|
||
<?php | ||
$count = 0; | ||
foreach($data as $l) | ||
{ | ||
?> | ||
<script type="text/javascript"> | ||
var pointer_<?php echo $count;?> = new google.maps.LatLng(<?php echo $l->arrlat?>, <?php echo $l->arrlng?>); | ||
var point_<?php echo $count;?> = new google.maps.Marker({ | ||
position: pointer_<?php echo $count;?>, | ||
map: map, | ||
title: "<?php echo "$l->acregistration is at $l->arrname ($l->arricao)";?>", | ||
}); | ||
var contentString = '<?php echo $l->acname;?> (<?php echo $l->acregistration;?>) is at <?php echo $l->arrname.'('.$l->arricao.')';?>'; | ||
var infowindow_<?php echo $count;?> = new google.maps.InfoWindow({ | ||
content: contentString | ||
}); | ||
google.maps.event.addListener(point_<?php echo $count;?>, 'click', function() { | ||
infowindow_<?php echo $count;?>.open(map,point_<?php echo $count;?>); | ||
}); | ||
</script> | ||
<?php | ||
$count = 1 + $count; | ||
} | ||
?> |