code: public void onDoubleClick(DoubleClickEvent event) {
  		tempLength = 0;
  		mapWidget.unregisterWorldPaintable(distanceLine);
  		mapWidget.unregisterWorldPaintable(lineSegment);
  		distanceLine.setGeometry(null);
  		lineSegment.setGeometry(null);
  		if (panel != null) {
  			panel.destroy();
  		}
  		dispatchState(State.STOP);
  	}
docs: Stop the measuring, and remove all graphics from the map.