One Logo Pool Ball
_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

TypeScript
static initCoordinates(coordinates: Array<{ latitude: number; longitude: number }>): MapPolygon
Swift declaration
init(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

TypeScript
static initPoints(points: Array<_MapKit_MKMapPoint>): MapPolygon
Swift declaration
init(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

TypeScript
static init(polygon: _MapKit_MKPolygon): MapPolygon
Swift declaration
init(_ 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 →