com.sygic.sdk.map.Camera.CameraModel Class Referenceabstract
Inheritance diagram for com.sygic.sdk.map.Camera.CameraModel:
Collaboration diagram for com.sygic.sdk.map.Camera.CameraModel:

Public Member Functions

abstract void onSaveInstance (@Nullable final Camera camera,@NonNull final Bundle outState)
 
abstract void onRestoreInstance (@Nullable final Bundle inState)
 
abstract void setCameraState (final CameraState cameraState)
 
abstract void setPosition (@NonNull final GeoCoordinates position,@NonNull final MapAnimation animation)
 
abstract GeoCoordinates getPosition ()
 
abstract void setRotation (@FloatRange(from=-180.0, to=180.0) final float rotation,@NonNull final MapAnimation animation)
 
abstract float getRotation ()
 
abstract void setZoomLevel (@FloatRange(from=0, to=Float.MAX_VALUE) final float zoom,@NonNull final MapAnimation animation)
 
abstract float getZoomLevel ()
 
abstract void setTilt (@FloatRange(from=0, to=90) final float tilt,@NonNull final MapAnimation animation)
 
abstract float getTilt ()
 
abstract void setRotationMode (@Camera.RotationMode final int rotationMode)
 
.RotationMode abstract int getRotationMode ()
 
abstract void setMovementMode (@Camera.MovementMode final int movementMode)
 
.MovementMode abstract int getMovementMode ()
 
abstract void setMapCenterSettings (final MapCenterSettings settings,@NonNull final MapAnimation animation)
 
abstract MapCenterSettings getMapCenterSettings ()
 
abstract MapCenter getMapCenter ()
 
abstract void setMapPadding (final RectF rect,@NonNull final MapAnimation animation)
 
abstract void setMapPadding (final float left, final float top, final float right, final float bottom,@NonNull final MapAnimation animation)
 
abstract RectF getMapPadding ()
 
abstract void setMapRectangle (@NonNull final MapRectangle mapRectangle,@NonNull final MapAnimation animation)
 
abstract void setMapRectangle (@NonNull final GeoBoundingBox boundingBox,@FloatRange(from=0.0, to=1.0) final float leftMarginPerc,@FloatRange(from=0.0, to=1.0) final float topMarginPerc,@FloatRange(from=0.0, to=1.0) final float rightMarginPerc,@FloatRange(from=0.0, to=1.0) final float bottomMarginPerc,@NonNull final MapAnimation animation)
 
abstract void setMapRectangle (@NonNull final GeoBoundingBox boundingBox, final int leftMarginPx, final int topMarginPx, final int rightMarginPx, final int bottomMarginPx, final @NonNull MapAnimation animation)
 
abstract MapRectangle getMapRectangle ()
 
abstract void setLocalRotation (@NonNull final Point3F angles,@NonNull final MapAnimation animation)
 
abstract Point3F getLocalRotation ()
 
abstract void setLocalTranslation (@NonNull final Point3F offset,@NonNull final MapAnimation animation)
 
abstract Point3F getLocalTranslation ()
 
abstract boolean rotateBy (final float angle,@NonNull final PointF focus,@NonNull final MapAnimation animation)
 
abstract boolean tiltBy (final float angle,@NonNull final MapAnimation animation)
 
abstract boolean zoomBy (final float scale,@NonNull final PointF focus,@NonNull final MapAnimation animation)
 
abstract boolean dragBy (final float x, final float y, final MapAnimation animation)
 
abstract boolean drag (final float xFrom, final float yFrom, final float xTo, final float yTo, final MapAnimation animation)
 
final void addPositionChangedListener (PositionChangedListener listener)
 
final void removePositionChangedListener (PositionChangedListener listener)
 
final void addModeChangedListener (ModeChangedListener listener)
 
final void removeModeChangedListener (ModeChangedListener listener)
 
void onMovementModeChanged (final int mode)
 
void onRotationModeChanged (final int mode)
 
void onPositionChanged (final GeoCoordinates geoCenter, final float zoom, final float rotation, final float tilt)
 
void onPositionChangeCompleted ()
 
final void setPosition (@NonNull final GeoCoordinates position)
 
final void setRotation (@FloatRange(from=-180.0, to=180.0) final float rotation)
 
final void setZoomLevel (@FloatRange(from=0, to=Float.MAX_VALUE) final float zoom)
 
final void setTilt (@FloatRange(from=0, to=90) final float tilt)
 
final void setMapCenterSettings (final MapCenterSettings settings)
 
final void setMapPadding (final RectF rect)
 
final void setMapPadding (final float left, final float top, final float right, final float bottom)
 
final void setMapRectangle (@NonNull final MapRectangle mapRectangle)
 
final void setMapRectangle (@NonNull final GeoBoundingBox boundingBox,@FloatRange(from=0.0, to=1.0) final float leftMarginPerc,@FloatRange(from=0.0, to=1.0) final float topMarginPerc,@FloatRange(from=0.0, to=1.0) final float rightMarginPerc,@FloatRange(from=0.0, to=1.0) final float bottomMarginPerc)
 
final void setMapRectangle (@NonNull final GeoBoundingBox boundingBox, final int leftMarginPx, final int topMarginPx, final int rightMarginPx, final int bottomMarginPx)
 
final boolean rotateBy (final float angle,@NonNull final PointF focus)
 
final boolean tiltBy (final float angle)
 
final boolean zoomBy (final float scale,@NonNull final PointF focus)
 
final boolean dragBy (final float x, final float y)
 
final boolean drag (final float xFrom, final float yFrom, final float xTo, final float yTo)
 
- Public Member Functions inherited from com.sygic.sdk.map.Camera.PositionChangedListener
void onPositionChanged (GeoCoordinates geoCenter, float zoom, float rotation, float tilt)
 
- Public Member Functions inherited from com.sygic.sdk.map.Camera.ModeChangedListener
void onMovementModeChanged (@MovementMode int mode)
 
void onRotationModeChanged (@RotationMode int mode)
 

Protected Member Functions

abstract void observeCameraStateChange (@NonNull final java.util.Observer observer)
 
abstract void observeDynamicValueChange (@NonNull final java.util.Observer observer)
 
abstract void observeCallbackValues (@NonNull final java.util.Observer observer)
 
abstract void disposeCallbackValues (@NonNull final java.util.Observer observer)
 
abstract void disposeCameraStateChange (@NonNull final java.util.Observer observer)
 
abstract void disposeDynamicValueChange (@NonNull final java.util.Observer observer)
 
abstract void onCameraDestroy (@NonNull final Camera camera)
 
abstract CameraState getCameraState ()
 
void clear ()
 

Member Function Documentation

final void com.sygic.sdk.map.Camera.CameraModel.addModeChangedListener ( ModeChangedListener  listener)
final void com.sygic.sdk.map.Camera.CameraModel.addPositionChangedListener ( PositionChangedListener  listener)

Adds listener for Camera.PositionChangedListener methods.

Parameters
listenerCamera.PositionChangedListener
void com.sygic.sdk.map.Camera.CameraModel.clear ( )
protected
abstract void com.sygic.sdk.map.Camera.CameraModel.disposeCallbackValues ( @NonNull final java.util.Observer  observer)
abstractprotected
abstract void com.sygic.sdk.map.Camera.CameraModel.disposeCameraStateChange ( @NonNull final java.util.Observer  observer)
abstractprotected
abstract void com.sygic.sdk.map.Camera.CameraModel.disposeDynamicValueChange ( @NonNull final java.util.Observer  observer)
abstractprotected
abstract boolean com.sygic.sdk.map.Camera.CameraModel.drag ( final float  xFrom,
final float  yFrom,
final float  xTo,
final float  yTo,
final MapAnimation  animation 
)
abstract
final boolean com.sygic.sdk.map.Camera.CameraModel.drag ( final float  xFrom,
final float  yFrom,
final float  xTo,
final float  yTo 
)
abstract boolean com.sygic.sdk.map.Camera.CameraModel.dragBy ( final float  x,
final float  y,
final MapAnimation  animation 
)
abstract
final boolean com.sygic.sdk.map.Camera.CameraModel.dragBy ( final float  x,
final float  y 
)
abstract CameraState com.sygic.sdk.map.Camera.CameraModel.getCameraState ( )
abstractprotected
abstract Point3F com.sygic.sdk.map.Camera.CameraModel.getLocalRotation ( )
abstract

Retrieves orientation of a camera on each axis

