开发者

Grouping layers with groext - openlayer overlays menu

i can't find out how to grup layers like in this example http://dev.openlayers.org/releases/OpenLayers-2.10/examples/controls.html press the upper + button

as you can see there's a checkbox and two radio buttons

anyone knows a way to group layers so that they are displayed under the same grou开发者_JS百科p and it's possible to choose only one among them? (radio button)

thank you


You can try using GeoExt tree to do this, like this: http://api.geoext.org/1.0/examples/tree.html

At this time OpenLayers does not support grouping beyond those mentioned by Brian above.


What are you trying to display on the layers? Vectors can be combined with styleMap. You might want to try is to make your layers base layers instead of overlays.

In OpenLayers there are 2 types of layers: base layers and overlays. When you add more than one of either of these to a map you get slightly different behaviour.

Base layers can only be displayed one at a time and a radio box is displayed to select which one is displayed. Check boxes are displayed for Overlays because any number of overlays can be displayed on top of a base layer. More information and examples are available on the wiki. You

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