[Users] Radio button in gx_layer question
Minika Bjørge
Minika.Bjorge at statkart.no
Tue Mar 2 08:45:30 CET 2010
Hi,
I am using gx_layers and I would like to display ONLY radio buttons (not check boxes). How do I do this with RadioButtonMixin. Please note that I do not want any checkboxes.
http://www.geoext.org/lib/GeoExt/widgets/tree/RadioButtonMixin.html
var LayerNodeUI = Ext.extend(
GeoExt.tree.LayerNodeUI,
new GeoExt.tree.RadioButtonMixin
);
var treeConfig = [{
nodeType: "gx_baselayercontainer", //Nodes for base layer
text: 'Baselayer',
expanded: true,
allowDrag: false,
allowDrop: false,
draggable: false
},
{
text: 'Overlays',
expanded: true,
children:[{
nodeType: 'gx_layer',
layer:land
},
{
nodeType: 'gx_layer',
layer:sea,
qtip: 'Seamap'
}]
},
{
text: 'Vannstandsdata',
expanded: true,
children:[
{
nodeType: 'gx_layer',
layer: waterlevel,
icon: 'img/icon-green.png',
qtip: 'Tides'
},
{
nodeType: 'gx_layer',
layer: waterlevel2,
icon: 'img/icon-purple.png'
},
{
nodeType: 'gx_layer',
layer: average,
icon: 'img/icon-orange.png',
qtip: 'Yearly average'
},
{
nodeType: 'gx_layer',
layer: highlow,
icon: 'img/icon-yellow.png',
qtip: 'Highest and lowest obeserved levels'
},
{
nodeType: 'gx_layer',
layer: stastions,
icon: 'img/icon-red.png',
qtip: 'Survey stations'
}]
}];
var tree = new Ext.tree.TreePanel({
border: false,
region: "west",
title: "Choose map",
width: 220,
collapsible: true,
collapseMode: "mini",
autoScroll: true,
loader: new Ext.tree.TreeLoader({
applyLoader: false,
uiProviders: {
"use_radio": LayerNodeUI
}
}),
root: {
nodeType: "async",
children: treeConfig
},
rootVisible: false,
lines: false
});
Thanks,
MB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100302/f03d1ddc/attachment-0001.htm
More information about the Users
mailing list