GetLayers(true,false) returns all layers, not just currently visible ones
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.
Change History
(4)
Severity: |
trivial → major
|
Version: |
2.1.0 → 2.2.0
|
Keywords: |
haspatch added
|
Milestone: |
→ 2.4
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
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