MapDelegate

public protocol MapDelegate : AnyObject

A protocol that provides actions delegate from Map allowing you to interact with the map.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Method for reporting a tap on a given annotation marker.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didTapOnAnnotation annotation: Annotation, onCoordinate coordinate: CLLocationCoordinate2D)

    Parameters

    map

    The instance of the Map where the event occurred.

    marker

    The annotation of the tap.

    coordinate

    The coordinates of the tap.

  • map(_:didTapOnCurrentLocation:) Default implementation

    Method for reporting a tap on the current location marker.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didTapOnCurrentLocation coordinate: CLLocationCoordinate2D)

    Parameters

    map

    The instance of the Map where the event occurred.

    coordinate

    The current location marker coordinate.

  • map(_:didTapOn:) Default implementation

    Method for reporting a tap on a given location on the map.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didTapOn coordinate: CLLocationCoordinate2D)

    Parameters

    map

    The instance of the Map where the event occurred.

    coordinate

    The geographic representation of the point that the user tapped.

  • map(_:didDoubleTapOn:) Default implementation

    Method for reporting a double tap on a given location on the map.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didDoubleTapOn coordinate: CLLocationCoordinate2D)

    Parameters

    map

    The instance of the Map where the event occurred.

    coordinate

    The geographic representation of the point that the user double tapped.

  • map(_:didLongPressOn:) Default implementation

    Method for reporting a long press on a given location on the map.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didLongPressOn coordinate: CLLocationCoordinate2D)

    Parameters

    map

    The instance of the Map where the event occurred.

    coordinate

    The geographic representation of the point that the user long press.

  • map(_:onInteraction:) Default implementation

    Method for reporting states for a interaction with map.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, onInteraction interaction: MapInteraction)

    Parameters

    map

    The instance of the Map where the event occurred.

    interaction

    The interaction

  • map(_:didChangeCameraProperties:) Default implementation

    Called whenever camera properties change, which may be as often as every render iteration. Use this callback for altering the display of items that are already in the view of the camera. For example, hide or show the items depending on the new zoom level.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didChangeCameraProperties properties: CameraProperties)

    Parameters

    map

    The instance of the Map where the event occurred.

    properties

    The camera properties on the moment of exception this method.

  • map(_:didSteadyCamera:) Default implementation

    Method for reporting when camera properties have changed and there are no more outstanding changes planned. E.g. an animation is finished on properties or properties were set to concrete values.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didSteadyCamera properties: CameraProperties)

    Parameters

    map

    The instance of the Map where the event occurred.

    properties

    The camera properties on the moment when camera become steady.

  • map(_:didChangeCameraTrackingMode:) Default implementation

    Method for reporting a change of camera tracking mode.

    Default Implementation

    Declaration

    Swift

    func map(_ map: TomTomMap, didChangeCameraTrackingMode mode: CameraTrackingMode)

    Parameters

    map

    The instance of the Map where the event occurred.

    mode

    The camera tracking mode that is currently in use.

  • mapDidTapOnRecenterButton(_:) Default implementation

    Method for reporting a press on the re-center button.

    Default Implementation

    Declaration

    Swift

    func mapDidTapOnRecenterButton(_ map: TomTomMap)

    Parameters

    map

    The instance of the Map where the event occurred.