Skip to content

CLASS

IPSNavigation

public class IPSNavigation: NSObject

This class represents the Indoor Positioning System (IPS) Navigation Client. It is the element by which all communication with the IPS navigation engine is performed and all services are delivered. The main service is a navigation engine that provides directions for navigating on a map.

  • Since: 2.8.0

Properties

isLimitedConnectionSupported

@objc public static var isLimitedConnectionSupported: Bool

This property indicates if Oriient navigation system can currently perform without a stable internet connection.

  • Since: 4.3.0

finalLiveNavigationWaypoint

@objc public static var finalLiveNavigationWaypoint: IPSWaypoint?
  • Allow to set the last navigation waypoint.
  • Once set, the path will be optimized so that all the waypoints will be visited first and in the end the final one will be reached.

  • Since: 5.2.0

Methods

angle(from:to:)

@objc public static func angle(from userPosition: IPSPosition, to coordinate: IPSCoordinate) -> CGFloat

A helper method to calculate angle from user position to a coordinate. Takes heading into consideration - Since: 2.8.0

findRouteInBuilding(_:options:waypoints:finalWaypoint:onRouteReceived:onError:)

@objc public static func findRouteInBuilding(_ buildingId: String, options: IPSNavigationOptions? = nil, waypoints: [IPSWaypoint], finalWaypoint: IPSWaypoint? = nil, onRouteReceived: @escaping (IPSRoute) -> Void, onError: @escaping (_ error: IPSError) -> Void) -> IPSCancellable

This method calculates a route to navigate between the IPSWaypoints in the building.

  • Since: 2.11.0

  • Parameters:

  • buildingId: the ID for the building in which the route is requested;
  • options: constraints on the requested route;
  • waypoints: the locations through which the route should pass;
  • finalWaypoint: the location that should be visited last;
  • onRouteReceived: closure with successfully found route;
  • onError: closure will be called in case of error.

Parameters

Name Description
buildingId the ID for the building in which the route is requested;
options constraints on the requested route;
waypoints the locations through which the route should pass;
finalWaypoint the location that should be visited last;
onRouteReceived closure with successfully found route;
onError closure will be called in case of error.

setLiveNavigationWaypoints(_:)

@objc public static func setLiveNavigationWaypoints(_ waypoints: [IPSWaypoint])
  • This method sets the locations to which the live navigation service should provide route.
  • The order of the waypoints on the live navigation route will be decided by the navigation engine, the route starts from the last known device position.
  • Use IPSNavigation.addLiveNavigationObserver(_:) to receive live navigation updates.
  • Use IPSNavigation.setLiveNavigationEnabled(_:) to enable/disable the service.
  • Note: all the waypoints coordinates are assumed to be in the current positioning building and will not be cleared when it changes.
  • It is your responsibility to clear them when the building changes if you wish to do so.

  • Since: 2.11.0

  • Parameters:

  • waypoints: the locations to which the live navigation service should provide route.

setLiveNavigationOptions(_:)

@objc public static func setLiveNavigationOptions(_ options: IPSNavigationOptions?)

This method sets the constraints for the routes provided by the live navigation service.

  • Since: 2.11.0

  • Parameters:

  • options: the constraints for the routes provided by the live navigation service.

Parameters

Name Description
options the constraints for the routes provided by the live navigation service.

getLiveNavigationOptions()

@objc public static func getLiveNavigationOptions() -> IPSNavigationOptions?
  • Since: 2.11.0

  • Returns: the constraints currently applied to the routes provided by the live navigation service.

getLiveNavigationWaypoints()

@objc public static func getLiveNavigationWaypoints() -> [IPSWaypoint]
  • Since: 2.11.0
  • Returns: the waypoints currently used by the live navigation service.

setTurnByTurnNavigationEnabled(_:)

@objc public static func setTurnByTurnNavigationEnabled(_ enabled: Bool)

Experimental API * Please be aware that the following function is considered experimental and subject to potential changes or removal in future updates. * Used to disable or enable turn by turn navigation. Turn by turn navigation is disabled by default. - Since: 4.3.0

  • Parameters:
    • enabled: true to receive turn by turn navigation instructions updates on the IPSLiveNavigationObserver
  • or false to stop receiving them. See also IPSNavigation.addLiveNavigationObserver(_:).

isTurnByTurnNavigationEnabled()

@objc public static func isTurnByTurnNavigationEnabled() -> Bool

Experimental API * Please be aware that the following function is considered experimental and subject to potential changes or removal in future updates. - Since: 4.3.0 - Returns: true if IPSLiveNavigationObserver will receive turn by turn navigation instructions updates.

setLiveNavigationEnabled(_:)

@objc public static func setLiveNavigationEnabled(_ enabled: Bool)

Used to disable or re-enable live navigation. Live navigation is enabled by default.

  • Since: 2.11.0

  • Parameters:

  • enabled: true to receive live navigation updates on the IPSLiveNavigationObserver
  • or false to stop receiving them. See also IPSNavigation.addLiveNavigationObserver(_:).

Parameters

Name Description
enabled true to receive live navigation updates on the IPSLiveNavigationObserver

isLiveNavigationEnabled()

@objc public static func isLiveNavigationEnabled() -> Bool
  • Since: 2.11.0
  • Returns: true if IPSLiveNavigationObserver will receive live navigation updates.

addLiveNavigationObserver(_:)

@objc public static func addLiveNavigationObserver(_ observer: IPSLiveNavigationObserver)
  • This method will request the IPS engine to start providing live navigation updates on the IPSLiveNavigationObserver.
  • The live navigation route starts from the current device position and passes all the waypoints provided
  • in IPSNavigation.setLiveNavigationWaypoints(_:).
  • The order of the waypoints on the navigation route will be decided by the navigation engine.
  • The navigation route updates every time the IPSPositioning.getLastKnownPosition() changes
  • significantly or new live navigation waypoints/options are provided.
  • Use IPSNavigation.setLiveNavigationEnabled(_:) to enable/disable live navigation service.
  • Note: The live navigation service takes into consideration the IPSPosition.lockProgress of the device position.
  • If the position is not locked the route will not be recalculated.

  • Since: 2.11.0

  • Parameters:

  • observer: the observer to receive the live navigation updates.

removeLiveNavigationObserver(_:)

@objc public static func removeLiveNavigationObserver(_ observer: IPSLiveNavigationObserver)

Use this method to stop the listener receiving live navigation updates.

  • Since: 2.11.0

addTurnByTurnNavigationObserver(_:)

public static func addTurnByTurnNavigationObserver(_ observer: IPSTurnByTurnNavigationObserver)

Use this method to add the listener receiving live turnbyturn navigation updates.

  • Since: 9.7.0

removeTurnByTurnNavigationObserver(_:)

public static func removeTurnByTurnNavigationObserver(_ observer: IPSTurnByTurnNavigationObserver)

Use this method to stop the listener receiving live turnbyturn navigation updates.

  • Since: 9.7.0