AreaCameraBehavior (API Reference)
Class AreaCameraBehavior
- All Implemented Interfaces:
CameraBehavior
Use this class to show an overview of geo points. By default, the orientation of the camera will be perpendicular to the Earth's surface (ie. looking towards the center of the Earth), while bearing will be towards north.
Note: This is a beta feature; there maybe bugs and unexpected behavior. Related API's are subject to change without a deprecation process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the current animation duration in milliseconds.doubleGets the current camera bearing.doubleGets the current camera tilt.Gets maximal allowed zoom.Gets the currently set normalized principal point to be used during navigation.Gets the current principal point animation duration in milliseconds.Gets the current view rectangle, if it's set.Gets configured visible geo points.booleanGets whether to include the current position.voidSets the current animation duration in milliseconds.voidsetCameraBearingInDegrees(double value) Sets camera bearing.voidsetCameraTiltInDegrees(double value) Sets camera tilt.voidsetCurrentPositionIncluded(boolean value) Sets whether to include the current position.voidsetMaxZoom(MapMeasure value) Sets maximal allowed zoom.voidSets a normalized principal point to be used during navigation.voidSets the current principal point animation in milliseconds.voidsetViewRectangle(Rectangle2D value) Sets view rectangle.voidsetVisiblePoints(List<GeoCoordinates> visiblePoints) Sets the list of geo points to show in the camera view.
-
Constructor Details
-
AreaCameraBehavior
public AreaCameraBehavior()Creates a new instance of this class.
-
-
Method Details
-
setVisiblePoints
Sets the list of geo points to show in the camera view.
- Parameters:
visiblePoints-The list of geo points to visualize. The list can be empty.
-
getVisiblePoints
Gets configured visible geo points.
- Returns:
The list of geo points to show in the camera view. The list can be empty.
-
getViewRectangle
Gets the current view rectangle, if it's set.
Defines a sub-space of the screen that the behavior should consider for camera updates. Defaults to
null. If not set, it uses the viewport bounds of the underlying map view.- Returns:
The view rectangle for camera updates.
-
setViewRectangle
Sets view rectangle.
Defines a sub-space of the screen that the behavior should consider for camera updates. Defaults to
null. If not set, it uses the viewport bounds of the underlying map view.- Parameters:
value-The view rectangle for camera updates.
-
getCameraAnimationDuration
Gets the current animation duration in milliseconds.
If there is an animation, it will last for specified period of time. Defaults to 500 milliseconds, or half a second.
- Returns:
The duration of camera animation in milliseconds.
-
setCameraAnimationDuration
Sets the current animation duration in milliseconds.
If there is an animation, it will last for specified period of time. Defaults to 500 milliseconds, or half a second.
- Parameters:
value-The duration of camera animation in milliseconds.
-
getPrincipalPointAnimationDuration
Gets the current principal point animation duration in milliseconds.
If the principal point is changed, the change will be animated over this duration. Defaults to 500 milliseconds, or half a second.
- Returns:
The duration of principal point animation in milliseconds.
-
setPrincipalPointAnimationDuration
Sets the current principal point animation in milliseconds.
If the principal point is changed, the change will be animated over this duration. Defaults to 500 milliseconds, or half a second.
- Parameters:
value-The duration of principal point animation in milliseconds.
-
getMaxZoom
Gets maximal allowed zoom.
Defines maximal zoom level to be applied to enclose geodetic bounding box. Defaults to a
MapMeasurewith kindMapMeasure.Kind.ZOOM_LEVELand value 20.0.- Returns:
Maximal allowed zoom.
-
setMaxZoom
Sets maximal allowed zoom.
Defines maximal zoom level to be applied to enclose geodetic bounding box. Defaults to a
MapMeasurewith kindMapMeasure.Kind.ZOOM_LEVELand value 20.0.- Parameters:
value-Maximal allowed zoom.
-
getCameraBearingInDegrees
public double getCameraBearingInDegrees()Gets the current camera bearing.
The direction in which the camera will point in degrees clockwise, relative to true North. The input should range between [0, 360]. Defaults to true North (0 degrees).
- Returns:
Camera bearing in degrees.
-
setCameraBearingInDegrees
public void setCameraBearingInDegrees(double value) Sets camera bearing.
The direction in which the camera will point in degrees clockwise, relative to true North. The input should range between [0, 360]. Defaults to true North (0 degrees).
- Parameters:
value-Camera bearing in degrees.
-
getCameraTiltInDegrees
public double getCameraTiltInDegrees()Gets the current camera tilt.
The tilt of the camera relative to the axis perpendicular to the ground. Defaults to 0 degrees, meaning that it will look straight down into the ground.
- Returns:
Camera tilt in degrees.
-
setCameraTiltInDegrees
public void setCameraTiltInDegrees(double value) Sets camera tilt.
The tilt of the camera relative to the axis perpendicular to the ground. Defaults to 0 degrees, meaning that it will look straight down into the ground.
- Parameters:
value-Camera tilt in degrees.
-
isCurrentPositionIncluded
public boolean isCurrentPositionIncluded()Gets whether to include the current position.
Decides if the current position should be added to the set of visible points. Note that if the current position is in the vicinity of any of the visible points, setting this to
falsewill not explicitly exclude the current position from the camera view. However if displaying an area potentially away from the current position, this does need to be explicitly set tofalseor it will try to include the current position. Defaults to false.- Returns:
Include current position in camera view.
-
setCurrentPositionIncluded
public void setCurrentPositionIncluded(boolean value) Sets whether to include the current position.
Decides if the current position should be added to the set of visible points. Note that if the current position is in the vicinity of any of the visible points, setting this to
falsewill not explicitly exclude the current position from the camera view. However if displaying an area potentially away from the current position, this does need to be explicitly set tofalseor it will try to include the current position. Defaults to false.- Parameters:
value-Include current position in camera view.
-
getNormalizedPrincipalPoint
Gets the currently set normalized principal point to be used during navigation.
Normalized principal point to be used during navigation. Defaults to (0.5, 0.775), which means the camera will use the position slightly at the bottom of the mapview.
- Specified by:
getNormalizedPrincipalPointin interfaceCameraBehavior- Returns:
The normalized principal point.
-
setNormalizedPrincipalPoint
Sets a normalized principal point to be used during navigation.
Normalized principal point to be used during navigation. Defaults to (0.5, 0.775), which means the camera will use the position slightly at the bottom of the mapview.
- Specified by:
setNormalizedPrincipalPointin interfaceCameraBehavior- Parameters:
value-The normalized principal point.
-