Latest 0.0.2
License MIT
Platforms ios 9.0

CI Status


iOS library to create common map animations for MapKit and other providers. Note, work-in-progress.

Shameless Plug: This library was written for my skiing & snowboarding app, Mogul Bunny.


To run the example project, clone the repo, and run pod install from the Example directory first.



MapDoodle is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MapDoodle"

Basic Usage

Once you get an instance of MKMapView, just pass it along to an instance of MapDoodler.
Then, add your waypoints to a GeoPath.

class ViewController: UIViewController {
  @IBOutlet var mapView: MKMapView!
  var mapDoodler: MapDoodler!

  override func viewDidLoad() {

    mapDoodler = MapDoodler(mapView: mapView, refreshRate: 500)

    let pathDoodleStyle = AnimatedPathDoodleStyle()
    pathDoodleStyle.thickness = 10
    pathDoodleStyle.color = UIColor.blueColor()
    pathDoodleStyle.tracerThickness = 5.0
    pathDoodleStyle.tracerColor = UIColor.grayColor()
    pathDoodleStyle.speed = 250.0

    // Shining Sea Bikeway
    let shiningSeaBikewayPoints: [GeoPoint] = [
      GeoPoint(latitude: 41.551490, longitude: -70.627179),
      GeoPoint(latitude: 41.550410, longitude: -70.627761),
      GeoPoint(latitude: 41.534456, longitude: -70.641752),
      GeoPoint(latitude: 41.534319, longitude: -70.642047),
      GeoPoint(latitude: 41.534032, longitude: -70.642455),
      GeoPoint(latitude: 41.531242, longitude: -70.645581),
      GeoPoint(latitude: 41.524383, longitude: -70.653310),
      GeoPoint(latitude: 41.524383, longitude: -70.653310)

    let shiningSeaBikewayDoodle = mapDoodler.addAnimatedPathDoodle(pathDoodleStyle, points: shiningSeaBikewayPoints)
    mapDoodler.zoomFitAllDoodles(150, shouldAnimate: false)

Static (not animated) path doodles can also be added.

let pathDoodleStyle = PathDoodleStyle()
pathDoodleStyle.thickness = 10
pathDoodleStyle.color = UIColor.blueColor()

let shiningSeaBikewayPoints: [GeoPoint] = [
// ...

let shiningSeaBikewayDoodle = mapDoodler.addPathDoodle(pathDoodleStyle, points: shiningSeaBikewayPoints)

Doodles can be added at anytime (for example, via user interaction.)

The following is supported for doodle management:

let mapDoodler = MapDoodler(mapView: mapView, refreshRate: 500)
// Add a new doodle.
let doodle = mapDoodler.addPathDoodle(style: pathDoodleStyle, points: points)
// Assign a string ID to a doodle. = "foo"
// Later, you can retrieve the doodle by ID.
let doodle = mapDoodler.getDoodleById(id: "foo")
// Remove a doodle from the map
// Zoom to fit a doodle.
// Zoom to fit all doodles on the map.
// Change the style of a doodle. Style must be for the correct doodle type, otherwise no-op.
doodle.setStyle(style: newStyle)


Vorn Mom, [email protected]


MapDoodle is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "MapDoodle",
    "version": "0.0.2",
    "summary": "iOS library to create common map animations",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Vorn Mom": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.2"
    "platforms": {
        "ios": "9.0"
    "source_files": "MapDoodle/Classes/**/*"

Pin It on Pinterest

Share This