SitumMapsLibrary
public class SitumMapsLibrary : SitumMap
Class used to load the wayfinding module on a given view
-
Initializes the library and checks the user’s credentials.
Declaration
Swift
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
-
Loads the Wayfinding UI in the assigned view and shows the selected building
Declaration
Swift
public func load(buildingWithId buildingId: String = "", logWith credentials: Credentials)
Parameters
buildingId
Id of the building to be load
credentials
Intance of Credentials object containing the user’s credentials
-
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