code: public void activate() {
  		deactivate();
  
  		registrations.add(service.getGeometryEditService().addGeometryEditStartHandler(new GeometryEditStartHandler() {
  
  			public void onGeometryEditStart(GeometryEditStartEvent event) {
  				cleanup();
  			}
  		}));
  		registrations.add(service.getGeometryEditService().addGeometryEditStopHandler(new GeometryEditStopHandler() {
  
  			public void onGeometryEditStop(GeometryEditStopEvent event) {
  				cleanup();
  			}
  		}));
  		registrations.add(service.getGeometryEditService().addGeometryEditShapeChangedHandler(
  				new GeometryEditShapeChangedHandler() {
  
  					public void onGeometryShapeChanged(GeometryEditShapeChangedEvent event) {
  						fetchGeometries();
  					}
  				}));
  		registrations.add(mapWidget.getMapModel().getMapView().addMapViewChangedHandler(new MapViewChangedHandler() {
  
  			public void onMapViewChanged(MapViewChangedEvent event) {
  				for (int i = 0; i < centroids.size(); i++) {
  					Coordinate centroid = centroids.get(i);
  					Coordinate position = mapWidget.getMapModel().getMapView().getWorldViewTransformer()
  							.worldToView(centroid);
  					int x = (int) (position.getX() - labelWidth / 2);
  					int y = (int) (position.getY() - labelHeight / 2);
  
  					Rectangle rectangle = labelBgs.get(i);
  					rectangle.setBounds(new Bbox(x, y, labelWidth, labelHeight));
  					mapWidget.render(rectangle, RenderGroup.SCREEN, RenderStatus.UPDATE);
  
  					Text text = labelTxts.get(i);
  					text.setPosition(new Coordinate(x + 4, y + 2));
  					mapWidget.render(text, RenderGroup.SCREEN, RenderStatus.UPDATE);
  				}
  			}
  		}));
  	}
docs: ------------------------------------------------------------------------