[OpenLayers-Users] Panel Visibility

Marc Desharnais marc.desharnais at ec.gc.ca
Tue Aug 7 09:28:19 EDT 2007


Hi David,

You are right and now the panel is *maximized* when the page is loaded.
I must have missed this one when I browsed the functions!

Many thanks! :)

Marc


David Fawcett wrote:
> I believe that there is a maximizeControl() method for the 
> LayerSwitcher() control.
>
> Try something like:
>
> var layer_switcher = new OpenLayers.Control.LayerSwitcher();
> map.addControl(layer_switcher);
> layer_switcher.maximizeControl();
>
> David.
>
>
> On 8/7/07, *Marc Desharnais* <marc.desharnais at ec.gc.ca 
> <mailto:marc.desharnais at ec.gc.ca>> wrote:
>
>     Hi all,
>
>     Thanks Gregor for your answer. I know how to add a selection panel
>     to a
>     map. The question i s really about showing the panel by default.
>     I want the panel to be shown by default without having to click on the
>     "+" in the corner to display it.
>
>     It's a matter of showing the options of the map for the average user
>     that is new to geomatic and won't click on anything to try to see what
>     it does.
>     So I want to show the options available by default.
>
>     regards :)
>
>     Marc
>
>
>
>     Gregor Mosheh wrote:
>     > Marc Desharnais wrote:
>     >> I was wondering if it's possible to unhide the panels on the
>     side of
>     >> the map. Like the selection panel where you pick the base layer and
>     >> the overlay that you want.
>     >
>     > To show them, you add the control to your map's constructor.
>     > Example:
>     >    var controls = [new OpenLayers.Control.LayerSwitcher()];
>     >    var map = new OpenLayers.Map('map',{'controls':controls});
>     >
>     > The documentation also mentions a addControl() method, e.g.
>     >    map.addControl( new OpenLayers.Control.LayerSwitcher() );
>     >
>     > That method may or may not be in the version you downloaded; this
>     > stuff changes quickly and sometimes the doc mentions features
>     that are
>     > only in the Subversion version, not in 2.4 release.
>     >
>
>     _______________________________________________
>     Users mailing list
>     Users at openlayers.org <mailto:Users at openlayers.org>
>     http://openlayers.org/mailman/listinfo/users
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070807/804d1f61/attachment.html


More information about the Users mailing list