Here is the full js file:
http://www.terebess.com/shop/_palii/google.js

But, the important part is this:
function GoogleDistance () {
        var GDir = new GDirections();
        GEvent.addListener( GDir, "load",
                function () {
                        alert(Math.round(GDir.getDistance().meters/1000)+" km");
                }
        );
        GEvent.addListener( GDir, "error", function() { alert("Failed:
"+GDir.getStatus().code); } );
        GDir.load("from: "+GaddressFROM+" to: "+GaddressTO);
}

An example string that it returns 602 for:
"from: 2143 Kistarcsa Szabadság útja 56. Magyarország to: 6000
Kecskemét Hunyadi János u. 2. Magyarország"

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