Contents

init(coordinate:anchor:content:label:)

Creates an annotation that displays a view on the map using coordinates, anchor location, view, and label you provide.

Declaration

@MainActor @preconcurrency init(coordinate: CLLocationCoordinate2D, anchor: UnitPoint = .center, @ViewBuilder content: () -> Content, @ViewBuilder label: () -> Label)

Parameters

  • coordinate:

    The coordinate position of the annotation.

  • anchor:

    How to place the content around the provided coordinate.

  • content:

    The view to place on the map.

  • label:

    The label for the annotation, including a title, and optional subtitle.

See Also

Creating annotations