Camera

open class Camera

Represents a composite class comprised of tilt, orientation, zoom level and center point for a Map.

Types

Link copied to clipboard
interface ModeChangedListener : Camera.CameraListener
Link copied to clipboard
annotation class MovementMode
Available camera movement modes.
Link copied to clipboard
interface PositionChangedListener : Camera.CameraListener
Link copied to clipboard
annotation class RotationMode
Available camera rotation modes.

Functions

Link copied to clipboard
open fun calculateFromMapRectangle(@NonNull mapRectangle: MapRectangle, @NonNull mapCenter: MapCenter, @FloatRange(from = "-180.0", to = 180.0) rotation: Float, tilt: Float, @FloatRange(from = 0.0, to = Float.MAX_VALUE) maxZoomLevel: Float): CameraState.PositionOrientation
Calculates CameraState.
Link copied to clipboard
open fun drag(xFrom: Float, yFrom: Float, xTo: Float, yTo: Float, animation: MapAnimation)
Link copied to clipboard
open fun dragBy(x: Float, y: Float, animation: MapAnimation)
Link copied to clipboard
Returns mode how camera should move when the vehicle is moving - if it is following the vehicle or not.
Link copied to clipboard
Returns mode how the camera rotation should behave when the vehicle is moving.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
Link copied to clipboard
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
Link copied to clipboard
Return current map padding
Link copied to clipboard
Link copied to clipboard
Returns the minimum a maximum value of zoom levels
Link copied to clipboard
Return camera GeoCoordinates on the map.
Link copied to clipboard
@FloatRange(from = "-180.0", to = 180.0)
open fun getRotation(): Float
Return the rotation of map in degrees.
Link copied to clipboard
Returns the tilt of map in degrees.
Link copied to clipboard
Returns the zoom value from range (0 - 20.0) with an animation.
Link copied to clipboard
open fun isValid(): Boolean
Check if the camera object is valid.
Link copied to clipboard
open fun rotateBy(angle: Float, @NonNull focus: PointF, @NonNull animation: MapAnimation)
Link copied to clipboard
Sets how camera should move when the vehicle is moving - ff is following vehicle or not.
Link copied to clipboard
Sets how the camera rotation should behave when the vehicle is moving.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets the map center (point for rotation axis and vehicle position) for locked and unlocked map state.
Link copied to clipboard
Sets the padding of the map from left, top, right and bottom.
Link copied to clipboard
Sets the position to rectangle on map specified by MapRectangle rectangle with margin.
Link copied to clipboard
Move camera to given position GeoCoordinates on the map with an animation.
Link copied to clipboard
open fun setRotation(@FloatRange(from = "-180.0", to = 180.0) rotation: Float, @NonNull animation: MapAnimation)
Sets the rotation of map in degrees.
Link copied to clipboard
open fun setTilt(tilt: Float, @NonNull animation: MapAnimation)
Sets the tilt of map in degrees with an animation.
Link copied to clipboard
open fun setZoomLevel(@FloatRange(from = 0.0, to = Float.MAX_VALUE) zoomLevel: Float, @NonNull animation: MapAnimation)
Sets the zoom value from range (0 - 20.0).
Link copied to clipboard
open fun tiltBy(angle: Float, animation: MapAnimation)
Link copied to clipboard
open fun zoomBy(scale: Float, @NonNull focus: PointF, @NonNull animation: MapAnimation)