[GIS] ArcGIS Javascript API: Get Map Object from DIV

arcgis-javascript-apiarcgis-serverjavascript

So I am currently writing an application using the ArcGIS JavaScript API, and I want to access the map object that is held inside of my div from a js module I have. I was thinking it would be a simple JQuery call but it doesn't seem to be the case, as when I try to use map.centerAndZoom(), it states that it is not a member of the object that returned by that call.

Is there anyway to be able to reference the map object that was created in my main index.html elsewhere?

Best Answer

After further research, I don't believe it is possible. Instead, I created a global variable to access the map that way.

map = new Map()

instead of

var map = new Map()