SitumMapsLibrary
@objc
public class SitumMapsLibrary : NSObject, SitumMap
Class used to load the wayfinding module on a given view
-
Credentials object used to authenticate the user before loading the wayfinding module
Declaration
Swift
public private(set) var credentials: Credentials?
-
Initializes the library and checks the user’s credentials.
Declaration
Swift
@objc public init(containedBy view: UIView, controlledBy viewController: UIViewController)
Parameters
view
View object that will contain the wayfinding UI
viewController
View controller associated with the containing view
-
Sets the credentials that will be used to authenticate when
load(buildingWithId:, logWith:)
is calledDeclaration
Swift
@objc public func setCredentials(_ credentials: Credentials)
-
Loads the Wayfinding UI in the assigned view and shows the selected building. If no Credentials have been set, this method will throw an exception.
Declaration
Swift
@objc public func load(buildingWithId buildingId: String?) throws
Parameters
buildingId
Id of the building to be load
-
Loads the Wayfinding UI in the assigned view using the provided map and shows the selected building. If no Credentials have been set, this method will throw an exception.
Declaration
Swift
@objc public func load(buildingWithId buildingId: String?, googleMapsMap gMap: GMSMapView?) throws
Parameters
buildingId
Id of the building to be load
googleMapsMap
Map to be used to present info
-
Stops Stum Navigation
Declaration
Swift
@objc public func stopNavigation()
-
Stops Situm Positioning
Declaration
Swift
@objc public func stopPositioning()
-
Provides the GMSMapView instance used inside the Wayfinding view
Declaration
Swift
public func getGoogleMap() -> GMSMapView?
Return Value
A GMSMapView instance which is the same being used by the Wayfinding controller
-
Allows setting a closure with a custom exit segue that will be executed when the
Go back
button is pressed. You may also include operations to be done before closing the wayfinding view. If no callback is set, the wayfinding view will try to exit using NavigationController method: popViewController(animated: Bool)Declaration
Swift
public func setOnBackPressedCallback(_ callback: @escaping (_ sender: Any) -> Void)
Parameters
callback
Closure used to perform the exit segue from the wayfinding view
-
Sets an interceptor to read or modify the location request before is actually used to start positioning. Multiple interceptors can be add and they will be executed in the same order as they were set.
Declaration
Swift
public func addLocationRequestInterceptor(_ interceptor: @escaping (SITLocationRequest) -> Void)
Parameters
interceptor
Closure that will be executed with the location request as its parameter before starting the positioning
-
Sets an interceptor to read or modify the directions request before is actually used to start guiding Multiple interceptors can be add and they will be executed in the same order as they were set.
Declaration
Swift
public func addDirectionsRequestInterceptor(_ interceptor: @escaping (SITDirectionsRequest) -> Void)
Parameters
interceptor
Closure that will be executed with the directions request as its parameter before starting the guidance
-
Sets an interceptor to read or modify the navigation request before is actually used to obtain a route Multiple interceptors can be add and they will be executed in the same order as they were set.
Declaration
Swift
public func addNavigationRequestInterceptor(_ interceptor: @escaping (SITNavigationRequest) -> Void)
Parameters
interceptor
Closure that will be executed with the navigation request as its parameter before starting the navigation