php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /var/www/html/fl/ |
files >> //var/www/html/fl/direction.php |
<?php include('konfig/koneksi.php'); ?> <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Waypoints in directions</title> <style> #right-panel { font-family: 'Roboto','sans-serif'; line-height: 30px; padding-left: 10px; } #right-panel select, #right-panel input { font-size: 15px; } #right-panel select { width: 100%; } #right-panel i { font-size: 12px; } html, body { height: 100%; margin: 0; padding: 0; } #map { height: 100%; float: left; width: 70%; height: 100%; } #right-panel { margin: 0px 20px; border-width: 2px; width: 20%; height: 400px; float: left; text-align: left; padding-top: 0; } #directions-panel { margin-top: 10px; background-color: #fff; height: } </style> </head> <body> <div id="map"></div> <div id="right-panel"> <div> <b>Start:</b> <select id="start"> <option value="3.584153,98.685215">Kantor</option> <option value="3.610456, 98.494823">Binjai</option> <option value="3.563716, 98.878526">Lubuk Pakam</option> </select> <br> <b>Waypoints:</b> <br> <i>(Ctrl+Click or Cmd+Click for multiple selection)</i> <br> <select multiple id="waypoints"> <?php $sl = "SELECT * FROM kunjungan WHERE username='safrizal' AND tanggal BETWEEN '2017-9-26' and '2017-9-29'"; $ql = mysql_query($sl); while($rl = mysql_fetch_array($ql)){ ?> <option value="<?php echo $rl['titik_lokasi_awal']; ?>"><?php echo $rl['lokasi']; ?></option> <?php } ?> </select> <br> <b>End:</b> <select id="end"> <option value="3.610456, 98.494823">Binjai</option> <option value="3.563716, 98.878526">Lubuk Pakam</option> <option value="3.584153,98.685215">Kantor</option> </select> <br> <input type="submit" id="submit"> </div> <div id="directions-panel"></div> </div> <script> function initMap() { var directionsService = new google.maps.DirectionsService; var directionsDisplay = new google.maps.DirectionsRenderer; var map = new google.maps.Map(document.getElementById('map'), { zoom: 11, center: {lat: 3.5951956, lng: 98.67222270000002} }); directionsDisplay.setMap(map); document.getElementById('submit').addEventListener('click', function() { calculateAndDisplayRoute(directionsService, directionsDisplay); }); } function calculateAndDisplayRoute(directionsService, directionsDisplay) { var waypts = []; var checkboxArray = document.getElementById('waypoints'); for (var i = 0; i < checkboxArray.length; i++) { if (checkboxArray.options[i].selected) { waypts.push({ location: checkboxArray[i].value, stopover: true }); } } directionsService.route({ origin: document.getElementById('start').value, destination: document.getElementById('end').value, waypoints: waypts, optimizeWaypoints: true, travelMode: 'DRIVING' }, function(response, status) { if (status === 'OK') { directionsDisplay.setDirections(response); var route = response.routes[0]; var summaryPanel = document.getElementById('directions-panel'); summaryPanel.innerHTML = ''; // For each route, display summary information. for (var i = 0; i < route.legs.length; i++) { var routeSegment = i + 1; summaryPanel.innerHTML += '<b>Route Segment: ' + routeSegment + '</b><br>'; summaryPanel.innerHTML += route.legs[i].start_address + '<br>TO<br>'; summaryPanel.innerHTML += route.legs[i].end_address + '<br>'; summaryPanel.innerHTML += route.legs[i].distance.text + '<br><br>'; } } else { window.alert('Directions request failed due to ' + status); } }); } </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAooxL4-WIAUsN8YSKQkec_8UXgguqOsHI&callback=initMap"> </script> </body> </html>y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`