[OpenLayers-Dev] Help needed to customize (a bit only) LayerSwitcher control

Michelle Richardson michelle.richardson2 at baesystems.com
Wed Oct 8 11:21:04 EDT 2008


Hiya jecheve

You could also try something like I have below.  I simply used the IE
Developer toolbox to identify the div element I wanted to alter then either
reset attributes or added a ref to a css class.

//Changes the css class of part of the layerswitcher to ensure it scrolls if
there are lots of layers on the map server
function makeLayerSwitcherScrollable()
{
    var layersDiv =
document.getElementById("OpenLayers.Control.LayerSwitcher_4_layersDiv");
    layersDiv.width = "";
    var divToChange = layersDiv.children[3];
    divToChange.className ="scrolling";
}

-- 
View this message in context: http://n2.nabble.com/Help-needed-to-customize-%28a-bit-only%29-LayerSwitcher-control-tp1304674p1306905.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list