I'm trying to get Turn by Turn Directions in my Project.. I have the from and to values retrieved from the database and stored as a Hidden Form Field in HTML output.. I want these values to be used and the Map to be generated..
I'm using a jQuery Plugin which does this but I haven't been able to get it up and running.. Here's the demo of the plugin : http://mobspot.in/gpsdemo.html Here's my Implementation : http://mobspot.in/turnbyturn.html On Jun 6, 4:29 am, Chad Killingsworth <[email protected]> wrote: > I'd love to help - but I need an actual link to your page. > > Chad Killingsworth > > On Jun 4, 11:48 am, Karthik Kastury <[email protected]> wrote: > > > > > Hi, > > > I'm trying to get Google Maps Directions API working with jQuery, and > > I have the following code.. > > > <script type="text/javascript"> > > var directionDisplay; > > var directionsService = new google.maps.DirectionsService(); > > var map; > > > function initialize() { > > directionsDisplay = new google.maps.DirectionsRenderer(); > > var chicago = new google.maps.LatLng(13.3358866, 74.7711944); > > var myOptions = { > > zoom:15, > > mapTypeId: google.maps.MapTypeId.ROADMAP, > > center: chicago > > } > > map = new google.maps.Map(document.getElementById("map_canvas"), > > myOptions); > > directionsDisplay.setMap(map); > > > directionsDisplay.setPanel(document.getElementById("directionsPanel")); > > > } > > > function calcRoute() { > > var start = "Udupi Railway Station, Udupi, Karnataka, India"; > > var end = $("#end option:selected"); > > var request = { > > origin:start, > > destination:end, > > travelMode: google.maps.DirectionsTravelMode.DRIVING > > }; > > directionsService.route(request, function(response, status) { > > if (status == google.maps.DirectionsStatus.OK) { > > directionsDisplay.setDirections(response); > > } > > });} > > > $(document).ready(function(){ initialize(); $ > > ("#end").change(calcRoute);}); > > </script> > > > Where #end is a select list in the HTML.. I'm Using jQuery 1.4.. I'm > > not sure as to what is going wrong.. Can you please help me with > > this... > > > Regards > > Karthik Kasturyhttp://twitter.com/coolkarthik88 -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