Returns
Angle of rotation in degrees for each axis
abstract Point3F com.sygic.sdk.map.Camera.CameraModel.getLocalTranslation ( )
abstract

Retrieves position offset of a camera on each axis

Returns
Local translation in meters for each axis
abstract MapCenter com.sygic.sdk.map.Camera.CameraModel.getMapCenter ( )
abstract

Return the point of map on the screen which will be recognized as map center for rotation and vehicle position

Returns
Pair of x and y position on screen from range 0 - 1
abstract MapCenterSettings com.sygic.sdk.map.Camera.CameraModel.getMapCenterSettings ( )
abstract

Returns the map center (point for rotation axis and vehicle position) for locked and unlocked map state.

Returns
Map center settings
abstract RectF com.sygic.sdk.map.Camera.CameraModel.getMapPadding ( )
abstract
abstract MapRectangle com.sygic.sdk.map.Camera.CameraModel.getMapRectangle ( )
abstract
.MovementMode abstract int com.sygic.sdk.map.Camera.CameraModel.getMovementMode ( )
abstract

Returns mode how camera should move when the vehicle is moving - if it is following the vehicle or not.

Returns
Camera.MovementMode
abstract GeoCoordinates com.sygic.sdk.map.Camera.CameraModel.getPosition ( )
abstract

Returns camera GeoCoordinates on the map.

abstract float com.sygic.sdk.map.Camera.CameraModel.getRotation ( )
abstract

Returns the rotation of map in degrees. By default,the map is oriented with north toward the top of the map (0 degrees). As the orientation angle increases,the map rotates counter-clockwise so that at 90 degrees.

Returns
Rotation in degrees
.RotationMode abstract int com.sygic.sdk.map.Camera.CameraModel.getRotationMode ( )
abstract

Returns mode how the camera rotation should behave when the vehicle is moving.

Returns
Camera.RotationMode
abstract float com.sygic.sdk.map.Camera.CameraModel.getTilt ( )
abstract

Returns the tilt of map in degrees. The tilt controls the perspective at which the map is viewed. A value of 0 degrees corresponds to looking straight down at the map from above (2D). As the tilt value is increased,the view shifts to a 3D perspective.

The tilt of the map may be further constrained at some zoom levels. For example,no tilt is allowed at the lowest zoom levels when the globe is visible. This is to provide a better user experience when interacting with globe,since viewing a "tilted" globe does give any benefit.

Returns
Tilt in degrees
abstract float com.sygic.sdk.map.Camera.CameraModel.getZoomLevel ( )
abstract

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. Higher zoom levels give a closer view. Zoom level values must be in the range returned by getMinMaxZoomLevel() Zom level: 0 - world, 10 - city, 15 - street, 20 - buildings

Returns
The zoom level value
abstract void com.sygic.sdk.map.Camera.CameraModel.observeCallbackValues ( @NonNull final java.util.Observer  observer)
abstractprotected
abstract void com.sygic.sdk.map.Camera.CameraModel.observeCameraStateChange ( @NonNull final java.util.Observer  observer)
abstractprotected
abstract void com.sygic.sdk.map.Camera.CameraModel.observeDynamicValueChange ( @NonNull final java.util.Observer  observer)
abstractprotected
abstract void com.sygic.sdk.map.Camera.CameraModel.onCameraDestroy ( @NonNull final Camera  camera)
abstractprotected
void com.sygic.sdk.map.Camera.CameraModel.onMovementModeChanged ( final int  mode)
void com.sygic.sdk.map.Camera.CameraModel.onPositionChangeCompleted ( )
void com.sygic.sdk.map.Camera.CameraModel.onPositionChanged ( final GeoCoordinates  geoCenter,
final float  zoom,
final float  rotation,
final float  tilt 
)
abstract void com.sygic.sdk.map.Camera.CameraModel.onRestoreInstance ( @Nullable final Bundle  inState)
abstract
void com.sygic.sdk.map.Camera.CameraModel.onRotationModeChanged ( final int  mode)
abstract void com.sygic.sdk.map.Camera.CameraModel.onSaveInstance ( @Nullable final Camera  camera,
@NonNull final Bundle  outState 
)
abstract
final void com.sygic.sdk.map.Camera.CameraModel.removeModeChangedListener ( ModeChangedListener  listener)
final void com.sygic.sdk.map.Camera.CameraModel.removePositionChangedListener ( PositionChangedListener  listener)

