A toolbar shows a set of OpenLayers Controls and handle activating them.
var toolbar = new mapfish.widgets.toolbar.Toolbar({map: map}); toolbar.render('buttonbar'); toolbar.addControl( new OpenLayers.Control.ZoomBox({title: 'Zoom in'}), {iconCls: 'zoomin', toggleGroup: 'navigation'}); toolbar.addControl( new OpenLayers.Control.DragPan({title: 'Drag or pan', isDefault: true}), {iconCls: 'pan', toggleGroup: 'navigation'}); toolbar.activate();
On the Ext button side (second parameter of addControl), some options are of interest:
mapfish. | A toolbar shows a set of OpenLayers Controls and handle activating them. |
Constructor | |
mapfish. | Create a new Toolbar |