Camera

open class Camera

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

Types

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

Functions

calculateFromMapRectangle
Link copied to clipboard
open fun calculateFromMapRectangle(@NonNull mapRectangle: MapRectangle, @NonNull mapCenter: MapCenter, @FloatRange(from = "-180.0", to = 180.0rotation: Float, tilt: Float, @FloatRange(from = 0.0, to = Float.MAX_VALUEmaxZoomLevel: Float): CameraState.PositionOrientation
Calculates CameraState.
drag
Link copied to clipboard
open fun drag(xFrom: Float, yFrom: Float, xTo: Float, yTo: Float, animation: MapAnimation)
dragBy
Link copied to clipboard
open fun dragBy(x: Float, y: Float, animation: MapAnimation)
getCameraMovementMode
Link copied to clipboard
open fun getCameraMovementMode(): Int
Returns mode how camera should move when the vehicle is moving - if it is following the vehicle or not.
getCameraRotationMode
Link copied to clipboard
open fun getCameraRotationMode(): Int
Returns mode how the camera rotation should behave when the vehicle is moving.
getLocalRotation
Link copied to clipboard
open fun getLocalRotation(): Point3F
getLocalTranslation
Link copied to clipboard
open fun getLocalTranslation(): Point3F
getMapCenter
Link copied to clipboard
open fun getMapCenter(): MapCenter
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
getMapCenterSettings
Link copied to clipboard
open fun getMapCenterSettings(): MapCenterSettings
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
getMapPadding
Link copied to clipboard
open fun getMapPadding(): RectF
Return current map padding
getMapRectangle
Link copied to clipboard
open fun getMapRectangle(): GeoBoundingBox
getMinMaxZoomLevel
Link copied to clipboard
open fun getMinMaxZoomLevel(): Pair<Float, Float>
Returns the minimum a maximum value of zoom levels
getPosition
Link copied to clipboard
open fun getPosition(): GeoCoordinates
Return camera GeoCoordinates on the map.
getRotation
Link copied to clipboard
@FloatRange(from = "-180.0", to = 180.0)
open fun getRotation(): Float
Return the rotation of map in degrees.
getTilt
Link copied to clipboard
open fun getTilt(): Float
Returns the tilt of map in degrees.
getZoomLevel
Link copied to clipboard
@FloatRange(from = 0.0, to = Float.MAX_VALUE)
open fun getZoomLevel(): Float
Returns the zoom value from range (0 - 20.0) with an animation.
isValid
Link copied to clipboard
open fun isValid(): Boolean
Check if the camera object is valid.
rotateBy
Link copied to clipboard
open fun rotateBy(angle: Float, @NonNull focus: PointF, @NonNull animation: MapAnimation)
setCameraMovementMode
Link copied to clipboard
open fun setCameraMovementMode(mode: Int)
Sets how camera should move when the vehicle is moving - ff is following vehicle or not.
setCameraRotationMode
Link copied to clipboard
open fun setCameraRotationMode(mode: Int)
Sets how the camera rotation should behave when the vehicle is moving.
setLocalRotation
Link copied to clipboard
open fun setLocalRotation(@NonNull point: Point3F, @NonNull anim: MapAnimation)
setLocalTranslation
Link copied to clipboard
open fun setLocalTranslation(@NonNull point: Point3F, @NonNull anim: MapAnimation)
setMapCenterSettings
Link copied to clipboard
open fun setMapCenterSettings(@NonNull settings: MapCenterSettings, @NonNull initialAnim: MapAnimation)
Sets the map center (point for rotation axis and vehicle position) for locked and unlocked map state.
setMapPadding
Link copied to clipboard
open fun setMapPadding(@NonNull padding: RectF, @NonNull anim: MapAnimation)
Sets the padding of the map from left, top, right and bottom.
setMapRectangle
Link copied to clipboard
open fun setMapRectangle(@NonNull rectangle: MapRectangle)
open fun setMapRectangle(@NonNull rectangle: MapRectangle, @NonNull animation: MapAnimation)
Sets the position to rectangle on map specified by MapRectangle rectangle with margin.
setPosition
Link copied to clipboard
open fun setPosition(@NonNull position: GeoCoordinates, @NonNull animation: MapAnimation)
Move camera to given position GeoCoordinates on the map with an animation.
setRotation
Link copied to clipboard
open fun setRotation(@FloatRange(from = "-180.0", to = 180.0rotation: Float, @NonNull animation: MapAnimation)
Sets the rotation of map in degrees.
setTilt
Link copied to clipboard
open fun setTilt(tilt: Float, @NonNull animation: MapAnimation)
Sets the tilt of map in degrees with an animation.
setZoomLevel
Link copied to clipboard
open fun setZoomLevel(@FloatRange(from = 0.0, to = Float.MAX_VALUEzoomLevel: Float, @NonNull animation: MapAnimation)
Sets the zoom value from range (0 - 20.0).
tiltBy
Link copied to clipboard
open fun tiltBy(angle: Float, animation: MapAnimation)
zoomBy
Link copied to clipboard
open fun zoomBy(scale: Float, @NonNull focus: PointF, @NonNull animation: MapAnimation)