File manager - Edit - /home/jardides/www/Jardi-design/cloud/Fichiers zxistant/new4.php
Back
<!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Directions service</title> <style> html, body, #map-canvas { margin: 0; padding: 0; } #panel { margin-left: 0px; background-color: #fff; padding: 5px; border: 1px solid #999; } /* Provide the following styles for both ID and class, where ID represents an actual existing "panel" with JS bound to its name, and the class is just non-map content that may already have a different ID with JS bound to its name. */ #panel, .panel { font-family: 'Roboto','sans-serif'; line-height: 20px; padding-left: 10px; } #panel select, #panel input, .panel select, .panel input { font-size: 15px; } #panel select, .panel select { width: 100%; } #panel i, .panel i { font-size: 12px; } </style> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script> <script> var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var chicago = new google.maps.LatLng(48.7941611,2.4878384); var mapOptions = { zoom:15, center: chicago }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); } function calcRoute() { var start = document.getElementById('start').value; var end = document.getElementById('end').value; var request = { origin:start, destination:end, travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } directionsDisplay.directions.routes[0].legs[0].distance.text google.maps.event.addDomListener(window, 'load', initialize); </script> </head> <body onLoad=calcRoute()> <div id="panel"> <b><label for="Depart">Départ:</label></b> <input name="Depart" type="text" id="start" value="<?php echo $_GET['start'] ?>" onchange=calcRoute()> <b><label for="Arrive">arrivé:</label></b> <input name="Arrive" type="text" id="end" value="<?php echo $_GET['end'] ?>" onchange=calcRoute()> </div> <div id="map-canvas"></div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings