在MapManager.js中214行如下:
_publishMapEvent: function(map) {
//add this property for debug purposewindow._viewerMap = map;
if (this.loading) {
this.loading.destroy();
}
MapUrlParamsHandler.postProcessUrlParams(this.urlParams, map);
console.timeEnd('Load Map');
if (this.map) {
this.map = map;
this.resetInfoWindow(true);
console.log('map changed.');
topic.publish('mapChanged', this.map);
} else {
this.map = map;
this.resetInfoWindow(true);
topic.publish('mapLoaded', this.map);
}
},
在外部页面中使用 this._viewerMap,即可以使用map地图对象了