CameraModel

abstract class CameraModel : Camera.PositionChangedListener, Camera.ModeChangedListener

Functions

Link copied to clipboard
fun addModeChangedListener(listener: Camera.ModeChangedListener)
Link copied to clipboard
fun addPositionChangedListener(listener: Camera.PositionChangedListener)
Adds listener for Camera.PositionChangedListener methods.
Link copied to clipboard
fun drag(    xFrom: Float,     yFrom: Float,     xTo: Float,     yTo: Float): Boolean
abstract fun drag(    xFrom: Float,     yFrom: Float,     xTo: Float,     yTo: Float,     animation: MapAnimation): Boolean
Link copied to clipboard
fun dragBy(x: Float, y: Float): Boolean
abstract fun dragBy(    x: Float,     y: Float,     animation: MapAnimation): Boolean
Link copied to clipboard
abstract fun getLocalRotation(): Point3F
Retrieves orientation of a camera on each axis
Link copied to clipboard
abstract fun getLocalTranslation(): Point3F
Retrieves position offset of a camera on each axis
Link copied to clipboard
abstract fun getMapCenter(): MapCenter
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
Link copied to clipboard
abstract fun getMapCenterSettings(): MapCenterSettings
Returns the map center (point for rotation axis and vehicle position) for locked and unlocked map state.
Link copied to clipboard
abstract fun getMapPadding(): RectF
Link copied to clipboard
abstract fun getMapRectangle(): MapRectangle
Link copied to clipboard
abstract fun getMovementMode(): Int
Returns mode how camera should move when the vehicle is moving - if it is following the vehicle or not.
Link copied to clipboard
abstract fun getPosition(): GeoCoordinates
Returns camera GeoCoordinates on the map.
Link copied to clipboard
abstract fun getRotation(): Float
Returns the rotation of map in degrees.
Link copied to clipboard
abstract fun getRotationMode(): Int
Returns mode how the camera rotation should behave when the vehicle is moving.
Link copied to clipboard
abstract fun getTilt(): Float
Returns the tilt of map in degrees.
Link copied to clipboard
@FloatRange(from = 0, to = Float.MAX_VALUE)
abstract fun getZoomLevel(): Float
Returns the zoom value from range (0 - 20.0) The zoom level determines how "close" the map view is to the surface of the Earth.
Link copied to clipboard
open fun onMovementModeChanged(mode: Int)
Link copied to clipboard
open fun onPositionChangeCompleted()
Link copied to clipboard
open fun onPositionChanged(    geoCenter: GeoCoordinates,     zoom: Float,     rotation: Float,     tilt: Float)
Link copied to clipboard
abstract fun onRestoreInstance(@Nullable inState: Bundle)
Link copied to clipboard
open fun onRotationModeChanged(mode: Int)
Link copied to clipboard
abstract fun onSaveInstance(@Nullable camera: Camera, @NonNull outState: Bundle)
Link copied to clipboard
fun removeModeChangedListener(listener: Camera.ModeChangedListener)
Link copied to clipboard
fun removePositionChangedListener(listener: Camera.PositionChangedListener)
Removes listener for Camera.PositionChangedListener methods.
Link copied to clipboard
fun rotateBy(angle: Float, @NonNull focus: PointF): Boolean
abstract fun rotateBy(    angle: Float,     @NonNull focus: PointF,     @NonNull animation: MapAnimation): Boolean
Link copied to clipboard
abstract fun setCameraState(cameraState: CameraState)
Link copied to clipboard
abstract fun setLocalRotation(@NonNull angles: Point3F, @NonNull animation: MapAnimation)
Rotates orientation of a camera on each axis
Link copied to clipboard
abstract fun setLocalTranslation(@NonNull offset: Point3F, @NonNull animation: MapAnimation)
Offsets position of a camera on each axis
Link copied to clipboard
fun setMapCenterSettings(settings: MapCenterSettings)

