PROTOCOL
IPSRoute
@objc public protocol IPSRoute
This class holds all the information needed to instruct the user in the way to collect all the waypoints as requested from the navigation server.
- Since: 2.8.0
Properties
routeCoordinates
var routeCoordinates: [IPSCoordinateInBuilding]
- Since: 2.8.0
the coordinates along the route. Connecting these coordinates will create the route which the user has to pass in order to collect all the waypoints.
waypoints
var waypoints: [IPSWaypoint]
Waypoints represent points of interest along the route. The route represents the fastest way to visit all the waypoints. Every waypoint has a corresponding coordinate and floor order. The route will end at the last waypoint. All the waypoints are on the route.
-
Since: 2.8.0
-
Returns: the waypoints along the route.
floorTransitions
var floorTransitions: [IPSRouteFloorTransition]
- Since: 2.11.0
The list of floor transitions which should be taken along this navigation route. Every transition has a corresponding coordinates and information about departure and destination floor.
nextTurn
var nextTurn: IPSTurn?
Experimental API Please be aware that the following function is considered experimental and subject to potential changes or removal in future updates. - Since: 4.2.0
Closest possible turn in this route
Methods
distanceFromStart(to:)
func distanceFromStart(to waypoint: IPSWaypoint) -> CGFloat
This method will return the distance in meter from the beginning of the route to
the provided waypoint as calculated by walking along the route.
-1 will be returned if the waypoint is not on the route.
see IPSRoute.isWaypointOnRoute(:_).
-
Since: 2.8.0
-
Parameters:
-
waypoint: the waypoint to which to calculate the distance.
-
Returns: the distance in meters from the starting point till the provided waypoint or -1 if the waypoint isn't on the route.
Parameters
| Name | Description |
|---|---|
| waypoint | the waypoint to which to calculate the distance. |
isWaypointOnRoute(_:)
func isWaypointOnRoute(_ waypoint: IPSWaypoint) -> Bool
- Since: 2.8.0
is the waypoint in the routeCoordinates
indexOnRoute(of:)
func indexOnRoute(of waypoint: IPSWaypoint) -> Int
- Since: 2.8.0
index of the waypoint in the routeCoordinates if the waypoint is not on the route returns -1
distanceFromStartToFloorTransition(_:)
func distanceFromStartToFloorTransition(_ floorTransition: IPSRouteFloorTransition) -> CGFloat
This method will return the distance in meter from the beginning of the route to
the provided floor transition as calculated by walking along the route.
-1 will be returned if the waypoint is not on the route.
see IPSRoute.isFloorTransitionOnRoute(:_).
-
Since: 2.11.0
-
Parameters:
-
floorTransition: the floor transition to which to calculate the distance.
-
Returns: the distance in meters from the starting point till the provided floor transition or -1 if the floor transition isn't on the route.
Parameters
| Name | Description |
|---|---|
| floorTransition | the floor transition to which to calculate the distance. |
isFloorTransitionOnRoute(_:)
func isFloorTransitionOnRoute(_ floorTransition: IPSRouteFloorTransition) -> Bool
- Since: 2.11.0
is the floor transitions in the routeCoordinates