Hi
I'm new to this google api, i'm using a script for calculating the
distance between two cities here is following script what is used
var map;
    var directionsPanel;
    var directions;
        var distance;
        var From = "DARWIN,NT,Australia to DARWIN AIRPORT,NT,Australia";
        var myTextField;
    function initialize() {
      map = new GMap2(document.getElementById("map_canvas"));
     // map.setCenter(new GLatLng(42.351505,-71.094455), 15);

      directionsPanel = document.getElementById("route");
      directions = new GDirections(map,directionsPanel);
          directions.load(From);
alert("hi");
                distance = directions.getDistance(From); // ====> for getting
distance
          alert("value :"+distance); // displaying the distance
alert("bye");

    }

    </script>
but here at the alert("value :"+distance); it is displaying "value
[object Object]"
is there anyway to get the distance between two points/location/place

Thanks in advance

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