¡@

Home 

2014/10/16 ¤W¤È 12:02:18

jquery Programming Glossary: calculateroute

clean example of directions with google maps in jquery mobile?

http://stackoverflow.com/questions/13345479/clean-example-of-directions-with-google-maps-in-jquery-mobile

document .on pageinit #map_page function initialize document .on 'click' '#submit' function e e.preventDefault calculateRoute var directionDisplay directionsService new google.maps.DirectionsService map function initialize directionsDisplay.. myOptions directionsDisplay.setMap map directionsDisplay.setPanel document.getElementById directions function calculateRoute var selectedMode #mode .val start #from .val end #to .val if start '' end '' cannot calculate route #results .hide.. 18.0736160278 function locSuccess position initialize position.coords.latitude position.coords.longitude function calculateRoute var targetDestination #target dest .val if currentPosition currentPosition '' targetDestination targetDestination '' ..