Commit f9e936a9dec8c954fceb75cae8e5c56af5e8772c
1 parent
19eace1cf6
Exists in
master
minor fixes
Showing
2 changed files
with
66 additions
and
5 deletions
Show diff stats
app/partials/flightTracking/flightTracking.controller.js
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | angular.module('acufuel') |
4 | 4 | |
5 | 5 | .controller('flightTrackingController', ['$scope','$compile', 'uiCalendarConfig', 'flightTrackingService', function($scope, $compile, uiCalendarConfig, flightTrackingService) { |
6 | - | |
6 | + $scope.flightInfo = {}; | |
7 | 7 | var map; |
8 | 8 | var icon = "https://en.spitogatos.gr/visualCaptcha/images/airplane.png"; |
9 | 9 | var json = "http://34.214.139.94:8080/ws/liveTracking"; |
... | ... | @@ -54,20 +54,35 @@ angular.module('acufuel') |
54 | 54 | details : details |
55 | 55 | }); |
56 | 56 | |
57 | - bindInfoWindow(marker, map, infowindow, details); | |
57 | + bindInfoWindow(marker, map, infowindow, details, data); | |
58 | 58 | } |
59 | 59 | }); |
60 | 60 | }); |
61 | 61 | },5000); |
62 | 62 | } |
63 | 63 | |
64 | - function bindInfoWindow(marker, map, infowindow, strDescription) { | |
64 | + function bindInfoWindow(marker, map, infowindow, strDescription, data) { | |
65 | 65 | google.maps.event.addListener(marker, 'click', function() { |
66 | - infowindow.setContent(strDescription); | |
67 | - infowindow.open(map, marker); | |
66 | + $scope.flightInfo = data; | |
67 | + //infowindow.setContent(strDescription); | |
68 | + //infowindow.open(map, marker); | |
69 | + $scope.flightInfo = data; | |
70 | + $('#flightid').html($scope.flightInfo.id); | |
71 | + $('#depid').html($scope.flightInfo.departurePoint); | |
72 | + $('#arrid').html($scope.flightInfo.arrivalPoint); | |
73 | + $('#altid').html($scope.flightInfo.altitude); | |
74 | + $('#speedid').html($scope.flightInfo.speed); | |
75 | + $('#deptimeid').html($scope.flightInfo.departureActualTime); | |
76 | + $('#arrtimeid').html($scope.flightInfo.arrivalEstimatedTime); | |
77 | + | |
78 | + $('.left-panel').animate({width: '300px', padding: '10px'}); | |
68 | 79 | }); |
69 | 80 | } |
70 | 81 | |
82 | + $('.close-left-panel').click(function(){ | |
83 | + $('.left-panel').animate({width: '0', padding: '0'}); | |
84 | + }) | |
85 | + | |
71 | 86 | google.maps.event.addDomListener(document.getElementById("map"), 'load', $scope.initialise()); |
72 | 87 | |
73 | 88 | ... | ... |
app/partials/flightTracking/flightTracking.html
... | ... | @@ -75,6 +75,22 @@ |
75 | 75 | .button1.turquoise { |
76 | 76 | background: #449d44; |
77 | 77 | } |
78 | + | |
79 | + /** style for popup sidebar **/ | |
80 | +.left-panel{ | |
81 | + width: 0; | |
82 | + height: 100%; | |
83 | + position: absolute; | |
84 | + top: 1; | |
85 | + background-color: White; | |
86 | + overflow-x: hidden; | |
87 | + left: 2px; | |
88 | + padding: 0; | |
89 | + border-radius: 4px 0 0 4px; | |
90 | +} | |
91 | +.left-panel table th, td{ | |
92 | + padding: 10px 0; | |
93 | +} | |
78 | 94 | </style> |
79 | 95 | |
80 | 96 | |
... | ... | @@ -87,6 +103,36 @@ |
87 | 103 | <div class="widget stacked "> |
88 | 104 | <div class="widget-content" style="min-height: 500px"> |
89 | 105 | <div id="map" style="border: 2px solid #3872ac;"></div> |
106 | + <div class="left-panel"> | |
107 | + <span class="close-left-panel" style="float:right;"><img src="img/back.png"/></span> | |
108 | + <br><br><br><br> | |
109 | + <h1>Aircraft </h1> | |
110 | + <h2><p id="flightid"></p></h2> | |
111 | + <table class="table-responsive table-striped" style="border-collapse: separate;border-spacing: 2px 2px;"> | |
112 | + <tbody> | |
113 | + <tr> | |
114 | + <td>Path: </td> | |
115 | + <td class="text-nowrap"><strong><span id="depid"/> <span class="glyphicon glyphicon-arrow-right"></span> <span id="arrid"/></strong></td> | |
116 | + </tr> | |
117 | + <tr> | |
118 | + <td>Altitude: </td> | |
119 | + <td class="text-nowrap"><strong><span id="altid"/> ft </strong></td> | |
120 | + </tr> | |
121 | + <tr> | |
122 | + <td>Speed: </td> | |
123 | + <td class="text-nowrap"><strong><span id="speedid"/> Knots</strong></td> | |
124 | + </tr> | |
125 | + <tr> | |
126 | + <td>Departure Time : </td> | |
127 | + <td><strong><span id="deptimeid"/><span class="text-muted">(Actual)</span></strong></td> | |
128 | + </tr> | |
129 | + <tr> | |
130 | + <td>Arrival Time : </td> | |
131 | + <td><strong><span id="arrtimeid"/><span class="text-muted">(Estimated)</span></strong></td> | |
132 | + </tr> | |
133 | + </tbody> | |
134 | + </table> | |
135 | + </div> | |
90 | 136 | |
91 | 137 | <!-- /widget-content --> |
92 | 138 | </div> | ... | ... |