Opened 8 years ago

Closed 7 years ago

#173 closed defect (fixed)

Legend: use inRange to determine visibility

Reported by: bartvde Owned by: bartvde
Priority: minor Milestone: 0.7
Component: GeoExt.LegendPanel Version: trunk
Keywords: Cc:
State: Commit

Description

For scale dependent layers, the legend will always show, even if the layer is not in range. I think the legend should not show a particular layer if it is out of range, i.e. the map and legend need to be properly synchronized.

Attachments (2)

ticket173.patch (2.0 KB) - added by bartvde 8 years ago.
patch including a testcase
geoext-173.patch (2.9 KB) - added by ahocevar 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by bartvde

patch including a testcase

comment:1 Changed 8 years ago by bartvde

  • State changed from None to Review

comment:2 Changed 8 years ago by tschaub

  • Component changed from GeoExt.LegendWMS to GeoExt.LegendPanel
  • Owner set to bartvde
  • State changed from Review to Commit

Looks good. Please commit.

comment:3 Changed 8 years ago by bartvde

  • Resolution set to fixed
  • Status changed from new to closed

(In [1454]) Legend: use inRange to determine visibility so that scale-dependent layers are only shown in the legend when they are visible in the map, r=tschaub (closes #173)

Changed 7 years ago by ahocevar

comment:4 Changed 7 years ago by ahocevar

  • Resolution fixed deleted
  • State changed from Commit to Review
  • Status changed from closed to reopened

[1454] was incorrect because it makes it impossible to see base layers in the legend when allOverlays of the map is false. The above patch shows this issue in a test case, and fixes it by using calculateInRange() instead of just inRange.

Tests pass, please review.

comment:5 Changed 7 years ago by tschaub

  • State changed from Review to Commit

Looks good to me.

comment:6 Changed 7 years ago by ahocevar

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [1890]) make sure that baseLayers show up in legend. r=tschaub (closes #173)

Note: See TracTickets for help on using tickets.