Thank you the replay. core_library/_widget is superclass from which following class is derived. it has some additional functions which i am using it for some other purpose.I am still not clear on why it is not possible to use local variable to instantiate map. Let me rephrase my questions again, define(["dojo/_base/declare", "core_library/_Widget", "esri/map","dijit/form/Button"],
function (declare, WidgetBase, myMap,Button) {
return declare([WidgetBase], {
_map: null,
postCreate: function () {
/*
where Button is a local varibale.Now we can use new Button() to instantiate button
instead of new dijit.form.Button()
*/
var myButton = new Button({
label: "Click me!",
onClick: function(){}
}, "someNode");
/*
but for map although we have local variable named myMap,following does not work
*/
this._map = new myMap(this.domNode, { extent:initExtent,slider: true });
//following works
this._map=new esri.Map(this.domNode, { extent: initExtent, slider: true });
}
});
});