Mam taki formularz w Google Maps:
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> </head> <body style="font-family: Arial; font-size: 12px;"> <div style="width: 600px;"> </div> <script type="text/javascript"> var directionsService = new google.maps.DirectionsService(); var directionsDisplay = new google.maps.DirectionsRenderer(); var map = new google.maps.Map(document.getElementById('map'), { zoom:7, mapTypeId: google.maps.MapTypeId.ROADMAP }); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('panel')); var request = { origin: 'Chicago', destination: 'New York', travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); </script> </body> </html>
Chciałbym umieścić ten formularz na swojej stronie internetowej, ale żeby punktem startowym była moja aktualna lokalizacja.
Chciałbym żeby np. tablety/smartfony automatycznie prowadziły do celu po uruchomieniu tej mapki
Wie ktoś może jak to zrobić?