[OpenLayers-Dev] Adding css elements in javascript not working

Andreas Hocevar andreas.hocevar at gmail.com
Thu Dec 13 16:31:17 EST 2007


Tim Schaub wrote:
> Hey-
> pdecker wrote:
>> I have tried to modify some of the css elements as shown below.  The
>> div.olControlMousePosition works, but the OverviewMap elements do not work. 
>> If I  modify the OpenLayers style.css file itself, the elements work.  I am
>> using OpenLayer 2.5.  Thanks for any help.  -Paula
> Try adding theme: null as an option in your map constructor.
> var map = new OpenLayers.Map("map", {theme: null});
> If this works, please file a ticket reporting that the stylesheet 
> detection is flawed (as I already suspect it is).

We had the same issue with the OverviewMap in Mapbuilder. We solved it
by adding the stylesheet prior to initializing the OpenLayers map. Don't
know if this information is helpful for you.


More information about the Dev mailing list