Hi,

my first impression about your code is that you are executing a batch
search without any time interval between searches.
Then there is this line:
localSearch = new GlocalSearch(); ");
This line should be placed before the loop and I don't know what is
the ");  at the end of the line. That should throw an error.

Regards

On Mar 31, 3:40 am, edenhawk <[email protected]> wrote:
> I have 50 addresses in a database that need the geocodes long/lat
> adding to new coloums on them and i am having trouble as the
> "setSearchCompleteCallback" is not looping more than once.
> I have triple checked my code and it will return the first geocoded
> variable but on the second loop certain var fail as they say they are
> undefined:
>
> for (i in aAddresses){
> var fullAddress = aAddresses[i][0]+ ", " +aAddresses[i][1]+ ", "
> +aAddresses[i][2]+ ", " +aAddresses[i][3]+ ", " +aAddresses[i][4];
>
>      localSearch = new GlocalSearch(); ");
>      localSearch.execute(jQuery.trim(fullAddress) + ", UK");
>
>      localSearch.setSearchCompleteCallback(null, function(){
>                 iLat = localSearch.results[0].lat;
>                 iLong = localSearch.results[0].lng;
>                 console.log(iLat);
>         });
>
> }
>
> Can anyone offer me a solution that makes the finding of geocodes
> loopable?

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