fallbackPosition
TypeScriptget fallbackPosition(): (MapCameraPosition) | nullSwift declarationvar fallbackPosition: MapCameraPosition? { get }Returns a non-nil position if this camera position has a fallback position.
struct · iOS 17.0+ · SDK 27.1
struct MapCameraPositionHow to position the map's camera within the map. `MapCameraPosition` contains a number of semantic framings, such as `.automatic` (which frames the content of the map), as well as the `camera` case, which allows you to specify an explicit camera position. When passed as a binding to a map, the map will adjust its camera to frame the requested content, or to exactly match the camera specified. If the `Map` is interacted with by a user in a way that moves the map, the map will reset the position to a value that specifies `positionedByUser`.
get fallbackPosition(): (MapCameraPosition) | nullSwift declarationvar fallbackPosition: MapCameraPosition? { get }Returns a non-nil position if this camera position has a fallback position.
static userLocation(followsHeading: boolean, fallback: MapCameraPosition): MapCameraPositionSwift declarationstatic func userLocation(followsHeading: Bool = false, fallback: MapCameraPosition) -> MapCameraPositionCreates a position that frames the user's location. - Parameters: - followsHeading: If the camera should rotate to match the heading. of the user. - fallback: The position to use if the user's location hasn't yet been resolved.
get positionedByUser(): booleanSwift declarationvar positionedByUser: Bool { get }Returns `true` if the user has positioned the camera.
get followsUserHeading(): booleanSwift declarationvar followsUserHeading: Bool { get }Returns `true` if the map is following the user's heading.
get followsUserLocation(): booleanSwift declarationvar followsUserLocation: Bool { get }Returns `true` if the map is following the user's location.
get allowsAutomaticPitch(): booleanSwift declarationvar allowsAutomaticPitch: Bool { get }Returns `true` if this camera position allows automatic pitch.
get item(): (_MapKit_MKMapItem) | nullSwift declarationvar item: MKMapItem? { get }The item the map is framing if the map is framing an item, otherwise nil.
static itemAllowsAutomaticPitch(item: _MapKit_MKMapItem, allowsAutomaticPitch?: boolean): MapCameraPositionSwift declarationstatic func item(_ item: MKMapItem, allowsAutomaticPitch: Bool = true) -> MapCameraPositionCreates a position that frames the given map item. - Parameters: - item: The item to frame. - allowsAutomaticPitch: If the map's camera may use pitch in framing the item.
get rect(): (_MapKit_MKMapRect) | nullSwift declarationvar rect: MKMapRect? { get }The rect the map is framing if the map is framing a rect, otherwise nil.
static rect21034(rect: _MapKit_MKMapRect): MapCameraPositionSwift declarationstatic func rect(_ rect: MKMapRect) -> MapCameraPositionCreates a position that frames the given map rect. - Parameter rect: The map rect to frame.
get camera(): (MapCamera) | nullSwift declarationvar camera: MapCamera? { get }The camera if the position represents an explicit camera, otherwise nil.
static camera3160(camera: MapCamera): MapCameraPositionSwift declarationstatic func camera(_ camera: MapCamera) -> MapCameraPositionCreates a position using an explicit MapCamera.
get region(): (_MapKit_MKCoordinateRegion) | nullSwift declarationvar region: MKCoordinateRegion? { get }The region the map is framing if the map is framing a region, otherwise nil.
static region99780(region: _MapKit_MKCoordinateRegion): MapCameraPositionSwift declarationstatic func region(_ region: MKCoordinateRegion) -> MapCameraPositionCreates a position that frames the given coordinate region. - Parameter region: The coordinate region to frame.
static get automatic(): MapCameraPositionSwift declarationstatic var automatic: MapCameraPosition { get }Create a position that frames the map's content.
No declarations were skipped in this snapshot.