Removes listener for Camera.PositionChangedListener methods.

Parameters
listenerCamera.PositionChangedListener
abstract boolean com.sygic.sdk.map.Camera.CameraModel.rotateBy ( final float  angle,
@NonNull final PointF  focus,
@NonNull final MapAnimation  animation 
)
abstract
final boolean com.sygic.sdk.map.Camera.CameraModel.rotateBy ( final float  angle,
@NonNull final PointF  focus 
)
abstract void com.sygic.sdk.map.Camera.CameraModel.setCameraState ( final CameraState  cameraState)
abstract
abstract void com.sygic.sdk.map.Camera.CameraModel.setLocalRotation ( @NonNull final Point3F  angles,
@NonNull final MapAnimation  animation 
)
abstract

Rotates orientation of a camera on each axis

Parameters
anglesAngle of rotation in degrees for each axis
animationSetters animation
abstract void com.sygic.sdk.map.Camera.CameraModel.setLocalTranslation ( @NonNull final Point3F  offset,
@NonNull final MapAnimation  animation 
)
abstract

Offsets position of a camera on each axis

Parameters
offsetLocal translation in meters for each axis
animationSetters animation
abstract void com.sygic.sdk.map.Camera.CameraModel.setMapCenterSettings ( final MapCenterSettings  settings,
@NonNull final MapAnimation  animation 
)
abstract

Sets the map center (point for rotation axis and vehicle position) for locked and unlocked map state.

final void com.sygic.sdk.map.Camera.CameraModel.setMapCenterSettings ( final MapCenterSettings  settings)
abstract void com.sygic.sdk.map.Camera.CameraModel.setMapPadding ( final RectF  rect,
@NonNull final MapAnimation  animation 
)
abstract
abstract void com.sygic.sdk.map.Camera.CameraModel.setMapPadding ( final float  left,
final float  top,
final float  right,
final float  bottom,
@NonNull final MapAnimation  animation 
)
abstract
final void com.sygic.sdk.map.Camera.CameraModel.setMapPadding ( final RectF  rect)
final void com.sygic.sdk.map.Camera.CameraModel.setMapPadding ( final float  left,
final float  top,
final float  right,
final float  bottom 
)
abstract void com.sygic.sdk.map.Camera.CameraModel.setMapRectangle ( @NonNull final MapRectangle  mapRectangle,
@NonNull final MapAnimation  animation 
)
abstract
abstract void com.sygic.sdk.map.Camera.CameraModel.setMapRectangle ( @NonNull final GeoBoundingBox  boundingBox,
@FloatRange(from=0.0, to=1.0) final float  leftMarginPerc,
@FloatRange(from=0.0, to=1.0) final float  topMarginPerc,
@FloatRange(from=0.0, to=1.0) final float  rightMarginPerc,
@FloatRange(from=0.0, to=1.0) final float  bottomMarginPerc,
@NonNull final MapAnimation  animation 
)
abstract
abstract void com.sygic.sdk.map.Camera.CameraModel.setMapRectangle ( @NonNull final GeoBoundingBox  boundingBox,
final int  leftMarginPx,
final int  topMarginPx,
final int  rightMarginPx,
final int  bottomMarginPx,
final @NonNull MapAnimation  animation 
)
abstract
final void com.sygic.sdk.map.Camera.CameraModel.setMapRectangle ( @NonNull final MapRectangle  mapRectangle)
final void com.sygic.sdk.map.Camera.CameraModel.setMapRectangle ( @NonNull final GeoBoundingBox  boundingBox,
@FloatRange(from=0.0, to=1.0) final float  leftMarginPerc,
@FloatRange(from=0.0, to=1.0) final float  topMarginPerc,
@FloatRange(from=0.0, to=1.0) final float  rightMarginPerc,
@FloatRange(from=0.0, to=1.0) final float  bottomMarginPerc 
)
final void com.sygic.sdk.map.Camera.CameraModel.setMapRectangle ( @NonNull final GeoBoundingBox  boundingBox,
final int  leftMarginPx,
final int  topMarginPx,
final int  rightMarginPx,
final int  bottomMarginPx 
)
abstract void com.sygic.sdk.map.Camera.CameraModel.setMovementMode ( @Camera.MovementMode final int  movementMode)
abstract

