Hi there,

i tried to get the Coordinates using the getLocations method.
Works fine, but i can't get the coordinates back.
Even saving in a global variable doesn't work, after the getLocations
method
the global variable is empty like before.

Here's my Code:


---------------------------------
    var returnval;

    function point(lat,lng) {
      var point = new GLatLng(lat,lng);
      return(point);
    }

    function callback_getlocation(result) {
      var p = result.Placemark[0].Point.coordinates;
      var latlang = point(p[1],p[0]);
      returnval = latlang.toUrlValue(5);
    }


    function getGeoFromAdress(adress){
      geo = new GClientGeocoder();
      returnval = null;
      geo.getLocations(adress,callback_getlocation);
      return(returnval);
    }


     var fromtxt = document.routeform.from.value;
     var totxt   = document.routeform.to.value;

      from = getGeoFromAdress(fromtxt);
      to = getGeoFromAdress(totxt);

      setDirections(from, to, "de");
---------------------------------
--~--~---------~--~----~------------~-------~--~----~
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