Android Question Calling geocoder within For loop.

sconlon

Active Member
Licensed User
Longtime User
I haven't coded in a few years and am now doing a project where I need to get the postal addresses that correspond to a list of lat/long coordinates. So, I will be reading the coords from a database and then using the geocoder GetFromLocation sub to get the best matching address. So essentially I will be calling geocoder within a For loop and I can't see how to resume inside the loop when finished processing the geocodedone event. I'm sure I have done this before but can't recall the best approach. Any suggestions would be appreciated.
 

DonManfred

Expert
Licensed User
Longtime User
create a global list of coords to check
get the 1st item from the list
check the result...
In geocodedone event you remove the 1st item from the list

get the 1st item from the list
check the result...
In geocodedone event you remove the 1st item from the list

get the 1st item from the list
check the result...
In geocodedone event you remove the 1st item from the list

and so on
 
Upvote 0
Top