SITMapViewDelegate

Objective-C

@protocol SITMapViewDelegate <NSObject>

Swift

protocol SITMapViewDelegate

Protocol that defines important states of the SITMapView Component

  • Method that gets called when the mapView component detects the user has selected a POI

    Declaration

    Objective-C

    - (void)mapView:(SITMapView *)mapView didSelectedPoi:(SITPOI *)poi;

    Swift

    optional func mapView(_ mapView: SITMapView!, didSelectedPoi poi: SITPOI!)

    Parameters

    mapView

    the component that is responding to the event

    poi

    the selected element

  • Method that gets called when the mapView component detects the user has deselected a POI

    Declaration

    Objective-C

    - (void)mapView:(SITMapView *)mapView didUnselectedPoi:(SITPOI *)poi;

    Swift

    optional func mapView(_ mapView: SITMapView!, didUnselectedPoi poi: SITPOI!)

    Parameters

    mapView

    the component that is responding to the event

    poi

    the deselected element

  • Method invoked when the user clicks on a link in the SITMapView that leads to a website different from the SITMapView’s domain. If this method is not set, the link will be opened in the system’s default browser by default.

    Declaration

    Objective-C

    - (void)mapView:(SITMapView *)mapView
        didClickExternalLink:(SITExternalLinkClickedResult *)result;

    Swift

    optional func mapView(_ mapView: SITMapView!, didClickExternalLink result: SITExternalLinkClickedResult!)

    Parameters

    url

    SITExternalLinkClickedResult of the link that the user clicked inside the map.