Contents

init(_:coordinate:anchor:content:)

Creates an annotation that displays a view at a coordinate on the map using a title key, coordinate, anchor location, and view you provide.

Declaration

@MainActor @preconcurrency init<S>(_ title: S, coordinate: CLLocationCoordinate2D, anchor: UnitPoint = .center, @ViewBuilder content: () -> Content) where Label == Text, S : StringProtocol

Parameters

  • title:

    The title of the annotation.

  • coordinate:

    The coordinate position of the annotation.

  • anchor:

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

  • content:

    The view to place on the map.

See Also

Creating annotations