And what if I want to go from A to B to C, and the distance from A to B is less than 3 miles: Do I have to walk from A to B and from B to C I'm allowed to drive? But where is my car then?
And what if I want to go from A to B to C to D, and the distance from B to C is less than 3 miles. May I drive to B, where I have to park the car and walk to C and afterwards use a taxi to D? Since the routes of driving and walking may be very different I can see no other way than calling GDirections queries separately for each mode. On Dec 29, 12:42 am, iSac <[email protected]> wrote: > I'm using the GDirections, and start off with the default Driving Mode > directions, but for points that are close together (less than 3 miles, > or something), I give an option to toggle between walking and driving > directions. As of now, I toggle between the travel modes by calling > loadFromWayPoints again: > > doDirections: function(type) { > if(type != G_TRAVEL_MODE_WALKING) { > type = G_TRAVEL_MODE_DRIVING; > } > this.directionsInstance.loadFromWaypoints([ > fromLatLng, toLatLng > ],{'travelMode': type}); > } > > Since I don't want to hit Google more than necessary, I'm wondering if > there is any way to cache the results of the directions query so that > a second toggle-to-walking or toggle-to-driving won't result in a > second call to the Google servers. > > It wouldn't surprise me if this is already taken care of in the > GDirections class, and if that's the case, super. -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en.
