Google Maps V3: Loading infowindow content via AJAX

前端 未结 4 1626
轮回少年
轮回少年 2020-12-24 06:47

What is the best way to load content into my infowindow using ajax? Right now I am getting a similar effect using iframes but I am not that that happy with it. I thought thi

4条回答
  •  借酒劲吻你
    2020-12-24 07:05

    You can call infowindow.setContent at any point after the info window has been shown. So you could initially set your info window content with a spinner, make the AJAX call (from the event handler) and then call infowindow.setContent again from the AJAX response with the appropriate data.

提交回复
热议问题