From f9e936a9dec8c954fceb75cae8e5c56af5e8772c Mon Sep 17 00:00:00 2001 From: anchit Date: Fri, 15 Dec 2017 12:05:25 +0530 Subject: [PATCH] minor fixes --- .../flightTracking/flightTracking.controller.js | 25 +++++++++--- app/partials/flightTracking/flightTracking.html | 46 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/app/partials/flightTracking/flightTracking.controller.js b/app/partials/flightTracking/flightTracking.controller.js index d719213..f55d1d1 100644 --- a/app/partials/flightTracking/flightTracking.controller.js +++ b/app/partials/flightTracking/flightTracking.controller.js @@ -3,7 +3,7 @@ angular.module('acufuel') .controller('flightTrackingController', ['$scope','$compile', 'uiCalendarConfig', 'flightTrackingService', function($scope, $compile, uiCalendarConfig, flightTrackingService) { - + $scope.flightInfo = {}; var map; var icon = "https://en.spitogatos.gr/visualCaptcha/images/airplane.png"; var json = "http://34.214.139.94:8080/ws/liveTracking"; @@ -54,20 +54,35 @@ angular.module('acufuel') details : details }); - bindInfoWindow(marker, map, infowindow, details); + bindInfoWindow(marker, map, infowindow, details, data); } }); }); },5000); } - function bindInfoWindow(marker, map, infowindow, strDescription) { + function bindInfoWindow(marker, map, infowindow, strDescription, data) { google.maps.event.addListener(marker, 'click', function() { - infowindow.setContent(strDescription); - infowindow.open(map, marker); + $scope.flightInfo = data; + //infowindow.setContent(strDescription); + //infowindow.open(map, marker); + $scope.flightInfo = data; + $('#flightid').html($scope.flightInfo.id); + $('#depid').html($scope.flightInfo.departurePoint); + $('#arrid').html($scope.flightInfo.arrivalPoint); + $('#altid').html($scope.flightInfo.altitude); + $('#speedid').html($scope.flightInfo.speed); + $('#deptimeid').html($scope.flightInfo.departureActualTime); + $('#arrtimeid').html($scope.flightInfo.arrivalEstimatedTime); + + $('.left-panel').animate({width: '300px', padding: '10px'}); }); } + $('.close-left-panel').click(function(){ + $('.left-panel').animate({width: '0', padding: '0'}); + }) + google.maps.event.addDomListener(document.getElementById("map"), 'load', $scope.initialise()); diff --git a/app/partials/flightTracking/flightTracking.html b/app/partials/flightTracking/flightTracking.html index 7b14a28..0f6852d 100644 --- a/app/partials/flightTracking/flightTracking.html +++ b/app/partials/flightTracking/flightTracking.html @@ -75,6 +75,22 @@ .button1.turquoise { background: #449d44; } + + /** style for popup sidebar **/ +.left-panel{ + width: 0; + height: 100%; + position: absolute; + top: 1; + background-color: White; + overflow-x: hidden; + left: 2px; + padding: 0; + border-radius: 4px 0 0 4px; +} +.left-panel table th, td{ + padding: 10px 0; +} @@ -87,6 +103,36 @@
+
+ +



+

Aircraft

+

+ + + + + + + + + + + + + + + + + + + + + + + +
Path:      
Altitude:    ft
Speed:   Knots
Departure Time : (Actual)
Arrival Time : (Estimated)
+
-- 2.0.0