Opened 14 years ago

Closed 13 years ago

#14 closed defect (fixed)

Legend layer checkbox not updated after calling map.showLayer

Reported by: jfournier Owned by: madair
Priority: P2 Milestone: 2.0
Component: Widgets Version: 1.0.2
Severity: Minor Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

When using the Map widget API to turn layers on or off directly, the Legend widget does not update the state of the associated checkbox.

Change History (3)

comment:1 by pagameba, 14 years ago

Milestone: 1.12.0

comment:2 by madair, 13 years ago

Status: newassigned

Currently, the correct way to show/hide layers programatically is using the Fusion.Layers.Layer object's show() and hide() methods (same goes for Groups).

We need to decide which object should expose the API method.

comment:3 by pagameba, 13 years ago

Resolution: fixed
Status: assignedclosed

The correct method is:

var map = Fusion.getMapByIndice(0); var base = map.getAllLayers()[0]; var layer = base.getLayerByName('Parcels'); layer.hide(); layer.show();

calling base.showLayer(layer) and base.hideLayer(layer) will have the same visual effect on the map but will not update the legend checkboxes.

Note: See TracTickets for help on using tickets.