TomTomMapDelegate
public protocol TomTomMapDelegate : AnyObject
A protocol that provides actions delegate from TomTomMap allowing you to interact with the map.
Important
This is a Public Preview API. It may be changed or removed at any time.-
tomTomMap(_:
Default implementationdidTapOnMarker: onCoordinate: ) Method for reporting a tap on a given annotation marker.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didTapOnMarker marker: Annotation, onCoordinate coordinate: CLLocationCoordinate2D)
Parameters
map
The instance of TomTomMap where the event occurred.
marker
The annotation of the tap.
coordinate
The coordinates of the tap.
-
tomTomMap(_:
Default implementationdidTapOnCurrentLocation: ) Method for reporting a tap on the current location marker.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didTapOnCurrentLocation coordinate: CLLocationCoordinate2D)
Parameters
map
The instance of TomTomMap where the event occurred.
coordinate
The current location marker coordinate.
-
tomTomMap(_:
Default implementationdidTapOn: ) Method for reporting a tap on a given location on the map.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didTapOn coordinate: CLLocationCoordinate2D)
Parameters
map
The instance of TomTomMap where the event occurred.
coordinate
The geographic representation of the point that the user tapped.
-
tomTomMap(_:
Default implementationdidDoubleTapOn: ) Method for reporting a double tap on a given location on the map.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didDoubleTapOn coordinate: CLLocationCoordinate2D)
Parameters
map
The instance of TomTomMap where the event occurred.
coordinate
The geographic representation of the point that the user double tapped.
-
tomTomMap(_:
Default implementationdidTwoFingerTapOn: ) Method for reporting a two-finger tap event.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didTwoFingerTapOn coordinate: CLLocationCoordinate2D)
Parameters
map
The instance of TomTomMap where the event occurred.
coordinate
The middle point’s coordinates of the tap.
-
tomTomMap(_:
Default implementationdidLongPressOn: ) Method for reporting a long press on a given location on the map.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didLongPressOn coordinate: CLLocationCoordinate2D)
Parameters
map
The instance of TomTomMap where the event occurred.
coordinate
The geographic representation of the point that the user long press.
-
tomTomMap(_:
Default implementationgesture: didSendEvent: ) Method for reporting states for a continuous gesture (such as pan, pinch, rotate, tilt).
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, gesture: Gesture, didSendEvent gestureEvent: GestureEvent)
Parameters
map
The instance of TomTomMap where the event occurred.
gesture
The type of gesture.
gestureEvent
The gesture event.
-
tomTomMap(_:
Default implementationdidChangeCameraProperties: ) 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 tomTomMap(_ map: TomTomMap, didChangeCameraProperties properties: CameraProperties)
Parameters
map
The instance of TomTomMap where the event occurred.
properties
The camera properties on the moment of exception this method.
-
tomTomMap(_:
Default implementationdidSteadyCamera: ) 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 tomTomMap(_ map: TomTomMap, didSteadyCamera properties: CameraProperties)
Parameters
map
The instance of TomTomMap where the event occurred.
properties
The camera properties on the moment when camera become steady.
-
tomTomMap(_:
Default implementationdidChangeCameraTrackingMode: ) Method for reporting a change of camera tracking mode.
Default Implementation
Declaration
Swift
func tomTomMap(_ map: TomTomMap, didChangeCameraTrackingMode mode: CameraTrackingMode)
Parameters
map
The instance of TomTomMap where the event occurred.
mode
The camera tracking mode that is currently in use.
-
tomTomMapDidTapOnRecenterButton(_:
Default implementation) Method for reporting a press on the re-center button.
Default Implementation
Declaration
Swift
func tomTomMapDidTapOnRecenterButton(_ map: TomTomMap)
Parameters
map
The instance of TomTomMap where the event occurred.