This is for my own interest so no code or website is actually uploaded
but would this code do what is expected. Am I on the right track or
not even close. I have read Google and Mike Williams documentation and
there is no concreate examples using GDirections.


var route = new GDirections(map,
document.getElementById("placeHolder"));
route.load("from: " + address1 + " to: " + address2);
GEvent.addListener(route,"load",createRouteLoaded());


function createRouteLoaded()
{
  //get status code
  var code = route.getStatus();

  //find the result of creating the route
  if(code == G_GEO_SUCCESS)
    alert("route complete. " + route.getSummaryHtml());
  else if(code == G_GEO_UNKNOWN_ADDRESS)
    alert("error creating route. The address chosen does not exist");
  else
    alert("error creating route");
}
--~--~---------~--~----~------------~-------~--~----~
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