_MapKit_SwiftUI · IOS API REFERENCE
MapPolygon
struct · iOS 17.0+ · SDK 27.1
struct MapPolygon
A closed polygon overlay.
Create instances of ``Polygon`` in the closure you provide to the
`content` parameter in ``MapView`` initializers.
Members (3)
init · iOS 17.0+init
TypeScriptstatic initCoordinates(coordinates: Array<{ latitude: number; longitude: number }>): MapPolygon
Swift declarationinit(coordinates: [CLLocationCoordinate2D])
Creates a polygon from a list of coordinates.
- Parameter coordinates: The coordinates of the vertices of the polygon.
init · iOS 17.0+init
TypeScriptstatic initPoints(points: Array<_MapKit_MKMapPoint>): MapPolygon
Swift declarationinit(points: [MKMapPoint])
Creates a polygon from a list of map points.
- Parameter points: The points that make up the vertices of the polygon.
init · iOS 17.0+init
TypeScriptstatic init(polygon: _MapKit_MKPolygon): MapPolygon
Swift declarationinit(_ polygon: MKPolygon)
Creates a map polygon from the given `MKPolygon`.
- Parameter polygon: The `MKPolygon` to convert.
Skipped declarations
No declarations were skipped in this snapshot.
All _MapKit_SwiftUI types →