SITMapViewController

Objective-C

@protocol SITMapViewController <NSObject>

Swift

protocol SITMapViewController : NSObjectProtocol

Class that acts as a controller for SITMapView and manages user interactions and map data.

  • Set the SITMapViewDirectionsOptions that will be used to calculate the following direction requests.

    Declaration

    Objective-C

    - (void)setDirectionsOptions:(nonnull SITMapViewDirectionsOptions *)options;

    Swift

    func setDirectionsOptions(_ options: SITMapViewDirectionsOptions)

    Parameters

    options

    SITMapViewDirectionsOptions instance.

  • Selects the given POI in the map.

    Declaration

    Objective-C

    - (void)selectPoi:(nonnull NSString *)identifier;

    Swift

    func selectPoi(_ identifier: String)

    Parameters

    identifier

    Identifier of the POI you want to select.

  • Starts navigating to the given POI.

    Declaration

    Objective-C

    - (void)navigateToPoi:(nonnull NSString *)identifier;

    Swift

    func navigate(toPoi identifier: String)

    Parameters

    identifier

    Identifier of the POI you want to navigate to.

  • Starts navigating to the given POI.

    Declaration

    Objective-C

    - (void)navigateToPoi:(nonnull NSString *)identifier
        accessibilityMode:(SITAccessibilityMode)accessibilityMode;

    Swift

    func navigate(toPoi identifier: String, accessibilityMode: SITAccessibilityMode)

    Parameters

    identifier

    Identifier of the POI you want to navigate to.

    accessibilityMode

    SITAccessibilityMode that you want use in your navigation.

  • Starts navigation to a destination defined in terms of latitude, longitude, and floor identifier. It may optionally include a name to identify the navigation target more easily (e.g., “Reception”).

    Declaration

    Objective-C

    - (void)navigateToPoint:(nonnull SITNavigationPoint *)point;

    Swift

    func navigate(to point: SITNavigationPoint)

    Parameters

    point

    An instance of SITNavigationPoint that defines the destination.

  • Starts navigation to a destination defined in terms of latitude, longitude, and floor identifier. It may optionally include a name to identify the navigation target more easily (e.g., “Reception”).

    Declaration

    Objective-C

    - (void)navigateToPoint:(nonnull SITNavigationPoint *)point
          accessibilityMode:(SITAccessibilityMode)accessibilityMode;

    Swift

    func navigate(to point: SITNavigationPoint, accessibilityMode: SITAccessibilityMode)

    Parameters

    point

    An instance of SITNavigationPoint that defines the destination.

    accessibilityMode

    The SITAccessibilityMode to be used during navigation.

  • Starts navigation to a destination that meets the restrictions defined in the given filter. In order to the navigaiton to start the user location must be available

    Declaration

    Objective-C

    - (void)navigateTo:(nonnull SITNavigationFilter *)filter
        accessibilityMode:(SITAccessibilityMode)accessibilityMode;

    Swift

    func navigate(to filter: SITNavigationFilter, accessibilityMode: SITAccessibilityMode)

    Parameters

    filter

    An instance of SITNavigationFilter that defines the restrictions the destination must satisfy.

    accessibilityMode

    The SITAccessibilityMode to be used during navigation.

  • Performs a search in the MapView using the specified SITSearchFilter. This has the same effect as if the user had manually entered a query into the MapView’s search bar.

    The search results will be displayed in the MapView, and any relevant UI updates (such as highlighting POIs or displaying a result list) will be triggered accordingly.

    Declaration

    Objective-C

    - (void)search:(nonnull SITSearchFilter *)filter;

    Swift

    func search(_ filter: SITSearchFilter)

    Parameters

    filter

    A non-null SITSearchFilter instance defining the search criteria.

  • Sets the UI language based on the given ISO 639-1 code. Checkout the Situm docs to see the list of supported languages: https://situm.com/docs/query-params/.

    Declaration

    Objective-C

    - (void)setLanguage:(nonnull NSString *)language;

    Swift

    func setLanguage(_ language: String)

    Parameters

    language

    Language ISO 639-1 code.

  • Sets the live location sharing session to be displayed on the mapView.

    When enabled in the Map Viewer Configuration Settings: https://situm.com/docs/map-viewer-configuration-settings/, Share Live Location allows a user to share their real-time location with another user.

    The sharing user receives a link that can be sent to their friends. If deep linking is correctly configured, the receiving user can open the link and see the shared location in their own app.

    The deep link includes a parameter called shared_session_id, which must be passed to this method so the mapView can display the sender’s location.

    For more information check Situm Documentation: https://situm.com/docs

    Declaration

    Objective-C

    - (void)setShareLiveLocationSession:(nonnull NSString *)sessionIdentifier;

    Swift

    func setShareLiveLocationSession(_ sessionIdentifier: String)

    Parameters

    sessionIdentifier

    The identifier of the share live location session that the mapView should display.