[OpenLayers-Users] Panel Visibility
Gregor Mosheh
gregor at hostgis.com
Mon Aug 6 15:21:00 EDT 2007
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.
--
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/
"Remember that no one cares if you can back up,
only if you can restore." - AMANDA
More information about the Users
mailing list