Class FixedCameraBehavior

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

public final class FixedCameraBehavior extends NativeBase implements CameraBehavior

Use this class to follow the current location of the user: The camera will permanently look at the target location that was fed into the navigator instance. Since location updates happen in discrete intervals, locations in-between will be interpolated to achieve a smooth camera movement.

  • Constructor Details

    • FixedCameraBehavior

      public FixedCameraBehavior()

      Creates a new instance of this class.

  • Method Details

    • getCameraDistanceInMeters

      @Deprecated public double getCameraDistanceInMeters()
      Deprecated.

      Will be removed in v4.28.0. Use getZoom() instead.

      Gets the currently set camera distance to current location. The default value is 150 meters.

      Camera distance to current location. The default value is 150 meters.

      Returns:

      Camera distance in meters.

    • setCameraDistanceInMeters

      @Deprecated public void setCameraDistanceInMeters(double value)
      Deprecated.

      Will be removed in v4.28.0. Use getZoom() instead.

      Sets the camera distance to current location. The default value is 150 meters.

      Camera distance to current location. The default value is 150 meters.

      Parameters:
      value -

      Camera distance in meters.

    • getZoom

      @NonNull public MapMeasure getZoom()

      Gets the current camera's zoom configuration.

      Camera zoom configuration. The default value is 150 meters.

      Returns:

      Zoom configuration. The default value is 150 meters.

    • setZoom

      public void setZoom(@NonNull MapMeasure value)

      Sets the current camera's zoom configuration.

      Camera zoom configuration. The default value is 150 meters.

      Parameters:
      value -

      Zoom configuration. The default value is 150 meters.

    • getCameraTiltInDegrees

      public double getCameraTiltInDegrees()

      Gets the currently set camera tilt with axis parallel to the ground. The default value is 50 degrees.

      The default value is 50 degrees.

      Returns:

      Camera tilt with axis parallel to the ground.

    • setCameraTiltInDegrees

      public void setCameraTiltInDegrees(double value)

      Sets camera tilt with axis parallel to the ground.

      The default value is 50 degrees.

      Parameters:
      value -

      Camera tilt with axis parallel to the ground.

    • getCameraBearingInDegrees

      @Nullable public Double getCameraBearingInDegrees()

      Gets the currently set fixed bearing.

      Optional fixed bearing, from true North (0 degrees) in clockwise direction. The valid range is [0, 360]. If set, it will prevent the map from rotating to the direction of travel. For example, a value of zero results in "north up" mode. Defaults to null, which means the camera derives the bearing from the Location, so that it points to the direction of travel. If this property is null and the device does not provide bearing, the last known value is used or zero otherwise.

      Returns:

      Camera bearing in degrees.

    • setCameraBearingInDegrees

      public void setCameraBearingInDegrees(@Nullable Double value)

      Sets an optional fixed bearing value, from true North (0 degrees) in clockwise direction.

      Optional fixed bearing, from true North (0 degrees) in clockwise direction. The valid range is [0, 360]. If set, it will prevent the map from rotating to the direction of travel. For example, a value of zero results in "north up" mode. Defaults to null, which means the camera derives the bearing from the Location, so that it points to the direction of travel. If this property is null and the device does not provide bearing, the last known value is used or zero otherwise.

      Parameters:
      value -

      Camera bearing in degrees.

    • 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.