MapViewControllerDelegate

Objective-C

@protocol MapViewControllerDelegate <NSObject>

Swift

protocol MapViewControllerDelegate : NSObjectProtocol

A set of delegate methods for map view controller objects.

  • Notifies the delegate when the map view is initialized and ready to be used.

    Declaration

    Objective-C

    - (void)mapViewControllerReady:(nonnull MapViewController *)mapViewController;

    Swift

    optional func mapViewControllerReady(_ mapViewController: MapViewController)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate before map view rendering is started.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                   willRender:(ViewCameraTransitionStatus)cameraStatus;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, willRender cameraStatus: ViewCameraTransitionStatus)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    cameraStatus

    The view camera transition status.

  • Notifies the delegate when the map view rendering is finished.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                     didRender:(ViewDataTransitionStatus)dataStatus
        cameraTransitionStatus:(ViewCameraTransitionStatus)cameraStatus;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didRender dataStatus: ViewDataTransitionStatus, cameraTransitionStatus cameraStatus: ViewCameraTransitionStatus)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    dataStatus

    The view data transition status.

    cameraStatus

    The view camera transition status.

  • Notifies the delegate when the map view enters/exits following position mode.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
        onFollowingPositionStateChanged:(BOOL)isFollowingPosition;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onFollowingPositionStateChanged isFollowingPosition: Bool)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    isFollowingPosition

    The current state.

  • Notifies the delegate when the map view camera entered / exited manually adjusted following position.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
        onFollowingPositionModifyByTouchHandler:(BOOL)isModify;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onFollowingPositionModifyByTouchHandler isModify: Bool)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate when the map view style has been changed.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            onMapStyleChanged:(NSInteger)identifier;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onMapStyleChanged identifier: Int)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    identifier

    The map style identifier.

  • Notifies the delegate with the single pointer touch down event.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                 onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    point

    The touch point.

  • Notifies the delegate with the single pointer long touch event.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
             onLongTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onLongTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    point

    The long touch point.

  • Notifies the delegate with single pointer double touch event. @details A double touch event is defined as two consecutive touches within a preset time duration in milliseconds, and distance between the two touches has to be less than a preset distance in millimeters.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                onDoubleTouch:(CGPoint)position;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onDoubleTouch position: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    position

    The position where the event occurred.

  • Notifies the delegate with two pointers touch event. @details A two pointers touch event is defined as two simultaneous touches from which the pointer ups are within a preset time in milliseconds.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                 onTwoTouches:(CGPoint)position;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onTwoTouches position: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    position

    The mid position of the segment determined by the two pointer positions.

  • Notifies the delegate with move event.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                  onMovePoint:(CGPoint)startPoint
                      toPoint:(CGPoint)endPoint;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onMove startPoint: CGPoint, to endPoint: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    startPoint

    The start point.

    endPoint

    The end point.

  • Notifies the delegate with two pointers pinch event. @details A two pointers rotate event is defined as two pointers down, followed by rotation such that the distance between the pointers remains within a preset threshold.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                      onPinch:(CGPoint)startPoint1
                  startPoint2:(CGPoint)startPoint2
                     toPoint1:(CGPoint)endPoint1
                     toPoint2:(CGPoint)endPoint2
                       center:(CGPoint)center;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onPinch startPoint1: CGPoint, startPoint2: CGPoint, toPoint1 endPoint1: CGPoint, toPoint2 endPoint2: CGPoint, center: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    startPoint1

    The start position for first pointer.

    startPoint2

    The start position for second pointer.

    endPoint1

    The end position for first pointer.

    endPoint2

    The end position for second pointer.

    center

    The rotation center.

  • Notifies the delegate with two pointers shove event. @details Two pointers move with distance between pointers and pointers angle remaining inside predefined thresholds.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                      onShove:(double)pointersAngleDeg
                      initial:(CGPoint)initial
                        start:(CGPoint)start
                          end:(CGPoint)end;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onShove pointersAngleDeg: Double, initial: CGPoint, start: CGPoint, end: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    pointersAngleDeg

    The angle in degrees determined by the two pointers involved in gesture.

    initial

    is the mid point of the segment determined by the two pointers initial touch down positions.

    start

    The mid point of the segment determined by the two pointers previous positions.

    end

    The mid point of the segment determined by the two pointers current positions.

  • Notifies the delegate if the map should handle landmark selection.

    Declaration

    Objective-C

    - (BOOL)shouldSelectLandmark:(nonnull MapViewController *)mapViewController;

    Swift

    optional func shouldSelectLandmark(_ mapViewController: MapViewController) -> Bool

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate with the map selected landmark.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            didSelectLandmark:(nonnull LandmarkObject *)landmark
                 onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectLandmark landmark: LandmarkObject, onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    landmark

    The selected landmark.

    point

    The touch point.

  • Notifies the delegate with the map selected landmarks.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
           didSelectLandmarks:(nonnull NSArray<LandmarkObject *> *)landmarks
                 onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectLandmarks landmarks: [LandmarkObject], onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    landmark

    The selected landmarks.

    point

    The touch point.

  • Notifies the delegate with the map selected landmark.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            didSelectLandmark:(nonnull LandmarkObject *)landmark
             onLongTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectLandmark landmark: LandmarkObject, onLongTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    landmark

    The selected landmark.

    point

    The long touch point.

  • Notifies the delegate with the map selected landmarks.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
           didSelectLandmarks:(nonnull NSArray<LandmarkObject *> *)landmarks
             onLongTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectLandmarks landmarks: [LandmarkObject], onLongTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    landmark

    The selected landmark.

    point

    The long touch point.

  • Notifies the delegate with the list of streets under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
             didSelectStreets:(nonnull NSArray<LandmarkObject *> *)streets
                 onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectStreets streets: [LandmarkObject], onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    streets

    The list of streets.

    point

    The touch point.

  • Notifies the delegate if the map should handle streets selection.

    Declaration

    Objective-C

    - (BOOL)shouldSelectStreets:(nonnull MapViewController *)mapViewController;

    Swift

    optional func shouldSelectStreets(_ mapViewController: MapViewController) -> Bool

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate with the list of streets under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
             didSelectStreets:(nonnull NSArray<LandmarkObject *> *)streets
             onLongTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectStreets streets: [LandmarkObject], onLongTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    streets

    The list of streets.

    point

    The long touch point.

  • Notifies the delegate if the map should handle route selection.

    Declaration

    Objective-C

    - (BOOL)shouldSelectRoute:(nonnull MapViewController *)mapViewController;

    Swift

    optional func shouldSelectRoute(_ mapViewController: MapViewController) -> Bool

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate with the map selected route.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
               didSelectRoute:(nonnull RouteObject *)route;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectRoute route: RouteObject)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    route

    The new main route.

  • Notifies the delegate with the map selected routes.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
              didSelectRoutes:(nonnull NSArray<RouteObject *> *)routes
                 onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectRoutes routes: [RouteObject], onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    route

    The new main route.

    point

    The touch point.

  • Notifies the delegate if the map should handle overlays selection.

    Declaration

    Objective-C

    - (BOOL)shouldSelectOverlays:(nonnull MapViewController *)mapViewController;

    Swift

    optional func shouldSelectOverlays(_ mapViewController: MapViewController) -> Bool

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate with the list of overlays under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            didSelectOverlays:(nonnull NSArray<OverlayItemObject *> *)overlays;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectOverlays overlays: [OverlayItemObject])

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    overlays

    The list of overlays.

  • Notifies the delegate with the list of overlays under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            didSelectOverlays:(nonnull NSArray<OverlayItemObject *> *)overlays
                 onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectOverlays overlays: [OverlayItemObject], onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    overlays

    The list of overlays.

    point

    The touch point.

  • Notifies the delegate with the list of overlays under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            didSelectOverlays:(nonnull NSArray<OverlayItemObject *> *)overlays
             onLongTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectOverlays overlays: [OverlayItemObject], onLongTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    overlays

    The list of overlays.

    point

    The long touch point.

  • Notifies the delegate if the map should handle traffic events selection.

    Declaration

    Objective-C

    - (BOOL)shouldSelectTrafficEvents:
        (nonnull MapViewController *)mapViewController;

    Swift

    optional func shouldSelectTrafficEvents(_ mapViewController: MapViewController) -> Bool

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

  • Notifies the delegate with the list of traffic events under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
        didSelectTrafficEvents:(nonnull NSArray<TrafficEventObject *> *)events;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectTrafficEvents events: [TrafficEventObject])

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    events

    The list of traffic events..

  • Notifies the delegate with the list of traffic events under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
        didSelectTrafficEvents:(nonnull NSArray<TrafficEventObject *> *)events
                  onTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectTrafficEvents events: [TrafficEventObject], onTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    events

    The list of traffic events.

    point

    The touch point.

  • Notifies the delegate with the list of traffic events under the cursor location.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
        didSelectTrafficEvents:(nonnull NSArray<TrafficEventObject *> *)events
              onLongTouchPoint:(CGPoint)point;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didSelectTrafficEvents events: [TrafficEventObject], onLongTouch point: CGPoint)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    events

    The list of traffic events.

    point

    The long touch point.

  • Notifies the delegate when the map view angle was updated.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
            didUpdateMapAngle:(double)angle;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didUpdateMapAngle angle: Double)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    angle

    The new map angle in degrees.

  • Notifies the delegate when the map compass was tapped.

    Declaration

    Objective-C

    - (void)mapViewController:(nonnull MapViewController *)mapViewController
                didTapCompass:(FollowPositionMapRotationMode)mode;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, didTapCompass mode: FollowPositionMapRotationMode)

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    mode

    The follow position map rotation mode.

  • Notifies the delegate when the map scale needs to be rendered. @details Return false if map scale should be rendered by the SDK, otherwise client should return true and optionally do a custom render of the scale.

    Declaration

    Objective-C

    - (BOOL)mapViewController:(nonnull MapViewController *)mapViewController
             onRenderMapScale:(NSInteger)width
                   scaleValue:(nonnull NSString *)value
                   scaleUnits:(nonnull NSString *)units;

    Swift

    optional func mapViewController(_ mapViewController: MapViewController, onRenderMapScale width: Int, scaleValue value: String, scaleUnits units: String) -> Bool

    Parameters

    mapViewController

    The map view controller informing the delegate of this event.

    width

    The width in pixels of the bar.

    value

    The string value of the scale.

    units

    The string units of the scale.