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.

Regards,

fredj


Le Tue, 26 Feb 2008 08:30:23 +0100,
Nils Weinander <[EMAIL PROTECTED]> a écrit :

> Hello developers
> 
> In OpenLayers 2.5, Map.js line 272 an OpenLayers.Map object
> gets its id by
> 
> this.id = OpenLayers.Util.createUniqueID("OpenLayers.Map_");
> 
> which looks like an excellent scheme for identification.
> However, our graphics designer has encountered a problem
> due to the ".". The Map id is used in the ids of some child
> elements as well, the PanZoom zoombar <div> for example,
> which gets an id like
> 
> OpenLayers_Control_PanZoomBar_ZoombarOpenLayers.Map_2
> 
> This element cannot be addressed in CSS. Probably the CSS
> processing interprets "." as the start of a new class name.
> 
> We have locally changed the Map id to
> 
> this.id = OpenLayers.Util.createUniqueID("OpenLayers_Map_");
> 
> My questions are:
> 
> * Is this likely to cause other problems?
> * Is the original id scheme to be considered a bug? If so,
>    how do I best report it formally?
> 


-- 
Frédéric Junod
Camptocamp SA
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev

Reply via email to