chellymehdi / vopenlayers

Automatically exported from code.google.com/p/vopenlayers
0 stars 0 forks source link

Disable specific overlays by default #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a set of vectorlayers
2. Add these to the map
3. Try to unselect specific layers by default

What is the expected output? What do you see instead?
There is a javascript function for unselecting overlays. However it is not 
possible to gaing access to this function, therefore it is not possible to 
archieve this goal.

What version of the product are you using? On what operating system?
Openlayers-wrapper-1.0.1. 

Please provide any additional information below.
A workaround is to remove and create these layers at runtime. However, one side 
effect is that creating and removing the layers generates a some kind of 
animation which is unpleasant. 

Original issue reported on code.google.com by remiema...@gmail.com on 25 Apr 2012 at 6:33

GoogleCodeExporter commented 9 years ago
I too would dearly like to see this issue addressed. I have tried using 
WebMapServiceLayer.setEnabled() and setVisible() methods but neither seem to 
have an effect on the layers displayed in either the map or the contents of the 
layerswitcher. I would like not have to use some method after map creation and, 
ideally, just mark some overlay layers as 'inactive' before I add them to the 
map so that they are not selected by default. This is so as to avoid the 
initial costly fetching of densely populated layers.

Original comment by warwick....@gmail.com on 28 Nov 2012 at 12:44