On Dec 7, 5:39 am, ca8msm <[email protected]> wrote: > Hi Mike, > > Thanks for your response. > > Yes, I saw an example whereby someone had it working fine with a > setTimeout but this will obviously introduce a large (and possibly > unnecessary?) delay
Why do you think the delay would be unneccessary? You are using a shared (and free) resource. You can implement your own geocoder, then you wouldn't have any restrictions. Of course, that might involve paying for the data... -- Larry > if the user enters, say 100 postcodes. I did see > an example that worked by using the geocode function rather than > localsearch, but it proved pretty poor when I tried it with my test > set of postcodes (in that it only found 4 of them). I actually > wouldn't mind if a search was just initiated and the results shown > before moving onto the next record as at least I would be able to show > the progress to the user. Is is possible to do this somehow by > removing the callback? > > Also, unfortunately, I can't geocode the results offline as it will be > a dynamic and I don't know what array of postcodes the user will enter > into the system. > > Thank you for your help, > Mark > > On Dec 7, 11:43 am, Mike Williams <[email protected]> wrote: > > > > > A GlocalSearch() instance can only perform one search at a time, because > > the setSearchCompleteCallback() associates a callback with the whole > > GlocalSearch() object, not the individual request like GClientGeocoder > > does. > > > You could wait for one usePointFromPostcode() to complete before issuing > > the next, but be aware that the Google AJAX Local Search isn't very > > quick, so there might well be a significant delay while your page opens. > > > The easiest solution is to geocode your postcodes offline once and store > > the coordinates instead of GLocalSearch()ing them each time someone > > opens your page. Doing that has the advantages of making the code really > > simple, avoids any problems with asynchronous functions, is much faster, > > and doesn't waste Google server resources. > > > -- > > Mike Williamshttp://econym.org.uk/gmap- Hide quoted text - > > - Show quoted text - -- 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.
