[OpenLayers-Dev] Scrollable LayerSwitcher?

Juan G juangon at gmail.com
Wed Sep 10 08:05:19 EDT 2008


The trick here is modifying the LayerSwitcher div CSS property
(overflow:scroll). You´ll have to make your own css file in this case.

You can see an example of this in this URL (click in the upper-right arrow
image to open the layerSwitcher):
http://www.mirame.chduero.es/DMADuero_09_Viewer

Regards,

Juan

2008/9/10 Michelle Richardson <michelle.richardson2 at baesystems.com>

>
> Hiya
>
> I am creating a web site with an OpenLayers map control and am having
> trouble with the LayerSwitcher.  The list of layers in the LayerSwitcher
> may
> make this control taller than the map control itself and the layers at the
> bottom of the list aren't visible and the LayerSwitcher doesn't scroll.
> This problem occurs in both IE7 and Safari.
>
> I don't know at design time the actual length of the list of layers as the
> map control is configurable by the client and the list of available layers
> is collected at runtime from the WMS service's GetCapabilities Method.
>  This
> means I will have to allow for layer lists of all sizes.
>
> Is there a way to make the LayerSwitcher scroll vertically?  I've tried
> changing the properties of the map's div but that doesn't work.  The actual
> divs with the LayerSwitcher etc, are created at runtime by OpenLayers and I
> don't seem to be able to get at them.  I don't have a lot of JavaScript or
> OpenLayers experience so I thought I might be missing something.
>
> Thanks :)
> --
> View this message in context:
> http://www.nabble.com/Scrollable-LayerSwitcher--tp19410284p19410284.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/20080910/d9ff0011/attachment.html


More information about the Dev mailing list