Class IndoorWaypoint
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)ormake(coordinates, venue_id, level_id, stop_duration)constructors
Via Waypoint:
- Supports both
stop_durationandpass_through - Use
make(coordinates, venue_id, level_id),make(coordinates, venue_id, level_id, stop_duration), ormake(coordinates, venue_id, level_id, pass_through)constructors - When
pass_throughistrue, the route continues without stopping - When
pass_throughisfalseornull, the route stops at the waypoint - When
stop_durationis 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 Summary
ConstructorsConstructorDescriptionIndoorWaypoint(GeoCoordinates coordinates) Creates an outdoor waypoint.IndoorWaypoint(GeoCoordinates coordinates, String venueId, String levelId) Creates an indoor waypoint.IndoorWaypoint(GeoCoordinates coordinates, String venueId, String levelId, boolean passThrough) Creates a passthrough indoor waypoint (for via waypoints).IndoorWaypoint(GeoCoordinates coordinates, String venueId, String levelId, int stopDuration) Creates an indoor waypoint with stop duration. -
Method Summary
Modifier and TypeMethodDescription
-
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()tonullandisPassThrough()tonull(equivalent tofalse).- 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_throughistrue. Whenpass_throughisfalse, 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. Iffalse, the route stops at this waypoint.
-
IndoorWaypoint
Creates an outdoor waypoint.
- Parameters:
coordinates-A waypoint's geographic coordinates.
-
-
Method Details
-
getCoordinates
- Returns:
The waypoint's geographic coordinates.
-
getVenueId
- Returns:
The ID of the venue where the waypoint is located, if applicable.
-
getLevelId
- Returns:
The ID of the level where the waypoint is located, if applicable.
-
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
nullif no stop duration is specified.
-
isPassThrough
- Returns:
If
true, the route passes through this waypoint without stopping (for via waypoints). Iffalseornull, the route stops at this waypoint. Returnsnullif not explicitly set (equivalent tofalse).
-