Okay, so I should probably get the lat/lng when the user adds the
address to the database and store it with the record.  Question
though, if I call GLatLng with the already defined lat/lng (from the
database) instead of feeding it the address to Geocode, aren't I still
hitting the Google servers?  How do I handle that?  I'll only be
coding up to 10 addresses at one time, regardless of how many match,
using some previous/next buttons.

Function closure...nice.  Thanks!

Cheers
Scott

On Dec 8, 2:18 pm, "[email protected]" <[email protected]>
wrote:
> On Dec 8, 10:51 am, ScottKustes<[email protected]> wrote:
>
> > I have an issue when placing my map markers.  All of the have the same
> > info on the pop-up window, even though the markers are placed
> > correctly.
>
> > URL:http://bodyfitburn.com/fitnessdirectory/directory/
> > Search by: 40217
> > Suspected issue: GLatLng call in setMapMarkers
>
> > I assume the asynchronous nature of GLatLng is causing the issue and
> > the JS loop is getting to the end before the callback function gets
> > invoked the first time.  Do I need to geocode the addresses when they
> > are entered into the database
>
> That is the recommended method.  Calling the geocoder on every address
> each time you load it is wasteful of Google's resources.
>
> > or is there a way to make sure the callback gets the right data?
>
> You could use function closure.
>
>   -- Larry

--

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