curvyRoute
                                
                                 curvyRoute copied to clipboard
                                
                                    curvyRoute copied to clipboard
                            
                            
                            
                        iOS: Drawing curvy routes with MapKit

πΊ curvyRoute
An easy way to draw a curvy line between two points on a map.
π Features
- [x] Display a curve on a map
- [x] Display a straight line on a map
- [x] Customise the radius multiplier
π Requirements
- iOS 8.0+
- Swift 4.2+
π Installation
There are several methods to install curvyRoute:
- Via CocoaPods
- Download the ZIP for the latest release
CocoaPods
Add curvyRoute specs to your Podfile:
pod 'curvyRoute'
ππΌ Example
import MapKit
import UIKit
import curvyRoute
class ViewController: UIViewController, MKMapViewDelegate {
    @IBOutlet weak var mapView: MKMapView!
    override func viewDidAppear(_: Bool) {
        mapView.delegate = self
        addOverlays()
    }
    func mapView(_: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
        if let lineOverlay = overlay as? LineOverlay {
            return MapLineOverlayRenderer(lineOverlay)
        }
        return MKOverlayRenderer(overlay: overlay)
    }
    private func addOverlays() {
		let pointA = CLLocationCoordinate2DMake(41.375024, 2.149118) // PlaΓ§a d'Espanya, Barcelona
		let pointB = CLLocationCoordinate2DMake(41.380994, 2.185771) // PlaΓ§a Pau Vila, 1, Barcelona
        mapView.addOverlay(LineOverlay(origin: pointA, destination: pointB))
        let arc = ArcOverlay(origin: pointA, destination: pointB,
                             style: LineOverlayStyle(strokeColor: .systemTeal, lineWidth: 4, alpha: 1))
        arc.radiusMultiplier = 0.5
        mapView.addOverlay(arc)
    }
}
π€ What is radiusMultiplier ?
This property will influence the shape of the arc. The default value is 1.

π¨βπ» Todo
- [x] Animate the polyline
- [x] ...
π License
curvyRoute is released under the MIT license. See LICENSE for details.