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.


Reply via email to