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* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> 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
    [email protected] <mailto:[email protected]>
    http://openlayers.org/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to