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

-- Hopefully now I got it right. This uses Util.isElement() --

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/.