[OpenLayers-Dev] Map id

Christopher Schmidt crschmidt at metacarta.com
Tue Feb 26 05:58:57 EST 2008

On Tue, Feb 26, 2008 at 09:02:50AM +0100, Frédéric Junod wrote:
> Hello,
> This is not not a good idea to control the CSS by using the id of the html
> elements: they are generated by a "random" algorithm and can change. You have
> guarantees that the id will always be "OpenLayers.Map_2.
> Your graphics designer should use the CSS class instead.

And if (as is likely the case) the CSS class isn't set on the element in
question, one should be set.

Christopher Schmidt

More information about the Dev mailing list