Thanks,I will have a try. :)<br><br><div class="gmail_quote">2011/12/17 Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I understood your question. Again, the answer is that the only concept<br>
of a layer collection in OpenLayers at the library level is the base<br>
layer / overlay dichtomy. If you want a layer switcher with radio<br>
buttons to turn entire layer collections on and off, you will have to<br>
create your custom layer switcher. If you use WMS layers, and all your<br>
layers come from the same WMS, you can treat an OpenLayers.Layer.WMS<br>
instance as a collection by providing a list of layers to the layers<br>
param (e.g. layers: ["layer1", "layer2"], but the layer switcher will<br>
not know about "layer1" and "layer2".<br>
<br>
You can also have a look at <a href="http://geoext.org/" target="_blank">http://geoext.org/</a>, which provides layer<br>
tree components that allow you to build what you want. Or you can try<br>
a quick and dirty approach (note the "don't try this at home" comment)<br>
like this: <a href="http://ol-performance.appspot.com/group3.html" target="_blank">http://ol-performance.appspot.com/group3.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Andreas.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sat, Dec 17, 2011 at 10:21 AM, maven apache <<a href="mailto:apachemaven0@gmail.com">apachemaven0@gmail.com</a>> wrote:<br>
> Hi, Andreas Hocevar:<br>
><br>
> Thanks for your attention,however you may misunderstand me .<br>
><br>
> I want the layerswitcher change the layer in this manner:<br>
><br>
> <a href="http://i.stack.imgur.com/PNRHC.png" target="_blank">http://i.stack.imgur.com/PNRHC.png</a><br>
><br>
> Thanks.<br>
><br>
> 在 2011年12月17日 下午4:08,Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>>写道:<br>
><br>
>> Ok, you're looking for the isBaseLayer option. It can be set as<br>
>> configuration option on a layer, and will cause the layer to become part of<br>
>> the baseLayer collection. And this is the only layer collection on the<br>
>> library level. Members of this collection are mutually exclusive, so only<br>
>> one can be visible at a time.<br>
>><br>
>> Andreas.<br>
>><br>
>> On Dec 17, 2011 7:42 AM, "maven apache" <<a href="mailto:apachemaven0@gmail.com">apachemaven0@gmail.com</a>> wrote:<br>
>>><br>
>>> In fact,I mean if there is any concert like the layercollection which may<br>
>>> contains more than one layer. And the layerswitcher see the layercollection<br>
>>> as radio button and layer as check box.<br>
>>><br>
>>> 在 2011-12-15 晚上9:35,"Andreas Hocevar" <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>>写道:<br>
>>>><br>
>>>> Maybe you're looking for something else than OpenLayers? OpenLayers<br>
>>>> does not have the concept of a maptype.<br>
>>>><br>
>>>> Andreas.<br>
>>>><br>
>>>> On Thu, Dec 15, 2011 at 2:21 PM, maven apache <<a href="mailto:apachemaven0@gmail.com">apachemaven0@gmail.com</a>><br>
>>>> wrote:<br>
>>>> > It seems that,there is no maptype related.<br>
>>>> ><br>
>>>> > 2011/12/15 Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>><br>
>>>> >><br>
>>>> >> Maybe you find UML diagrams helpful:<br>
>>>> >> <a href="http://trac.osgeo.org/openlayers/wiki/UML" target="_blank">http://trac.osgeo.org/openlayers/wiki/UML</a><br>
>>>> >><br>
>>>> >> Andreas.<br>
>>>> >><br>
>>>> >> On Thu, Dec 15, 2011 at 12:34 PM, maven apache<br>
>>>> >> <<a href="mailto:apachemaven0@gmail.com">apachemaven0@gmail.com</a>><br>
>>>> >> wrote:<br>
>>>> >> > Hi:<br>
>>>> >> ><br>
>>>> >> > I want to know if there is any document about the concepts and<br>
>>>> >> > relationship<br>
>>>> >> > between the map/maptype/layers/overlay ?<br>
>>>> >> ><br>
>>>> >> > I thinks sometime it is necessary if we want to do some<br>
>>>> >> > customzation.<br>
>>>> >> ><br>
>>>> >> > I have read the doc from <a href="http://ol.org" target="_blank">ol.org</a>,but the api document is simple.<br>
>>>> >> ><br>
>>>> >> > Any complete documents?<br>
>>>> >> ><br>
>>>> >> > Thanks.<br>
>>>> >> ><br>
>>>> >> > _______________________________________________<br>
>>>> >> > Users mailing list<br>
>>>> >> > <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
>>>> >> > <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>>> >> ><br>
>>>> >><br>
>>>> >><br>
>>>> >><br>
>>>> >> --<br>
>>>> >> Andreas Hocevar<br>
>>>> >> OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
>>>> >> Expert service straight from the developers.<br>
>>>> ><br>
>>>> ><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Andreas Hocevar<br>
>>>> OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
>>>> Expert service straight from the developers.<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Users mailing list<br>
>>> <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
><br>
<br>
<br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</div></div></blockquote></div><br>