IndoorWaypoint
public class IndoorWaypoint
extension IndoorWaypoint: NativeBase
extension IndoorWaypoint: Hashable
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_throughisfalseornil, 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.badRequest.
-
Creates an indoor waypoint. This is the basic constructor that maintains backward compatibility. Sets
IndoorWaypoint.stopDurationtonilandIndoorWaypoint.isPassThroughtonil(equivalent tofalse).Declaration
Swift
public init(coordinates: GeoCoordinates, venueId: String, levelId: String)Parameters
coordinatesA waypoint’s geographic coordinates.
venueIdAn ID of the venue where the waypoint is located.
levelIdAn ID of the level where the waypoint is located
-
Creates an indoor waypoint with stop duration.
Declaration
Swift
public init(coordinates: GeoCoordinates, venueId: String, levelId: String, stopDuration: Int32)Parameters
coordinatesA waypoint’s geographic coordinates.
venueIdAn ID of the venue where the waypoint is located.
levelIdAn ID of the level where the waypoint is located.
stopDurationThe duration in seconds to stop at this waypoint (1-49999).
-
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.Declaration
Swift
public init(coordinates: GeoCoordinates, venueId: String, levelId: String, passThrough: Bool)Parameters
coordinatesA waypoint’s geographic coordinates.
venueIdAn ID of the venue where the waypoint is located.
levelIdAn ID of the level where the waypoint is located.
passThroughIf
true, the route passes through without stopping. Iffalse, the route stops at this waypoint. -
Creates an outdoor waypoint.
Declaration
Swift
public init(coordinates: GeoCoordinates)Parameters
coordinatesA waypoint’s geographic coordinates.
-
The waypoint’s geographic coordinates.
Declaration
Swift
public var coordinates: GeoCoordinates { get } -
The ID of the venue where the waypoint is located, if applicable.
Declaration
Swift
public var venueId: String? { get } -
The ID of the level where the waypoint is located, if applicable.
Declaration
Swift
public var levelId: String? { get } -
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
nilif no stop duration is specified.Declaration
Swift
public var stopDuration: Int32? { get } -
If
true, the route passes through this waypoint without stopping (for via waypoints). Iffalseornil, the route stops at this waypoint. Returnsnilif not explicitly set (equivalent tofalse).Declaration
Swift
public var isPassThrough: Bool? { get }