Sets how camera should move when the vehicle is moving - ff is following vehicle or not.

Parameters
modeCamera.MovementMode
abstract void com.sygic.sdk.map.Camera.CameraModel.setPosition ( @NonNull final GeoCoordinates  position,
@NonNull final MapAnimation  animation 
)
abstract

Move camera to given position GeoCoordinates on the map with an animation.

Parameters
positionPosition on map to move on
animationMapAnimation
final void com.sygic.sdk.map.Camera.CameraModel.setPosition ( @NonNull final GeoCoordinates  position)

Move camera to given GeoCoordinates on the map.

Parameters
positionPosition on map to move on
abstract void com.sygic.sdk.map.Camera.CameraModel.setRotation ( @FloatRange(from=-180.0, to=180.0) final float  rotation,
@NonNull final MapAnimation  animation 
)
abstract

Sets the rotation of map in degrees. By default,the map is oriented with north toward the top of the map (0 degrees). As the orientation angle increases,the map rotates counter-clockwise.

Parameters
rotationRotation in degrees
animationMapAnimation
final void com.sygic.sdk.map.Camera.CameraModel.setRotation ( @FloatRange(from=-180.0, to=180.0) final float  rotation)

Sets the rotation of map in degrees

Parameters
rotationRotation in degrees
abstract void com.sygic.sdk.map.Camera.CameraModel.setRotationMode ( @Camera.RotationMode final int  rotationMode)
abstract

Sets how the camera rotation should behave when the vehicle is moving.

Parameters
modeCamera.RotationMode
abstract void com.sygic.sdk.map.Camera.CameraModel.setTilt ( @FloatRange(from=0, to=90) final float  tilt,
@NonNull final MapAnimation  animation 
)
abstract

Sets the tilt of map in degrees with an animation. The tilt controls the perspective at which the map is viewed. A value of 0 degrees corresponds to looking straight down at the map from above (2D). As the tilt value is increased,the view shifts to a 3D perspective.

The tilt of the map may be further constrained at some zoom levels. For example,no tilt is allowed at the lowest zoom levels when the globe is visible. This is to provide a better user experience when interacting with globe,since viewing a "tilted" globe does give any benefit.

Parameters
tiltTilt in degrees
animationMapAnimation
final void com.sygic.sdk.map.Camera.CameraModel.setTilt ( @FloatRange(from=0, to=90) final float  tilt)
abstract void com.sygic.sdk.map.Camera.CameraModel.setZoomLevel ( @FloatRange(from=0, to=Float.MAX_VALUE) final float  zoom,
@NonNull final MapAnimation  animation 
)
abstract

Sets the zoom value from range (0 - 20.0). The zoom level determines how "close" the map view is to the surface of the Earth. Higher zoom levels give a closer view. Zoom level values must be in the range returned by getMinMaxZoomLevel() Zoom level: 0 - world, 10 - city, 15 - street, 20 - buildings

Parameters
zoomZoom level value
animationMapAnimation
final void com.sygic.sdk.map.Camera.CameraModel.setZoomLevel ( @FloatRange(from=0, to=Float.MAX_VALUE) final float  zoom)

Sets the zoom value from range (0 - 20.0). The zoom level determines how "close" the map view is to the surface of the Earth. Higher zoom levels give a closer view. Zoom level values must be in the range returned by getMinMaxZoomLevel() Zom level: 0 - world, 10 - city, 15 - street, 20 - buildings

Parameters
zoomZoom level value
abstract boolean com.sygic.sdk.map.Camera.CameraModel.tiltBy ( final float  angle,
@NonNull final MapAnimation  animation 
)
abstract
final boolean com.sygic.sdk.map.Camera.CameraModel.tiltBy ( final float  angle)
abstract boolean com.sygic.sdk.map.Camera.CameraModel.zoomBy ( final float  scale,
@NonNull final PointF  focus,
@NonNull final MapAnimation  animation 
)
abstract
final boolean com.sygic.sdk.map.Camera.CameraModel.zoomBy ( final float  scale,
@NonNull final PointF  focus 
)

The documentation for this class was generated from the following file: