Hi, I'm trying to pass the geocoding getLocations() callback function
an additional parameter, however I don't seem to have success. Maybe
I'm missing out something really obvious or basic, but I can't figure
it out on my own so that's why I'm asking for help.

This is my code:

for(var i=0; i<noortekad.length; i++) {

                var noortekas = noortekad[i];

                // Create new geocoding object
                geocoder = new GClientGeocoder();

                // Retrieve location information, pass it to addToMap()
                geocoder.getLocations(noortekas.address, addToMap(noortekas));
        }

                // This function adds the point to the map

                   function addToMap(response, noortekas)
                   {
                      alert(noortekas.nimi);
                      // Retrieve the object
                      place = response.Placemark[0];
                      // etc...
                    }

What happens is that the script correctly alerts the noortekas.nimi,
but then I get a Javascript error saying that response is not defined.

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