I just wanted to let you know that it did not work as documented and that it 
should either be fixed or the documentation changed.
Since you have to know the ID to use getElementById its always possible to just 
use the ID.This however precludes getting an element reference by ID once and 
then reusing for multiple calls.

On 01 Jun 2011, at 18:33 , Nathan Gerber wrote:

> Looking over the documentation it seems that he would be correct in assuming 
> that the results of getElementById should work for the constructor. I've 
> never personally used this method for OpenLayers and the work around seems 
> easy enough in that you can simply pass the id of the element in question.
> 
> http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.OpenLayers.Map
> --
> Nathan Gerber
> 
> 
> On Wed, Jun 1, 2011 at 6:04 PM, Ricardo Bayley <[email protected]> 
> wrote:
> Hi
> 
> My understanding is that the getElementById returns the actual Element, not 
> its ID.
> 
> 
> 
> 2011/6/1 Samuel M. Smith <[email protected]>
> document.getElementById("map")
> 
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> 
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

**********************************************************************
Samuel M. Smith Ph.D.
242 East 600 North, Lindon Utah 84042-1662 USA
801-768-2768 voice
801-768-2769 fax

**********************************************************************
"The greatest source of failure and unhappiness in the world is 
giving up what we want most for what we want at the moment"
**********************************************************************






_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to