CameraUpdateFactory

Factory for creating CameraUpdate objects to transform the camera on a map.

Use these methods to create camera updates for OpenMapView.moveCamera and OpenMapView.animateCamera.

Functions

Link copied to clipboard

Returns a CameraUpdate that moves the camera to the specified position.

Link copied to clipboard

Returns a CameraUpdate that moves the camera to the specified location, preserving the current zoom level.

Link copied to clipboard

Returns a CameraUpdate that moves the camera to show the entire bounds.

fun newLatLngBounds(bounds: LatLngBounds, width: Int, height: Int, padding: Int): CameraUpdate

Returns a CameraUpdate that moves the camera to show the entire bounds in a viewport of the specified dimensions.

Link copied to clipboard

Returns a CameraUpdate that moves the camera to the specified location and sets the zoom level.

Link copied to clipboard
fun scrollBy(xPixels: Float, yPixels: Float): CameraUpdate

Returns a CameraUpdate that scrolls the map by the specified pixel amounts.

Link copied to clipboard

Returns a CameraUpdate that adjusts the zoom level by the specified amount.

fun zoomBy(amount: Float, focus: Point): CameraUpdate

Returns a CameraUpdate that adjusts the zoom level by the specified amount around a point on the screen: the location shown at focus stays there, as with a pinch.

Link copied to clipboard

Returns a CameraUpdate that increases the zoom level by 1.

Link copied to clipboard

Returns a CameraUpdate that decreases the zoom level by 1.

Link copied to clipboard

Returns a CameraUpdate that sets the zoom level to the specified value.