mapModel.addMapModelHandler(this);
mapModel.getMapView().addMapViewChangedHandler(this);
graphics = new GraphicsWidget(getID() + "Graphics");
painterVisitor = new PainterVisitor(graphics);
mapModel.addFeatureSelectionHandler(new MapWidgetFeatureSelectionHandler(this));
graphics.setFallbackController(new PanController(this));
// Painter registration:
painterVisitor.registerPainter(new CirclePainter());
painterVisitor.registerPainter(new RectanglePainter());
painterVisitor.registerPainter(new TextPainter());