> Can you give me some suggestions?

Yes, don't geocode your store addresses every time the page is
viewed.  It is slow, and if the geocoder makes a mistake (it's not
perfect) you cannot fix the error. I'm sure the stores don't move
around much.

Gecoding is asynchronous ; your 1000mS delay is a kludge and is not
the correct way to use asynchronous services.   There are request rate
and volume limits set for geocoding, you may run into those.

You have a database of locations ; use it to store locations i.e.
store lat/longs as well.  That data is under your control, you can fix
any anomalies.

Determining straight line distances then becomes trivial, even if you
must do it in javascript, but you can just as easily SELECT the right
data in SQL in the first place and so avoid sending the whole dataset
to the client for processing.

Have a look at
http://code.google.com/apis/maps/articles/geocodestrat.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to