[OpenLayers-Users] OpenLayers.Map + DOM Object - How to get Map Object from DOM Element

Jürgen Dankoweit Juergen.Dankoweit at T-Online.de
Tue Jul 31 06:15:09 PDT 2012


Hello to the list,

the following situation: I have a OpenLayers.Map object which is
"connected" to the DOM element "div" like in the code snippet below:

<div id='worldmap'></div>

map = new OpenLayers.Map(document.getElementById('worldmap'), ... );

An examination with Firebug shows me a lot of OpenLayer objects but no
map object. I think that the object "map" should be a child of the DOM
element "div". But how to find out the map object?

The background is that I don't want to declare the map object as a
global variable - old school :)

Many thanks for the answers.

Best regards

Jürgen

-- 
Meine stets unfertige Homepage: www.dankoweit.de


More information about the Users mailing list