I am trying to add a button with a menu to my existing toolbar but
unfortunately when I click on it the drawfeature control associated with the
button won't fire and the pan tool stays active. If I just add the
GeoExt.Action that adds redline directly to the tbar this works, but if I add
the menu with it it doesn't. Not sure what I am missing here just trying to get
a menu because I want to allow the drawfeature to use options for a line or
polygon. Any help appreciated.
/ -------- Begin RedLine Menu ------------------------//
//Redline Action
var action_RedLine = new GeoExt.Action({
text: "Redline",
control: drawFeature,
map: map,
// button options
toggleGroup: "tools",
allowDepress: false,
group: "tools"
});
var menu = new Ext.menu.Menu({
id: 'basicMenu',
text: 'Redline Menu',
map: map,
items: [action_RedLine]
});
var redline_button = new Ext.Button({
menu: menu,
toggleGroup: "tools",
allowDepress: false,
group: "tools",
map: map
});
// ------ End Redline Menu --------------//
var mapPanel = new GeoExt.MapPanel({
collapsed: false,
height: 800,
renderTo: '',
map: map,
center: lonLat,
zoom: startupLevel,
tbar:[action_Home, '-', action_Queries , '-', action_ZoomIn, '-',
action_ZoomOut, '-', action_ZoomPrevious , '-', action_Pan, '-',
action_CenterMap,
'-', action_FitMap, '-', redline_button, '-', action_Print, '-' ,
action_Help, '-' ,action_Tutorial]
});
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users