Class SpeedBasedCameraBehavior

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

public final class SpeedBasedCameraBehavior extends NativeBase implements CameraBehavior

Use this class to follow the current location of the user, zooming in and out and changing camera tilt according to the current speed.

  • Constructor Details

    • SpeedBasedCameraBehavior

      public SpeedBasedCameraBehavior()

      Creates a new instance of this class.

  • Method Details

    • setProfile

      public void setProfile(@NonNull List<SpeedBasedCameraBehavior.ProfileValue> profile)

      Sets the profile. The speed ranges within the profile can overlap in order to prevent oscillations between adjacent levels. Provided profile must satisfy following conditions:

      • profile must not be empty
      • each speed range must be valid (fromMetersPerSecond must be less then toMetersPerSecond)
      • ranges must be sorted by fromMetersPerSecond and toMetersPerSecond
      • gaps between ranges are not allowed Invalid profile will be rejected and error message logged with explanation of violated restriction.
      Parameters:
      profile -

      The new profile value.

    • getProfile

      @NonNull public List<SpeedBasedCameraBehavior.ProfileValue> getProfile()

      Gets the profile. The speed ranges within the profile can overlap in order to prevent oscillations between adjacent levels.

      Returns:

      The profile.

    • default3DProfile

      @NonNull public static List<SpeedBasedCameraBehavior.ProfileValue> default3DProfile()
      Returns:

      the default 3D profile.

    • default2DProfile

      @NonNull public static List<SpeedBasedCameraBehavior.ProfileValue> default2DProfile()
      Returns:

      the default 2D profile.

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