var menu =[{item:"Direction from Here",from:{},to:{},getDirection:function(){ var directionsDisplay; var directionsService = new google.maps.DirectionsService(); directionsDisplay = new google.maps.DirectionsRenderer(); directionsDisplay.setMap(map); var request = { origin: this.from, destination: this.to, travelMode: google.maps.TravelMode.WALKING }; directionsService.route(request, function(result, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(result); } else { alert("couldn't get directions:" + status); } }); }}];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)