Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function calculateAndDisplayRoute(directionsService, directionsDisplay) {
- directionsService.route({
- origin: {lat: 37.77, lng: -122.447},
- destination: {lat: 37.768, lng: -122.511},
- travelMode: google.maps.TravelMode.WALKING
- }, function(response, status) {
- if (status == google.maps.DirectionsStatus.OK) {
- directionsDisplay.setDirections(response);
- console.log(response);
- } else {
- window.alert('Directions request failed due to ' + status);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement