Class AreaCameraBehavior

java.lang.Object
com.here.NativeBase
com.here.sdk.navigation.AreaCameraBehavior
All Implemented Interfaces:
CameraBehavior

public final class AreaCameraBehavior extends NativeBase implements 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 Details

    • AreaCameraBehavior

      public AreaCameraBehavior()

      Creates a new instance of this class.

  • Method Details

    • setVisiblePoints

      public void setVisiblePoints(@NonNull List<GeoCoordinates> visiblePoints)

      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

      @NonNull public List<GeoCoordinates> getVisiblePoints()

      Gets configured visible geo points.

      Returns:

      The list of geo points to show in the camera view. The list can be empty.

    • getViewRectangle

      @Nullable public Rectangle2D 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

      public void setViewRectangle(@Nullable Rectangle2D value)

      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

      @NonNull public Duration 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

      public void setCameraAnimationDuration(@NonNull Duration value)

      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

      @NonNull public Duration 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

      public void setPrincipalPointAnimationDuration(@NonNull Duration value)

      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

      @NonNull public MapMeasure getMaxZoom()

      Gets maximal allowed zoom.

      Defines maximal zoom level to be applied to enclose geodetic bounding box. Defaults to a MapMeasure with kind MapMeasure.Kind.ZOOM_LEVEL and value 20.0.

      Returns:

      Maximal allowed zoom.

    • setMaxZoom

      public void setMaxZoom(@NonNull MapMeasure value)

      Sets maximal allowed zoom.

      Defines maximal zoom level to be applied to enclose geodetic bounding box. Defaults to a MapMeasure with kind MapMeasure.Kind.ZOOM_LEVEL and 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 false will 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 to false or 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 false will 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 to false or it will try to include the current position. Defaults to false.

      Parameters:
      value -

      Include current position in camera view.

    • getNormalizedPrincipalPoint

      @NonNull public Anchor2D 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:
      getNormalizedPrincipalPoint in interface CameraBehavior
      Returns:

      The normalized principal point.

    • setNormalizedPrincipalPoint

      public void setNormalizedPrincipalPoint(@NonNull Anchor2D value)

      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:
      setNormalizedPrincipalPoint in interface CameraBehavior
      Parameters:
      value -

      The normalized principal point.