Hi Friends,
I have a one doubt.can we calculate the road distance
between two addresses with out loading map.actually iam calculating
like this.is there any way to get Road distance without loading map
var Dist = "";
if (GBrowserIsCompatible())
{
var dirn = new GDirections();
GEvent.addListener(dirn, "error", function()
{alert("DirectionsFailed: " + dirn.getStatus().code);} );
dirn.load("from: " + address1 + " to: " + address2,
{getSteps:false} );
}
GEvent.addListener(dirn,"load", function()
{
Dist = dirn.getDistance().html;
Dist = Dist.replace(" mi"," ")
alert(Dist ) ->Distance
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---