OpenLayers OpenLayers

Ticket #1599 (new feature)

Opened 2 months ago

Last modified 1 month ago

LayerSwitcher: move styling and calls to Rico out of the class

Reported by: hpbrantley Assigned to:
Priority: minor Milestone: 2.8 Release
Component: general Version: 2.6
Keywords: layerswitcher style rico Cc:
State: Needs Discussion

Description (Last modified by euzuro)

See http://brantleys.com/maps/newSelectFeature.html

The differences between the native LayerSwitcher and this modification is the styling is moved into the style.css with the following:

.olControlLayerSwitcher{}
.olControlLayerSwitcherLayer{}
.olControlLayerSwitcherBaseLabel{}
.olControlLayerSwitcherBaseLayer{}
.olControlLayerSwitcherDataLabel{}
.olControlLayerSwitcherDataLayer{}
.olControlLayerSwitcherMaximizeButton{}
.olControlLayerSwitcherMinimizeButton{}

Also, you will need to call Rico yourself to do things like round corners with the following:

layerSwitcher = new OpenLayers.Control.newLayerSwitcher();
map.addControl(layerSwitcher);
OpenLayers.Rico.Corner.round( layerSwitcher.div, 
                             {corners: "tl bl", 
                              bgColor: "transparent", 
                              color: "darkblue", 
                              blend: false});
OpenLayers.Rico.Corner.changeOpacity(layerSwitcher.layersDiv, 0.75);

Should I upload a patch, modified version or just remove it?

Change History

07/28/08 14:58:50 changed by euzuro

  • description changed.

07/28/08 14:59:02 changed by euzuro

  • milestone changed from 2.7 Release to 2.8 Release.