mapfish. widgets. toolbar. Toolbar

A toolbar shows a set of OpenLayers Controls and handle activating them.

Simple example usage

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();

Some attributes from the control are used by the toolbar

  • isDefault: true for the default button of the given group.
  • title: will be used for the tooltip.

On the Ext button side (second parameter of addControl), some options are of interest:

  • toggleGroup: Name of the toggle group the button is member of.
  • iconCls: The CSS class for displaying the button.

Inherits from

  • {Ext.Toolbar}
Summary
mapfish. widgets. toolbar. ToolbarA toolbar shows a set of OpenLayers Controls and handle activating them.
Constructor
mapfish. widgets. toolbar. ToolbarCreate a new Toolbar

Constructor

mapfish. widgets. toolbar. Toolbar

Create a new Toolbar

Parameters

config{Object} Config object
Close