I want to geocode corrdinates to CountryNameCode.
I made it with jQuery. That's the code:
$('#sprawdz_1').click(function(){
for (i = 0; i < kraje.length ; i++) {
geo.getLocations(kraje[i],function(odpowiedz){
if(odpowiedz && odpowiedz.Status.code == 200){
adres = odpowiedz.Placemark
[0].AddressDetails.Country.CountryNameCode;
kraje_n.push(adres);
}
});
}
alert(kraje_n);
});
On first click i get empty alert. On the second click i get my array:/
What have I messed up that it doesn't work as I want?
array kraje is passed by:
$('#sprawdz').click(function(){
ile = moja.getVertexCount();
for (i = 0; i < ile ; i++) {
kraje.push(moja.getVertex(i));
}
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---