MapGuide Fusion Viewer API 如何获取Fusion对象
在使用MapGuide Fusion viewer时,经常会用Fusion API,而Fusion API中最重要的对象就是Fusion对象,Map或者其他Widget都是通过Fusion这个全局对象来获得的。 下面是如何获取Fusion对象的javascript代码,存在这里备用,也供大家参考: var mgApiMapWidgetId = ' Map ' ; var MainFusionWindow = GetFusionWindow(); var OpenLayers = MainFusionWindow.OpenLayers; var Fusion = MainFusionWindow.Fusion; alert(Fusion); /* locate the Fusion window */ function GetFusionWindow() { var curWindow = window; while ( ! curWindow.Fusion) { if (curWindow.parent && curWindow != curWindow.parent) { curWindow = curWindow.parent; } else if (curWindow.opener) { curWindow = curWindow.opener; } else { alert