1
我試圖在點擊鏈接時關閉POI的InfoWindow
。如何關閉POI的InfoWindow?
我overrided信息窗口的這樣的setContent:
//override the built-in setContent-method
google.maps.InfoWindow.prototype.setContent = function (content) {
content = content.innerHTML + '<br/> <a href="#" onclick="onSavePlace();">Save place</a>';
//run the original setContent-method
fx.apply(this, arguments);
};
注:我沒有創建任何InfoWindow
對象參考使用close()
方法。
'未捕獲的ReferenceError:FX不defined' – geocodezip
VAR FX =谷歌.maps.InfoWindow.prototype.setContent; –