[OpenLayers-Users] Panel Visibility

Marc Desharnais marc.desharnais at ec.gc.ca
Tue Aug 7 08:34:10 EDT 2007


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.
>




More information about the Users mailing list