function setDirections(fromAddress, toAddress, locale) {
var modeArray = [];
if(document.getElementById("mode").selectedIndex==0){
modeArray[0] = G_TRAVEL_MODE_WALKING;
}else if(document.getElementById("mode").selectedIndex==1){
modeArray[0] = G_TRAVEL_MODE_DRIVING;
}else{
modeArray[0] = G_TRAVEL_MODE_DRIVING;
}

gdir.load("from: " + fromAddress + " to: " + toAddress,
{"locale" : locale, travelMode:modeArray[0]});
}


Finally I get it work by having the code above. Million thanks to Jeff
and Esa! Once again, thank you for guide me this newbie.

-- 
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.

Reply via email to