AnnotationView

@MainActor
public class AnnotationView : MKAnnotationView

This is used to display a map marker.

  • The reuse ID for these annotations.

    Declaration

    Swift

    @MainActor
    public static let reuseID: String
  • The controller that “owns” the map.

    Declaration

    Swift

    @MainActor
    public var myController: BigJuJuMapViewController?
  • The annotation attached to this view.

    Declaration

    Swift

    @MainActor
    public var myAnnotation: LocationAnnotation? { get }
  • This tests whether or not the given point fits inside the annotation.

    Declaration

    Swift

    @MainActor
    public override func point(inside inPoint: CGPoint,
                               with: UIEvent?
    ) -> Bool

    Parameters

    inPoint

    The point to test

    with

    ignored.

    Return Value

    True, if the point is within the annotation.

  • Basic initializer.

    Declaration

    Swift

    @MainActor
    public init(annotation inAnnotation: LocationAnnotation,
                reuseIdentifier inReuseIdentifier: String? = AnnotationView.reuseID,
                controller inController: BigJuJuMapViewController? = nil
    )

    Parameters

    inAnnotation

    The annotation attached to this view.

    inReuseIdentifier

    The reuse ID (optional,. default is nil).

    inController

    The controller that “owns” the map.

  • This adds our number display layer.

    Declaration

    Swift

    @MainActor
    public required init?(coder inCoder: NSCoder)
  • Called to lay out the views. We use this to populate aggregate markers.

    Declaration

    Swift

    @MainActor
    public override func layoutSubviews()
  • Called when the view is transitioned within the hierarchy.

    Declaration

    Swift

    @MainActor
    public override func didMoveToSuperview()