04

Map manager is a MapKit wrapper to provide route direction drawing written entirely in Swift.

MapManager-Swift-iOS

Features:

  • Closure support
  • Get directions using Apple service
  • Get directions using Google service

Usage example:

var origin = "Toronto"
var destination = "Montreal"
mapManager.directionsUsingGoogle(from: origin, to: destination) { (route, directionInformation, boundingRegion, error) -> () in
    if(error != nil) {
        println(error!)
    } 
    else {
        if let map = self.mapView? {
            dispatch_async(dispatch_get_main_queue()) {
                map.addOverlay(route!)
                map.setVisibleMapRect(boundingRegion!, animated: true)
            }
        }
    }
}

Check out MapManager on GitHub