对于基本层组,我要显示单选按钮,对于非基本层组,应显示复选框。目前,对于这两者,我们都将获得
basicMapGroup = new ol.layer.Group({
name: 'Basic Maps',
visible: true
});
layerGroup = new ol.layer.Group({
name: 'Layers',
visible: true
});
var baselayergroup=basicMapGroup;
var nonbaselayergroup=layerGroup;
olMap = new ol.Map({
controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
collapsible: false
})
}),
layers: [baselayergroup,nonbaselayergroup],
view: olView
});
mapComponent = Ext.create('GeoExt.component.Map', {
map: olMap
});
mapPanel = Ext.create('Ext.panel.Panel', {
region: 'center',
border: false,
layout: 'fit',
items: [mapComponent]
});
treeStore = Ext.create('GeoExt.data.store.LayersTree', {
layerGroup: olMap.getLayerGroup()
});
treePanel = Ext.create('Ext.tree.Panel', {
viewConfig: {
plugins: {ptype: 'treeviewdragdrop'}
},
store: treeStore,
rootVisible: false,
flex: 1,
border: false
});
var count=0;
Ext.create('Ext.Viewport', {
layout: 'border',
deferredRender: false,
items: [
mapPanel,
{
xtype: 'panel',
region: 'west',
title:'temp',
width:278,
split:true,
collapsible: true,
collapseMode: 'mini',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
treePanel
]
}
]
});