[OpenLayers-Dev] Help needed to customize (a bit only)
LayerSwitcher control
Juan G
juangon at gmail.com
Wed Oct 8 11:34:10 EDT 2008
All components in OpenLayers can be changed with CSS. It´s only a matter of
finding which css classes or id the component you want to customize has.
In case of LayerSwitcher you have several CSS classes.
If you want to see an example of customizing the LayerSwitcher, go to this
URL: http://www.mirame.chduero.es/DMADuero_09_Viewer and click in the
upper-right corner arrow to open the layerSwitcher. The viewer is spanish
only but I guess you´ll find everything you need easily. This viewer has a
custom LayerSwitcher slightly different from the OpenLayers original one.
2008/10/8 Michelle Richardson <michelle.richardson2 at baesystems.com>
>
> 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.
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20081008/15121b36/attachment.html
More information about the Dev
mailing list