OpenLayers OpenLayers

Ticket #716 (closed feature: fixed)

Opened 1 year ago

Last modified 11 months ago

Make LayerSwitcher support displayInLayerSwitcher for Base Layers

Reported by: openlayers Assigned to: euzuro
Priority: minor Milestone: 2.5 Release
Component: Control.LayerSwitcher Version: 2.4 RC3
Keywords: Cc:
State:

Description

If a map is to be rendered with only one base layer, having the base layer listed in the layer switcher can be confusing to some operators. Operators assume the radio button implies additional layers that are not being rendered.

A mechanism to suppress the base layer from layer switcher would alleviate operator confusion. I propose extending the functionality of displayInLayerSwitcher to include base layer even when only layer.

Attachments

layerswitcher.patch (5.6 kB) - added by crschmidt on 07/14/07 09:01:48.
ls.patch (5.6 kB) - added by crschmidt on 08/03/07 15:55:38.

Change History

05/22/07 23:46:32 changed by crschmidt

  • milestone changed from 2.4 Release to 2.5 Release.

07/14/07 09:01:48 changed by crschmidt

  • attachment layerswitcher.patch added.

07/14/07 09:02:48 changed by crschmidt

  • keywords changed from layerswitcher baselayer to review.

Add support of displayInLayerSwitcher to base layers in LayerSwitcher. With tests and examples.

08/03/07 15:53:04 changed by euzuro

no time for full review, but this:

1)

    if (!baseLayer) { 
        containsOverlays = true; 
    } else { 
        containsBaseLayers = true; 
    }     

should be (for readability)

    if (baseLayer) { 
        containsBaseLayers = true; 
    } else { 
        containsOverlays = true; 
    }     

2) copy/paste error in the comment here:

 	265	        // if no overlays, dont display the overlay label 
 	266	        this.baseLbl.style.display = (containsBaseLayers) ? "" : "none";    

should be

 	265	        // if no baselayers, dont display the baselayer label 
 	266	        this.baseLbl.style.display = (containsBaseLayers) ? "" : "none";    

08/03/07 15:54:53 changed by euzuro

the above two are my only comments. otherwise, assuming that someone actually runs tests on ff&ie (and they pass), then i approve of this. good patch.

08/03/07 15:55:38 changed by crschmidt

  • attachment ls.patch added.

08/03/07 18:08:37 changed by tschaub

Tests pass FF and IE(6/7) for me. Please commit.

08/03/07 18:09:21 changed by tschaub

  • keywords changed from review to commit.

08/04/07 08:15:00 changed by crschmidt

  • status changed from new to closed.
  • resolution set to fixed.

In with r3853.

08/27/07 15:39:35 changed by tschaub

  • keywords deleted.