[google maps API] 關閉所有開啟的 infowindow 紅色死神 發表於 2015年1月13日 星期二 1月 13, 2015 / 沒有留言 標籤 Google Map API, googlemaps view plaincopy to clipboardprintvar infoWindows = []; view plaincopy to clipboardprint//add infowindow to array infoWindows.push(infowindow); 再加這個就可以了。 view plaincopy to clipboardprintfunction closeAllInfoWindows() { for (var i=0;i<infoWindows.length;i++) { infoWindows[i].close(); } } 出處: Close all info windows google maps API V3? 以電子郵件傳送這篇文章BlogThis!分享至 Twitter分享至 Facebook 反應:
0 意見:
張貼留言