SitumMap
public protocol SitumMap
Protocol implemented by SitumMapsLibrary
-
Provides the GMSMapView instance used inside the Wayfinding view
Declaration
Swift
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.
Declaration
Swift
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
Declaration
Swift
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
Declaration
Swift
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
Declaration
Swift
func addNavigationRequestInterceptor(_ interceptor: @escaping (SITNavigationRequest) -> Void)
Parameters
interceptor
Closure that will be executed with the navigation request as its parameter before starting the navigation
-
Sets a delegate gets notified when there are changes in the selection, deselection of a POI
Declaration
Swift
func setOnPoiSelectionListener(listener: OnPoiSelectionListener?)
-
Sets a delegate that gets notified about changes in the selected floor.
Declaration
Swift
func setOnFloorChangeListener(listener: OnFloorChangeListener?)
-
Sets a delegate that get notified when the map is ready to interact with and fully loaded.
Declaration
Swift
func setOnMapReadyListener(listener: OnMapReadyListener?)
Parameters
listener
OnMapReadyListener
-
Sets a delegate that get notified with events related to Navigation
Declaration
Swift
func setOnNavigationListener(listener: OnNavigationListener?)
Parameters
listener
OnNavigationChangeListener
-
Sets a delegate that get notified with events related to changes on Custom POIs
Declaration
Swift
func setOnCustomPoiChangeListener(listener: OnCustomPoiChangeListener?)
Parameters
listener
OnCustomPoiChangeListener
-
Select a given poi. This method will perform the proper actions over the User Interface to make that Poi the selected one
Declaration
Swift
func selectPoi(poi: SITPOI, completion: @escaping (Result<Void, Error>) -> Void)
Parameters
poi
the SITPOI you want to select
completion
callback called when operation complete either successfully or with an error
-
Start the navigation to a poi in the current building. This will:
- Start the positioning if needed
- Calculate and draw the route from the current user location to the poi.
- Provide the step-by-step instructions to reach the poi.
- poi: navigation goes toward this SITPOI
Declaration
Swift
func navigateToPoi(poi: SITPOI)
Parameters
poi
navigation goes toward this SITPOI
-
Start the navigation to a given a location in the current building. The location will be determined by its floor, its latitude and its longitude. This will:
- Start the positioning if needed
- Calculate and draw the route from the current user location to the location.
- Provide the step-by-step instructions to reach the location.
- floor: floor of the location
- lat: latitude of the location
- lng: longitude of the location
Declaration
Swift
func navigateToLocation(floor: SITFloor, lat: Double, lng: Double)
Parameters
floor
floor of the location
lat
latitude of the location
lng
longitude of the location
-
This method centers the map on a given building and limits the map zoom and pan to that building bounds.
Declaration
Swift
func lockCameraToBuilding(building: SITBuilding)
-
This method centers the map on a given building and limits the map zoom and pan to that building bounds.
Declaration
Swift
func lockCameraToBuilding(buildingId: String, completion: @escaping (Result<SITBuilding, WayfindingError>) -> Void)
-
This method unlock the camera and allows the user to pan outside building bounds.
Declaration
Swift
func unlockCamera()