Toolbars

This xml file contains configurations for all toolbar of a geomajas application. Just like the maps.xml contained all maps, this one contains all toolbars. For each toolbar, it is necessary to define a "toolbar"-tag with a certain id. This id is used to retrieve the widget in HTML. This means that in your geomajas page, you need to define a DynamicToolbar with this id, like so:

<div dojoType="majas.widget.DynamicToolbar" id="someToolbar"
        style="height: 25px; width: 600px; position: absolute;"><div>

So we have a geomajas html page in which we want to see a toolbar, called "someToolbar". Now we will create a configuration in the toolbar.xml that refers to 'someToolbar', and add quite a few buttons to it. But that is not all! A toolbar is always linked to a MapWidget. This means that in the configuration of a toolbar, we need a reference to a map. In this case we are referring to a map that goes by the name of "navigationMap".

The values of the "toolRef" tags are the tools that have been defined in tools.xml!

<?xml version="1.0" encoding="UTF-8"?>
<toolbars xmlns="http://geomajas.org/schemas/configuration/">
    <toolbar id="someToolbar">
        <targetMap>navigationMap</targetMap>
        <toolRef>ZoomInMode</toolRef>
        <toolRef>ZoomOutMode<toolRef>
        <toolRef>ZoomToRectangleMode</toolRef>
        <toolRef>PanMode</toolRef>
        <toolRef>NavigateMode</toolRef>
        <toolRef>ToolbarSeparator</toolRef>
        <toolRef>SelectionMode</toolRef>
        <toolRef>DeselectAll</toolRef>
        <toolRef>ToolbarSeparator</toolRef>
        <toolRef>EditMode</toolRef>
        <toolRef>SplitPolygonMode</toolRef>
        <toolRef>MergePolygonMode</toolRef>
        <toolRef>ToolbarSeparator</toolRef>
        <toolRef>MeasureDistanceMode</toolRef>
        <toolRef>FeatureInfoMode</toolRef>
     <toolbar>
</toolbars>

This toolbar configuration will result in the following toolbar: