LineString
public struct LineString : Equatable
Undocumented
-
Undocumented
Declaration
Swift
public var coordinates: [CLLocationCoordinate2D] -
Undocumented
Declaration
Swift
public init(_ coordinates: [CLLocationCoordinate2D]) -
Undocumented
Declaration
Swift
public init(_ ring: Ring) -
Returns a
.LineStringalong a.LineStringwithin a distance from a coordinate.Declaration
Swift
public func trimmed(from coordinate: CLLocationCoordinate2D, distance: CLLocationDistance) -> LineString? -
See moreIndexedCoordinateis a coordinate with additional information such as the index from its position in the polyline and distance from the start of the polyline.Declaration
Swift
public struct IndexedCoordinate -
Returns a coordinate along a
.LineStringat a certain distance from the start of the polyline.Declaration
Swift
public func coordinateFromStart(distance: CLLocationDistance) -> CLLocationCoordinate2D? -
Returns an indexed coordinate along a
.LineStringat a certain distance from the start of the polyline.Ported from https://github.com/Turfjs/turf/blob/142e137ce0c758e2825a260ab32b24db0aa19439/packages/turf-along/index.js
Declaration
Swift
public func indexedCoordinateFromStart(distance: CLLocationDistance) -> IndexedCoordinate? -
Returns the distance along a slice of a
.LineStringwith the given endpoints.Declaration
Swift
public func distance(from start: CLLocationCoordinate2D? = nil, to end: CLLocationCoordinate2D? = nil) -> CLLocationDistance? -
Returns a subset of the
.LineStringbetween given coordinates.Declaration
Swift
public func sliced(from start: CLLocationCoordinate2D? = nil, to end: CLLocationCoordinate2D? = nil) -> LineString? -
Returns the geographic coordinate along the
.LineStringthat is closest to the given coordinate as the crow flies. The returned coordinate may not correspond to one of the polyline’s vertices, but it always lies along the polyline.Declaration
Swift
public func closestCoordinate(to coordinate: CLLocationCoordinate2D) -> IndexedCoordinate?
View on GitHub
Install in Dash
LineString Structure Reference