Class IndoorWaypoint

java.lang.Object
com.here.NativeBase
com.here.sdk.venue.routing.IndoorWaypoint

public final class IndoorWaypoint extends NativeBase

Represents an indoor waypoint, used as input for indoor route calculation.

IndoorWaypoint can be used to specify the origin, destination, and via waypoints in a route request. Each waypoint type has different constraints on the supported properties:

Origin Waypoint:

  • Does NOT support stop_duration
  • Does NOT support pass_through
  • Use the basic constructor make(coordinates, venue_id, level_id)

Destination Waypoint:

  • Supports stop_duration (e.g., for specifying arrival/waiting time)
  • Does NOT support pass_through
  • Use make(coordinates, venue_id, level_id) or make(coordinates, venue_id, level_id, stop_duration) constructors

Via Waypoint:

  • Supports both stop_duration and pass_through
  • Use make(coordinates, venue_id, level_id), make(coordinates, venue_id, level_id, stop_duration), or make(coordinates, venue_id, level_id, pass_through) constructors
  • When pass_through is true, the route continues without stopping
  • When pass_through is false or null, the route stops at the waypoint
  • When stop_duration is specified, the route stops for the given duration

Validation: When a route request is made, the waypoints are validated according to the rules above. If validation fails (e.g., origin has stop_duration or pass_through, or destination has pass_through), the route request returns an error with IndoorRoutingError.BAD_REQUEST.

  • Constructor Details

    • IndoorWaypoint

      public IndoorWaypoint(@NonNull GeoCoordinates coordinates, @NonNull String venueId, @NonNull String levelId)

      Creates an indoor waypoint. This is the basic constructor that maintains backward compatibility. Sets getStopDuration() to null and isPassThrough() to null (equivalent to false).

      Parameters:
      coordinates -

      A waypoint's geographic coordinates.

      venueId -

      An ID of the venue where the waypoint is located.

      levelId -

      An ID of the level where the waypoint is located

    • IndoorWaypoint

      public IndoorWaypoint(@NonNull GeoCoordinates coordinates, @NonNull String venueId, @NonNull String levelId, int stopDuration)

      Creates an indoor waypoint with stop duration.

      Parameters:
      coordinates -

      A waypoint's geographic coordinates.

      venueId -

      An ID of the venue where the waypoint is located.

      levelId -

      An ID of the level where the waypoint is located.

      stopDuration -

      The duration in seconds to stop at this waypoint (1-49999).

    • IndoorWaypoint

      public IndoorWaypoint(@NonNull GeoCoordinates coordinates, @NonNull String venueId, @NonNull String levelId, boolean passThrough)

      Creates a passthrough indoor waypoint (for via waypoints). The route will continue through this waypoint without stopping when pass_through is true. When pass_through is false, it behaves the same as the basic constructor.

      Parameters:
      coordinates -

      A waypoint's geographic coordinates.

      venueId -

      An ID of the venue where the waypoint is located.

      levelId -

      An ID of the level where the waypoint is located.

      passThrough -

      If true, the route passes through without stopping. If false, the route stops at this waypoint.

    • IndoorWaypoint

      public IndoorWaypoint(@NonNull GeoCoordinates coordinates)

      Creates an outdoor waypoint.

      Parameters:
      coordinates -

      A waypoint's geographic coordinates.

  • Method Details

    • getCoordinates

      @NonNull public GeoCoordinates getCoordinates()
      Returns:

      The waypoint's geographic coordinates.

    • getVenueId

      @Nullable public String getVenueId()
      Returns:

      The ID of the venue where the waypoint is located, if applicable.

    • getLevelId

      @Nullable public String getLevelId()
      Returns:

      The ID of the level where the waypoint is located, if applicable.

    • getStopDuration

      @Nullable public Integer getStopDuration()
      Returns:

      The duration in seconds to stop at this waypoint (0-49999 seconds). This is typically used for destination waypoints or via waypoints to specify a waiting time. Returns null if no stop duration is specified.

    • isPassThrough

      @Nullable public Boolean isPassThrough()
      Returns:

      If true, the route passes through this waypoint without stopping (for via waypoints). If false or null, the route stops at this waypoint. Returns null if not explicitly set (equivalent to false).