Contents

init(coordinateRegion:interactionModes:showsUserLocation:userTrackingMode:)

Creates a map that displays a coordinate region and optionally configures available interactions, user location, and tracking behavior.

Declaration

@MainActor @preconcurrency init(coordinateRegion: Binding<MKCoordinateRegion>, interactionModes: MapInteractionModes = .all, showsUserLocation: Bool = false, userTrackingMode: Binding<MapUserTrackingMode>? = nil) where Content == _DefaultMapContent

Parameters

  • coordinateRegion:

    A binding to a region that corresponds to an area to display on the map.

  • interactionModes:

    An enumeration that indicates the user interactions to which the map responds.

  • showsUserLocation:

    A Boolean value that indicates the option to display a person’s location on a map. The map displays the location only if they authorized the app to access their location.

  • userTrackingMode:

    A binding to a tracking mode that determines how the map responds to location updates.

See Also

Initializers