One Logo Pool Ball
_MapKit_SwiftUI · IOS API REFERENCE

MapPolyline

struct · iOS 17.0+ · SDK 27.1

struct MapPolyline

An open polygon overlay consisting of one or more connected line segments. Create instances of ``Polyline`` in the closure you provide to the `content` parameter in ``MapView`` initializers.

Members (4)

init · iOS 17.0+

init

TypeScript
static initCoordinatesContourStyle(coordinates: Array<{ latitude: number; longitude: number }>, contourStyle?: MapPolyline_ContourStyle): MapPolyline
Swift declaration
init(coordinates: [CLLocationCoordinate2D], contourStyle: MapPolyline.ContourStyle = .straight)

Creates a polyline that traces a path between the given coordinates. - Parameters: - coordinates: The coordinates to trace the path between. - contourStyle: The contour style to be used.

init · iOS 17.0+

init

TypeScript
static initPointsContourStyle(points: Array<_MapKit_MKMapPoint>, contourStyle?: MapPolyline_ContourStyle): MapPolyline
Swift declaration
init(points: [MKMapPoint], contourStyle: MapPolyline.ContourStyle = .straight)

Creates a polyline that traces a path between the given points. - Parameters: - points: The points to trace the path between. - contourStyle: The contour style to be used.

init · iOS 17.0+

init

TypeScript
static init(polyline: _MapKit_MKPolyline): MapPolyline
Swift declaration
init(_ polyline: MKPolyline)

Creates a map polyline from the given `MKPolyline`. - Parameter polyline: The `MKPolyline` to convert.

init · iOS 17.0+

init

TypeScript
static init74616(route: _MapKit_MKRoute): MapPolyline
Swift declaration
init(_ route: MKRoute)

Creates a polyline that traces the given route. - Parameter route: The route to trace.

Skipped declarations

No declarations were skipped in this snapshot.

All _MapKit_SwiftUI types →