Geocode sync with GoogleMaps [duplicate]
I need to put Info Window
on markers in a Google Map. I make an Ajax query to get a list of markers to draw in my map and I have a sync problem because the:
geocoder.geocode( { 'address': citta}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {}
Is asynchronous so if I call it inside a loop I get the wrong results. Can anyone tell me if there is a way to do a synchronous call?
See the following answer Google Maps API Geocode Synchronously. The answer is no.
精彩评论