code: private double pixelsToUnits(int pixels) {
  		Coordinate c1 = mapPresenter.getViewPort().getTransformationService()
  				.transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WORLD);
  		Coordinate c2 = mapPresenter.getViewPort().getTransformationService()
  				.transform(new Coordinate(pixels, 0), RenderSpace.SCREEN, RenderSpace.WORLD);
  		return MathService.distance(c1, c2);
  	}
docs: Transform a pixel-length into a real-life distance expressed in map CRS. This depends on the current map scale.
  
  @param pixels
  The number of pixels to calculate the distance for.
  @return The distance the given number of pixels entails.