Есть ли способ сделать снимок экрана mapView и включить ломаную линию? Я считаю, что мне нужно нарисовать CGPoint на изображении, которое возвращает MKSnapShotter, но я не уверен, как это сделать.
Текущий код
func takeSnapshot(mapView: MKMapView, withCallback: (UIImage?, NSError?) -> ()) {
let options = MKMapSnapshotOptions()
options.region = mapView.region
options.size = mapView.frame.size
options.scale = UIScreen.main().scale
let snapshotter = MKMapSnapshotter(options: options)
snapshotter.start() { snapshot, error in
guard snapshot != nil else {
withCallback(nil, error)
return
}
if let image = snapshot?.image{
withCallback(image, nil)
for coordinate in self.area {
image.draw(at:snapshot!.point(for: coordinate))
}
}
}
}
MKPolyline
. - person Rob   schedule 19.07.2016