// Map with ID duisburgMap is defined in the XML configuration. (mapDuisburg.xml)
final VLayout mapLayout = new VLayout();
mapLayout.setShowEdges(true);
mapLayout.setHeight("60%");
map = new MapWidget("mapVectorSecurity", "gwt-samples");
map.setController(new PanController(map));
mapLayout.addMember(map);
// Create horizontal layout for login buttons:
HLayout buttonLayout = new HLayout();
buttonLayout.setMembersMargin(10);
// Create login handler that re-initializes the map on a successful login:
final BooleanCallback initMapCallback = new BooleanCallback() {
public void execute(Boolean value) {
if (value) {
map.destroy();
map = new MapWidget("mapVectorSecurity", "gwt-samples");
mapLayout.addMember(map);
map.setController(new PanController(map));
}
}
};
// Create a button that logs in user "marino":