Thanks for helping out, so I followed your suggestion of doing a
reverse geocode when dropping the marker, such as:

                        markerLocation = reverseGeocode(marker.getPosition());
                        alert(markerLocation.city);

However, markerLocation is always null, even though within the
reverseGeocode function, the city is being populated properly.  I am
assuming this is because JS doesn't wait for the AJAX request to be
completed, and just continues executing the rest of the code.  Any
idea on how to solve this?



On Nov 4, 6:46 pm, Rossko <ros...@culzean.clara.co.uk> wrote:
> > I have a map where I drop a number of markers.
>
> That would be the time to do reverse gecoding?
>
> >  I need to save the
> > location of the markers to a database, along with the city and country
> > that the marker was placed in.
>
> Beware the terms of use for storing Google's data
>
> > Any way I can do this synchronously?
>
> No, but you can write code that simulates it e.g. execute one request,
> when response comes execute the next, when all complete do whatever
> else.  The next pitfall will be the limited rate of request allowed,
> to prevent abuse.

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to