Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Places You'll Go!

83231ffaec4a72ef96d26526872961ac?s=47 Jay Thrash
November 30, 2012

The Places You'll Go!

Originally given at CocoaConf Raleigh on November 30, 2012.

Come learn how to integrate iOS 6 maps directly into your apps and find out what's required to get your app listed in the marketplace of Transit apps.

With the release of iOS 6, Apple has redesigned MapKit from the ground up to use an incredible new vector-based graphics engine. Although this new engine allows for a level of interactivity which simply wasn't possible under previous releases of iOS, it's just as easy to embed standard or custom maps within iOS apps. In addition, the release of iOS 6 has created a whole new opportunity for developers to create Routing applications which can provide region-specific transit information which is integrated directly into the Maps.app.

83231ffaec4a72ef96d26526872961ac?s=128

Jay Thrash

November 30, 2012
Tweet

Transcript

  1. The Places  You’ll Go! ! What’s New for MapKit

    in iOS 6 CocoaConf Raleigh - Nov 2012 Jay Thrash :: jay.thrash@mac.com :: @jaythrash
  2. Map Kit • Vector Cartography • Responsive Zoom/ Pan/Rotate •

    Reduced Bandwidth All New!
  3. Map Kit

  4. Existing Apps?

  5. Existing Apps? It Just Works!!

  6. ! • Same API • Same Display Modes • Existing

    Annotations & Overlays Supported Existing Apps
  7. New MKMapItem

  8. New Encapsulates information about a specific point on a map

    MKMapItem Apps use this class to launch Maps app with that data Control Map modes, placemarks, regions
  9. Open in Maps ! CLLocationCoordinate2D latLong; latLong.latitude = 35.88409f; latLong.longitude

    = -78.844218f; ! MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:latLong addressDictionary:@{ (NSString *) kABPersonAddressStreetKey : @"4810 Page Creek Lane", (NSString *) kABPersonAddressCityKey : @"Durham", (NSString *) kABPersonAddressStateKey : @"NC", (NSString *) kABPersonAddressZIPKey : @"27703", (NSString *) kABPersonAddressCountryKey : @"United States"}]; ! MKMapItem *location = [[MKMapItem alloc] initWithPlacemark:placemark]; [location openInMapsWithLaunchOptions:nil]; Basic Placemark
  10. Open in Maps Basic Placemark

  11. ! CLLocationCoordinate2D latLong; latLong.latitude = 35.88409f; latLong.longitude = -78.844218f; !

    MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:latLong addressDictionary:@{ (NSString *) kABPersonAddressStreetKey : @"4810 Page Creek Lane", (NSString *) kABPersonAddressCityKey : @"Durham", (NSString *) kABPersonAddressStateKey : @"NC", (NSString *) kABPersonAddressZIPKey : @"27703", (NSString *) kABPersonAddressCountryKey: @"United States"}]; ! MKMapItem *location = [[MKMapItem alloc] initWithPlacemark:placemark] ! location.name = @"CocoaConf Raleigh"; location.phoneNumber = @"9199416000"; location.url = [NSURL URLWithString:@"http://www......"]; ! [location openInMapsWithLaunchOptions:nil]; Open in Maps Detailed Placemark
  12. Open in Maps Detailed Placemark

  13. Open in Maps NSArray *upcomingLocations = @[ cocoaConfChicago, cocoaConfDC, cocoaConfDallas,

    cocoaConfSanJose]; ! // Class Method to open multiple MKMapItems [MKMapItem openMapsWithItems:upcomingLocations launchOptions:nil]; Multiple MKMapItems
  14. Open in Maps Multiple MKMapItems

  15. Open in Maps ... ! MKMapItem *location = [[MKMapItem alloc]

    initWithPlacemark:placemark] location.name = @"CocoaConf Raleigh"; location.phoneNumber = @"9199416000"; location.url = [NSURL URLWithString:@"http://www......"]; ! [location openInMapsWithLaunchOptions:@{ MKLaunchOptionsMapTypeKey: [NSNumber numberWithInteger:MKMapTypeHybrid] }]; With Map Type
  16. Open in Maps With Map Type

  17. Open in Maps ... ! MKCoordinateRegion rgn = MKCoordinateRegionMakeWithDistance(location.placemark.location.coordinate, 150,

    150); ! [location openInMapsWithLaunchOptions:@{ MKLaunchOptionsMapTypeKey:[NSNumber numberWithInteger:MKMapTypeHybrid], MKLaunchOptionsMapCenterKey:[NSValue valueWithMKCoordinate:location.placemark.location.coordinate], MKLaunchOptionsMapSpanKey:[NSValue valueWithMKCoordinateSpan:rgn.span] }]; ! With Region
  18. Open in Maps With Region

  19. Open in Maps ... ! [location openInMapsWithLaunchOptions:@{ MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving }];

    With Directions
  20. Open in Maps With Directions

  21. Open in Maps ... ! NSArray *routeLocations = @[cocoaConfColumbus, cocoaConfPortland];

    ! // Class Method [MKMapItem openMapsWithItems:routeLocations launchOptions: @{ MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving } ]; Custom Directions
  22. MKMapItem

  23. Routing Apps

  24. Routing Apps Adaptive Transportation

  25. Routing Apps Great Opportunity!

  26. Enable Transit Support 1.Enable Maps Integration 2.Specify Geographic Relevance 3.Accept

    Locations from Maps 4.Optimize UX
  27. Xcode Demo

  28. None
  29. Thanks! ! jay.thrash@mac.com jay@airdropapps.com