开发者

Geocode sync with GoogleMaps [duplicate]

This question already has answers here: Google Maps API Geocode Synchronously (3 answers) 开发者_C百科 Closed 1 year ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