Is there any better method to update MKPolyline
coordinates than removing and adding new overlay to mapView?
var a:[CLLocationCoordinate2D] = []
var testline = MKPolyline()
var coords1 = CLLocationCoordinate2D(latitude: 52.167894, longitude: 17.077399)
var coords2 = CLLocationCoordinate2D(latitude: 52.168776, longitude: 17.081326)
var coords3 = CLLocationCoordinate2D(latitude: 52.167921, longitude: 17.083730)
var testcoords:[CLLocationCoordinate2D] = [coords1,coords2]
testline = MKPolyline(coordinates: &testcoords, count: testcoords.count)
self.mapView.addOverlay(testline)
self.mapView.removeOverlay(testline)
testcoords = [coords1,coords2,coords3]
testline = MKPolyline(coordinates: &testcoords, count: testcoords.count)
self.mapView.addOverlay(testline)