Checking layers in the legend not working correctly
|Reported by:||schneiderei||Owned by:||madair|
|External ID:||Operating System:||All|
After starting a Fusion map application, the visibility of the map layers and the status in the legend are in synch, that is, all map layers that are checked in the legend and only these are visible in the map. However, after unchecking a map layer, it remains visible in the map, if checked it again, it's gone from the map only to reappear when unchecking it.
I am using MapServer 5.something (sorry, can't tell which version exactly).
It may be in the functions show() and hide() of Fusion.Maps.MapServer.Layer and Fusion.Maps.MapServer.Group. In the four functions, redrawing of the map is triggered through showLayer(..), hideLayer(..) and showGroup(..), hideGroup(..), respectively. Then, statements that change the value of the visibility flag follow. I suspect that the latter statement should occur before (!) the calls showLayer(..), etc. I tested it, and it fixed the problem.