Contents

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

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

Declaration

@MainActor @preconcurrency init(_ titleResource: LocalizedStringResource, coordinate: CLLocationCoordinate2D, anchor: UnitPoint = .center, accessoryAnchor: UnitPoint, @ViewBuilder content: () -> Content) where Label == Text

Parameters

  • titleResource:

    The localized string for the title.

  • coordinate:

    The coordinate to display the annotation at.

  • anchor:

    How to place the content around the provided coordinate.

  • accessoryAnchor:

    How to place accessories around the provided content.

  • content:

    The view to place on the map.