class CameraUpdateHandler {

	public void moveCamera(CameraUpdate cameraUpdate) {
		final OsmCameraUpdate osmCameraUpdate = (OsmCameraUpdate) cameraUpdate;

		final IMapController controller = map.getController();

		if (osmCameraUpdate.bounds != null) {
			final LatLng center = osmCameraUpdate.bounds.getCenter();

			controller.setZoom(map.getMaxZoomLevel());

			controller.zoomToSpan(
					(int) ((osmCameraUpdate.bounds.northeast.latitude - osmCameraUpdate.bounds.southwest.latitude) * 1e6),
					(int) ((osmCameraUpdate.bounds.northeast.longitude - osmCameraUpdate.bounds.southwest.longitude) * 1e6)
			);

			controller.setCenter(
					toGeoPoint(center)
			);

			return;
		}

		if (osmCameraUpdate.zoom != null) {
			controller.setZoom(osmCameraUpdate.zoom.intValue());
		}

		if (osmCameraUpdate.center != null) {
			controller.setCenter(
					toGeoPoint(osmCameraUpdate.center)
			);
		}
	}

	public  CameraUpdateHandler(MapView map);

}