abstract fun setMapCenterSettings(settings: MapCenterSettings, @NonNull animation: MapAnimation)
Sets the map center (point for rotation axis and vehicle position) for locked and unlocked map state.
Link copied to clipboard
fun setMapPadding(rect: RectF)
abstract fun setMapPadding(rect: RectF, @NonNull animation: MapAnimation)
fun setMapPadding(    left: Float,     top: Float,     right: Float,     bottom: Float)
abstract fun setMapPadding(    left: Float,     top: Float,     right: Float,     bottom: Float,     @NonNull animation: MapAnimation)
Link copied to clipboard
fun setMapRectangle(@NonNull mapRectangle: MapRectangle)
abstract fun setMapRectangle(@NonNull mapRectangle: MapRectangle, @NonNull animation: MapAnimation)
fun setMapRectangle(    @NonNull boundingBox: GeoBoundingBox,     @FloatRange(from = 0.0, to = 1.0) leftMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) topMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) rightMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) bottomMarginPerc: Float)
fun setMapRectangle(    @NonNull boundingBox: GeoBoundingBox,     leftMarginPx: Int,     topMarginPx: Int,     rightMarginPx: Int,     bottomMarginPx: Int)
abstract fun setMapRectangle(    @NonNull boundingBox: GeoBoundingBox,     @FloatRange(from = 0.0, to = 1.0) leftMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) topMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) rightMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) bottomMarginPerc: Float,     @NonNull animation: MapAnimation)
abstract fun setMapRectangle(    @NonNull boundingBox: GeoBoundingBox,     leftMarginPx: Int,     topMarginPx: Int,     rightMarginPx: Int,     bottomMarginPx: Int,     @NonNull animation: MapAnimation)
abstract fun setMapRectangle(    @NonNull boundingBox: GeoBoundingBox,     @FloatRange(from = 0.0, to = 1.0) leftMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) topMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) rightMarginPerc: Float,     @FloatRange(from = 0.0, to = 1.0) bottomMarginPerc: Float,     @FloatRange(from = 0.0, to = 20.0) maxZoom: Float,     @NonNull animation: MapAnimation)
abstract fun setMapRectangle(    @NonNull boundingBox: GeoBoundingBox,     leftMarginPx: Int,     topMarginPx: Int,     rightMarginPx: Int,     bottomMarginPx: Int,     @FloatRange(from = 0.0, to = 20.0) maxZoom: Float,     @NonNull animation: MapAnimation)
Link copied to clipboard
abstract fun setMovementMode(movementMode: Int)
Sets how camera should move when the vehicle is moving - ff is following vehicle or not.
Link copied to clipboard
fun setPosition(@NonNull position: GeoCoordinates)
Move camera to given GeoCoordinates on the map.
abstract fun setPosition(@NonNull position: GeoCoordinates, @NonNull animation: MapAnimation)
Move camera to given position GeoCoordinates on the map with an animation.
Link copied to clipboard
fun setRotation(@FloatRange(from = "-180.0", to = 180.0) rotation: Float)
Sets the rotation of map in degrees
abstract 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
abstract fun setRotationMode(rotationMode: Int)
Sets how the camera rotation should behave when the vehicle is moving.
Link copied to clipboard
fun setTilt(@FloatRange(from = 0, to = 90) tilt: Float)

abstract fun setTilt(@FloatRange(from = 0, to = 90) tilt: Float, @NonNull animation: MapAnimation)
Sets the tilt of map in degrees with an animation.
Link copied to clipboard
fun setZoomLevel(@FloatRange(from = 0, to = Float.MAX_VALUE) zoom: Float)
abstract fun setZoomLevel(@FloatRange(from = 0, to = Float.MAX_VALUE) zoom: Float, @NonNull animation: MapAnimation)
Sets the zoom value from range (0 - 20.0).
Link copied to clipboard
fun tiltBy(angle: Float): Boolean
abstract fun tiltBy(angle: Float, @NonNull animation: MapAnimation): Boolean
Link copied to clipboard
fun zoomBy(scale: Float, @NonNull focus: PointF): Boolean
abstract fun zoomBy(    scale: Float,     @NonNull focus: PointF,     @NonNull animation: MapAnimation): Boolean

Inheritors

Link copied to clipboard