Right I thought I had this cracked but apparently not!I sometimes get one of these two errors or both1. 'esri.bundle.widgets' is null or not an object
2. 'wkid' is null or not an objectBelow is my current implementation of the OverView widget. Anything I'm doing wrong? dojo.connect(this.GISmap, 'onLayerAdd', jQuery.proxy(function() {
this.afterLoad();
}, this));
afterLoad: function() {
var overviewMapDijit = new esri.dijit.OverviewMap({
map: this.GISmap,
baseLayer: layer,
visible: false,
attachTo: "top-right",
expandFactor: 2.5
});
overviewMapDijit.startup();
}
I have tried other approaches including the two below but the above errors keep coming up. Any pointers please?afterLoad: function() {
if (this.GISmap.loaded) {
var overviewMapDijit = new esri.dijit.OverviewMap({
map: this.GISmap,
baseLayer: layer,
visible: false,
attachTo: "top-right",
expandFactor: 2.5
});
overviewMapDijit.startup();
}
else{
//nothing.
}
}
This other approach just gives errors usual errors (but works in a simple map app!!)if (this.GISmap.loaded) {
var createOverviewMap = function() {
overviewMapDijit = new esri.dijit.OverviewMap({
map: this.GISmap,
baseLayer: layer,
visible: false,
attachTo: "top-right",
color: "#D84E13",
width: 300,
height: 250,
expandFactor: 2
});
overviewMapDijit.startup();
dojo.style(dojo.byId("status"), "display", "none");
};
if (layer.loaded) {
createOverviewMap();
}
else {
dojo.connect(layer, "onLoad", createOverviewMap);
}
}
Also Seehttp://forums.arcgis.com/threads/31709-Effectively-adding-baseLayer-to-OverView-Map?highlight=overvi...