Contents

init(coordinate:anchor:accessoryAnchor:content:label:)

Creates an annotation that displays a view at a coordinate on the map.

Declaration

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

Parameters

  • coordinate:

    The coordinate position of the annotation.

  • anchor:

    A Unitpoint value that indicates how to position the content around the provided coordinate.

  • accessoryAnchor:

    A Unitpoint value that indicates how to place accessories around the provided content.

  • content:

    The view to place on the map.

  • label:

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

See Also

Creating annotations