I am using reverse geocoding technique of google maps to get address
from latitude and longitude. But reverse geocoding callback function
(named 'saddr') from following code does not executes.

Testgeocoder.getLocations(latlng, saddr);

I have multiple latitude and longitude points. I execute this in loop
and save in one array.
Here is my total code to get addresses:

function getAddress()
{
        var str = "";
        var place = "";
        var Testgeocoder;

        str = document.activeElement.id.split("_");
        Testgeocoder = new GClientGeocoder();

        for (var i = 0; i < LatitudeclientSave.length; i++)
        {
                latlng = new GLatLng(parseFloat(LatitudeclientSave
[i]), parseFloat(LongitudeclientSave[i]));
                Testgeocoder.getLocations(latlng, saddr);
        }
}

function saddr(addr, AddressclientSavetest)
 {
    if (addr.Status.code == 200) {

        place = addr.Placemark[0];
        str = place.address.split(",");

        document.getElementById
("ctl00_ContentPlaceHolder1_hdnaddress").value =
document.getElementById("ctl00_ContentPlaceHolder1_hdnaddress").value
+ str[0] + " " + str[1] + "|";
    }
}

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