Classes | |
class | BatchAnimation |
interface | CameraListener |
class | CameraModel |
interface | ModeChangedListener |
interface | MovementMode |
interface | PositionChangedListener |
interface | RotationMode |
Public Member Functions | |
boolean | isValid () |
void | setPosition (final @NonNull GeoCoordinates position, final @NonNull MapAnimation animation) |
GeoCoordinates | getPosition () |
GeoBoundingBox | getMapRectangle () |
void | setMapRectangle (final @NonNull MapRectangle rectangle) |
void | setMapRectangle (final @NonNull MapRectangle rectangle, final @NonNull MapAnimation animation) |
CameraState.PositionOrientation | calculateFromMapRectangle (@NonNull final MapRectangle mapRectangle, @NonNull final MapCenter mapCenter, @FloatRange(from=-180.0, to=180.0) final float rotation, final float tilt, @FloatRange(from=0.0, to=Float.MAX_VALUE) final float maxZoomLevel) |
void | setZoomLevel (@FloatRange(from=0.0, to=Float.MAX_VALUE) final float zoomLevel, final @NonNull MapAnimation animation) |
float | getZoomLevel () |
Pair< Float, Float > | getMinMaxZoomLevel () |
void | zoomBy (final float scale, final @NonNull PointF focus, final @NonNull MapAnimation animation) |
void | drag (final float xFrom, final float yFrom, final float xTo, final float yTo, final MapAnimation animation) |
void | dragBy (final float x, final float y, final MapAnimation animation) |
void | tiltBy (final float angle, final MapAnimation animation) |
void | rotateBy (final float angle, final @NonNull PointF focus, final @NonNull MapAnimation animation) |
void | setRotation (@FloatRange(from=-180.0, to=180.0) final float rotation, final @NonNull MapAnimation animation) |
float | getRotation () |
void | setTilt (final float tilt, final @NonNull MapAnimation animation) |
float | getTilt () |
void | setCameraRotationMode (@Camera.RotationMode int mode) |
.RotationMode int | getCameraRotationMode () |
void | setCameraMovementMode (@Camera.MovementMode int mode) |
.MovementMode int | getCameraMovementMode () |
void | setMapCenterSettings (@NonNull final MapCenterSettings settings, final @NonNull MapAnimation initialAnim) |
MapCenter | getMapCenter () |
MapCenterSettings | getMapCenterSettings () |
void | setMapPadding (final @NonNull RectF padding, final @NonNull MapAnimation anim) |
RectF | getMapPadding () |
void | setLocalTranslation (final @NonNull Point3F point, final @NonNull MapAnimation anim) |
Point3F | getLocalTranslation () |
void | setLocalRotation (final @NonNull Point3F point, final @NonNull MapAnimation anim) |
Point3F | getLocalRotation () |
Represents a composite class comprised of tilt, orientation, zoom level and center point for a Map.
CameraState.PositionOrientation com.sygic.sdk.map.Camera.calculateFromMapRectangle | ( | @NonNull final MapRectangle | mapRectangle, |
@NonNull final MapCenter | mapCenter, | ||
@FloatRange(from=-180.0, to=180.0) final float | rotation, | ||
final float | tilt, | ||
@FloatRange(from=0.0, to=Float.MAX_VALUE) final float | maxZoomLevel | ||
) |
Calculates CameraState.PositionOrientation to animate Camera with, given mapRectangle and camera states
mapRectangle | Rectangle with margins to be zoomed to |
mapCenter | Wanted map center state |
rotation | Wanted rotation state |
tilt | Wanted tilt state |
maxZoomLevel | Maximum zoom level allowed (ie. limits zoom in of the map) |
void com.sygic.sdk.map.Camera.drag | ( | final float | xFrom, |
final float | yFrom, | ||
final float | xTo, | ||
final float | yTo, | ||
final MapAnimation | animation | ||
) |
void com.sygic.sdk.map.Camera.dragBy | ( | final float | x, |
final float | y, | ||
final MapAnimation | animation | ||
) |
.MovementMode int com.sygic.sdk.map.Camera.getCameraMovementMode | ( | ) |
Returns mode how camera should move when the vehicle is moving - if it is following the vehicle or not.
.RotationMode int com.sygic.sdk.map.Camera.getCameraRotationMode | ( | ) |
Returns mode how the camera rotation should behave when the vehicle is moving.
Point3F com.sygic.sdk.map.Camera.getLocalRotation | ( | ) |
Point3F com.sygic.sdk.map.Camera.getLocalTranslation | ( | ) |
MapCenter com.sygic.sdk.map.Camera.getMapCenter | ( | ) |
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
MapCenterSettings com.sygic.sdk.map.Camera.getMapCenterSettings | ( | ) |
Return the point of map on the screen which will be recognized as map center for rotation and vehicle position
RectF com.sygic.sdk.map.Camera.getMapPadding | ( | ) |
Return current map padding
GeoBoundingBox com.sygic.sdk.map.Camera.getMapRectangle | ( | ) |
Pair<Float, Float> com.sygic.sdk.map.Camera.getMinMaxZoomLevel | ( | ) |
Returns the minimum a maximum value of zoom levels
GeoCoordinates com.sygic.sdk.map.Camera.getPosition | ( | ) |
Return camera GeoCoordinates on the map.
float com.sygic.sdk.map.Camera.getRotation | ( | ) |
Return 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.
float com.sygic.sdk.map.Camera.getTilt | ( | ) |
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.
float com.sygic.sdk.map.Camera.getZoomLevel | ( | ) |
Returns the zoom value from range (0 - 20.0) with an animation. 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
boolean com.sygic.sdk.map.Camera.isValid | ( | ) |
Check if the camera object is valid. It is invalidated after MapFragment is destroyed. When invalid, all setters do nothing and all getters return 0, null or invalid object.
void com.sygic.sdk.map.Camera.rotateBy | ( | final float | angle, |
final @NonNull PointF | focus, | ||
final @NonNull MapAnimation | animation | ||
) |
void com.sygic.sdk.map.Camera.setCameraMovementMode | ( | @Camera.MovementMode int | mode | ) |
Sets how camera should move when the vehicle is moving - ff is following vehicle or not.
mode | Camera.MovementMode |
void com.sygic.sdk.map.Camera.setCameraRotationMode | ( | @Camera.RotationMode int | mode | ) |
Sets how the camera rotation should behave when the vehicle is moving.
mode | Camera.RotationMode |
void com.sygic.sdk.map.Camera.setLocalRotation | ( | final @NonNull Point3F | point, |
final @NonNull MapAnimation | anim | ||
) |
void com.sygic.sdk.map.Camera.setLocalTranslation | ( | final @NonNull Point3F | point, |
final @NonNull MapAnimation | anim | ||
) |
void com.sygic.sdk.map.Camera.setMapCenterSettings | ( | @NonNull final MapCenterSettings | settings, |
final @NonNull MapAnimation | initialAnim | ||
) |
Sets the map center (point for rotation axis and vehicle position) for locked and unlocked map state.
void com.sygic.sdk.map.Camera.setMapPadding | ( | final @NonNull RectF | padding, |
final @NonNull MapAnimation | anim | ||
) |
Sets the padding of the map from left, top, right and bottom.
padding | values for padding in pixels |
anim | MapAnimation |
void com.sygic.sdk.map.Camera.setMapRectangle | ( | final @NonNull MapRectangle | rectangle | ) |
Sets the position to rectangle on map specified by MapRectangle rectangle with margin.
rectangle | Rectangle with margins to be zoomed to |
void com.sygic.sdk.map.Camera.setMapRectangle | ( | final @NonNull MapRectangle | rectangle, |
final @NonNull MapAnimation | animation | ||
) |
Sets the position to rectangle on map specified by MapRectangle rectangle with margin.
rectangle | Rectangle with margins to be zoomed to |
animation | MapAnimation |
void com.sygic.sdk.map.Camera.setPosition | ( | final @NonNull GeoCoordinates | position, |
final @NonNull MapAnimation | animation | ||
) |
Move camera to given position GeoCoordinates on the map with an animation.
position | Position on map to move on |
animation | MapAnimation |
void com.sygic.sdk.map.Camera.setRotation | ( | @FloatRange(from=-180.0, to=180.0) final float | rotation, |
final @NonNull MapAnimation | animation | ||
) |
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 so that at 90 degrees.
rotation | Rotation in degrees |
animation | MapAnimation |
void com.sygic.sdk.map.Camera.setTilt | ( | final float | tilt, |
final @NonNull MapAnimation | animation | ||
) |
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.
tilt | Tilt in degrees |
animation | MapAnimation |
void com.sygic.sdk.map.Camera.setZoomLevel | ( | @FloatRange(from=0.0, to=Float.MAX_VALUE) final float | zoomLevel, |
final @NonNull MapAnimation | animation | ||
) |
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
zoomLevel | Zoom level value |
animation | MapAnimation |
void com.sygic.sdk.map.Camera.tiltBy | ( | final float | angle, |
final MapAnimation | animation | ||
) |
void com.sygic.sdk.map.Camera.zoomBy | ( | final float | scale, |
final @NonNull PointF | focus, | ||
final @NonNull MapAnimation | animation | ||
) |