openlayers/openlayers — pull request #444 by candeira (2012-04-29 11:31:43+00:00)
Title: fix for trac ticket # 3554 single-arg Map constructor does not work if you pass a DOM element ref

(Sorry, I messed up the original pull request. This is a copy with the amendment suggested by elemoine)

Here is the text of the original ticket at http://trac.osgeo.org/openlayers/ticket/3554

The docs for OpenLayers.Map indicate that you can pass a DOM element into the single-arg constructor. You can verify that it doesn't work with:
```html

```
You can workaround this problem, by replacing the last line above with:

var map = new Map({div: mapContainer});

I have written a test that replicates the bug and applied the patch at:

http://trac.osgeo.org/openlayers/attachment/ticket/3554/openlayers-3554.patch

For any original code that I have added, I am the author/copyright holder of this code and am dedicating it to the public domain under the terms at http://creativecommons.org/publicdomain/zero/1.0/.