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