// ---------------------------------------------------------------------
// Create the left-side (map and tabs):
// ---------------------------------------------------------------------
final MapWidget map = new MapWidget("mapMain", "app");
final Toolbar toolbar = new Toolbar(map);
toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);
toolbar.setBackgroundColor("#647386");
toolbar.setBackgroundImage("");
toolbar.setBorder("0px");
map.getMapModel().addMapModelHandler(new MapModelHandler() {
public void onMapModelChange(MapModelEvent event) {
Label title = new Label("Geomajas GWT: hello world");
title.setStyleName("appTitle");
title.setWidth(260);
toolbar.addFill();
toolbar.addMember(title);
GetMapImageAction getMapImage = new GetMapImageAction(map);
toolbar.addSeparator();
toolbar.addActionButton(getMapImage);
GetLegendImageAction getLegendImageAll = new GetLegendImageAction(map, true);
toolbar.addSeparator();
toolbar.addActionButton(getLegendImageAll);
GetLegendImageAction getLegendImage = new GetLegendImageAction(map, false);
toolbar.addSeparator();
toolbar.addActionButton(getLegendImage);
// switch all labels on
for (Layer layer : map.getMapModel().getLayers()) {
layer.setLabeled(true);
}
}