Skip to content

Coordinates Convenience Funktion für CLLocationCoordinate2D #2

@frogg

Description

@frogg

Ich brauche die Coorinaten als MKPolyline, könnte man auch ins Package aufnehmen:

let coordinates = stops.compactMap { stop in
    return stop.station.geocoordinates
}
let locationCoordinates = coordinates.map { coordinate in
    return CLLocationCoordinate2D(latitude: coordinate.latitude, longitude: coordinate.longitude)
}
let polyLine = MKPolyline(coordinates: locationCoordinates, count: coordinates.count)
mapView.addOverlay(polyLine)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions