TTAnnotationManager

@protocol TTAnnotationManager <NSObject>

TTAnnotationManager class to manage interactions with annotations.

  • Register delegate to receive annotations releated callbacks.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<TTAnnotationDelegate> _Nullable delegate;

    Swift

    weak var delegate: TTAnnotationDelegate? { get set }
  • Contains array of all annotations that are attached to map.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        NSArray<TTAnnotation *> *_Nonnull annotations;

    Swift

    var annotations: [TTAnnotation] { get }
  • Contains array of all overlays that are attached to map.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSArray<TTOverlay *> *_Nonnull overlays;

    Swift

    var overlays: [TTOverlay] { get }
  • Turn on / off markers clustering.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL clustering;

    Swift

    var clustering: Bool { get set }
    • Turn on / off markers clustering and provide custom parameters to customize the algorithm.

    Declaration

    Objective-C

    - (void)setClustering:(BOOL)custeringEnabled
               withRadius:(int)radius
                     with:(int)maxZoom;

    Swift

    func setClustering(_ custeringEnabled: Bool, withRadius radius: Int32, with maxZoom: Int32)

    Parameters

    custeringEnabled

    custeringEnabled

    radius

    radius

    maxZoom

    maxZoom

  • Display annotation on the map. If an annotation is already attached to map nothing happens. If you want to have two same annotations in one place you need to create a copy of given annotation.

    Declaration

    Objective-C

    - (void)addAnnotation:(TTAnnotation *_Nonnull)annotation;

    Swift

    func add(_ annotation: TTAnnotation)

    Parameters

    annotation

    TTAnnotation

  • Remove given annotation from a map and set its ID to MARKER_ID_UNDEFINED. If an annotation is not attached to map, throws the exception.

    Declaration

    Objective-C

    - (void)removeAnnotation:(TTAnnotation *_Nonnull)annotation;

    Swift

    func remove(_ annotation: TTAnnotation)

    Parameters

    annotation

    TTAnnotation

  • Removes all annotations from the map.

    Declaration

    Objective-C

    - (void)removeAllAnnotations;

    Swift

    func removeAllAnnotations()
  • Only one annotation on the map can be selected. Annotation can be selected by calling this method explicitly or by tapping on a marker on the map. You cant select annotation that has NO set of property selectable.

    Declaration

    Objective-C

    - (void)selectAnnotation:(TTAnnotation *_Nonnull)annotation;

    Swift

    func select(_ annotation: TTAnnotation)

    Parameters

    annotation

    TTAnnotation

  • Deselect annotation if selected and remove callout if opened.

    Declaration

    Objective-C

    - (void)deselectAnnotation;

    Swift

    func deselectAnnotation()
  • Returns selected annotation if any otherwise nil is none is selected.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        TTAnnotation *_Nullable selectedAnnotation;

    Swift

    var selectedAnnotation: TTAnnotation? { get }
  • Adds the overlay object to the map.

    Declaration

    Objective-C

    - (void)addOverlay:(TTOverlay *_Nonnull)overlay;

    Swift

    func add(_ overlay: TTOverlay)

    Parameters

    overlay

    An interface for associating content with a specific map region.

  • Removes an overlay object from the map.

    Declaration

    Objective-C

    - (void)removeOverlay:(TTOverlay *_Nonnull)overlay;

    Swift

    func remove(_ overlay: TTOverlay)

    Parameters

    overlay

    An interface for associating content with a specific map region.

  • Removes all overlays from the map.

    Declaration

    Objective-C

    - (void)removeAllOverlays;

    Swift

    func removeAllOverlays()