[Users] Checkboxes in Tree

Andreas Hocevar ahocevar at opengeo.org
Mon Sep 21 14:39:28 CEST 2009


Sascha Müller wrote:
> thanks for your tip with the min-/maxResolution.
> 
> Is there a chance that the baselayers switching automatically from 
> active to inactive and vice versa?
> Dependent from the defined resolution?

Not automatically, but you can do that in a listener to the map's 
zoomend event. Call map.setBaseLayer(...) in addition to 
layer.setVisibility(...).

A completely different approach would be to work with the map option 
allOverlays: true, and you just create two layer groups in the tree 
manually.

Regards,
Andreas.

> 
> Sascha
> 
>> Hi,
>>
>> Sascha Müller wrote:
>>> I want to display Baselayers depending from the scale.
>>> If I use radioButtons, the user has to change the Baselayer manually.
>>> With checkBoxes, every Baselayer can active and I can make it with Sld.
>>>
>>> So, how can I change the radioButton into checkBoxes in the tree?
>>>   
>>
>> You cannot, because having multiple base layers visible at a time will 
>> break things in OpenLayers. One thing you could try: Dont't control 
>> your base layer visibility by SLD, but by minResolution and 
>> maxResolution in the layer object.
>>
>> Regards,
>> Andreas.
>>
>>> Thanks
>>>
>>> Sascha
>>> _______________________________________________
>>> Users mailing list
>>> Users at geoext.org
>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>>   
>>
>>
> 


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list