Opened 15 years ago

Closed 12 years ago

#1318 closed defect (fixed)

GetLayers(true,false) returns all layers, not just currently visible ones

Reported by: tomchadwin Owned by:
Priority: medium Milestone: 2.4
Component: Viewer API Version: 2.2.0
Severity: major Keywords: getlayers, haspatch
Cc: External ID:

Description

The Viewer API documentation for GetLayers() states that setting the first parameter to true should only return currently visible layers. It appears not to do this, but to return all layers set to visible, regardless of whether the current scale means they are visible or not.

Attachments (1)

1318.patch (777 bytes ) - added by gabrimonfa 13 years ago.

Download all attachments as: .zip

Change History (4)

by gabrimonfa, 13 years ago

Attachment: 1318.patch added

comment:1 by gabrimonfa, 13 years ago

Severity: trivialmajor
Version: 2.1.02.2.0

A fix has been proposed by user doggybs on internal ml

http://osgeo-org.1803224.n2.nabble.com/Viewer-API-GetLayers-onlyVisible-onlySelectable-td3154987.html

I attach the diff in the patch file. I can confirm that the problem appears also in 2.2RC and in 2.2 final and it appears to be solved by the patch.

Since this affect the viewerAPI it would be important IMHO to review and apply the patch quickly

comment:2 by jng, 13 years ago

Keywords: haspatch added
Milestone: 2.4

comment:3 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r6843) and 2.4 (r6842). Thanks for the patch.

Note: See TracTickets for help on using tickets.