Getting Oriented with MapKit

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Getting Oriented with MapKit - Presentation Transcript

    1. Getting Oriented with MapKit Julio Barros Julio@E-String.com
    2. Why Maps? • iPhone is a mobile / pocket computer • Where am I? • How do I get somewhere? • What’s near me? Julio Barros E-String.com
    3. Dark ages (pre 3.0) • Static map images • Web view with Javascript shenanigans • Exit out to google maps Julio Barros E-String.com
    4. MapKit • New in iPhone 3.x • Embed map in your app • Uses Google map tiles • Familiar map UI Julio Barros E-String.com
    5. Important Classes MKMapView MKAnnotation (protocol) MKAnnotationView Julio Barros E-String.com
    6. Important Classes MKMapView MKMapViewDelegate MKAnnotation (protocol) MKAnnotationView MKPinAnnotationView Julio Barros E-String.com
    7. Simplest Example • MKMapView ... just a view • Or use Interface Builder • Don’t forget to add mapkit framework Julio Barros E-String.com
    8. That was easy Julio Barros E-String.com
    9. Show User Location Julio Barros E-String.com
    10. Showing a particular area on the map Latitude Span Center “best fit” not exactly what you set Longitude Span Julio Barros E-String.com
    11. Regions • MKCoordinateRegion Julio Barros E-String.com
    12. Denver, Colorado Julio Barros E-String.com
    13. Demo data plist of Brewery information: name, address, latitude, longitude Julio Barros E-String.com
    14. Loading Demo Data Julio Barros E-String.com
    15. Local area Julio Barros E-String.com
    16. MKAnnotation Julio Barros E-String.com
    17. MyAnnotation Class Julio Barros E-String.com
    18. Adding Annotations Julio Barros E-String.com
    19. Default Pins at annotations Julio Barros E-String.com
    20. Customizing pins • MKPinAnnotationView • MKMapViewDelegate - set a delegate Julio Barros E-String.com
    21. Our purple pins Julio Barros E-String.com
    22. Custom markers • MKAnnotationView Julio Barros E-String.com
    23. Customizing the view Julio Barros E-String.com
    24. Customizing the Callout Julio Barros E-String.com
    25. Tapping the call out view Julio Barros E-String.com
    26. Reverse Geocoding • Geocoding : address to coordinates • geocoder.us other services • Reverse geocoding : coordinates to address Julio Barros E-String.com
    27. MKReverseGeocoder Julio Barros E-String.com
    28. MKPlacemark • Address info including, country code, country, postal code, administrative area, sub administrative area, locality, sub locality, thoroughfare, sub thoroughfare • Conforms to MKAnnotation • Has address dictionary with Address Book keys Julio Barros E-String.com
    29. Number of pins • Try to limit annotations to ~100(?) • Implement region change delegate methods • Create and manage your own clusters Julio Barros E-String.com
    30. Challenges • Anchoring an object to a location on the map and having it scale. • Shapes - neighborhoods • Lines - routes / paths • View space to Geo Space - (CGPoint)convertCoordinate:(CLLocationCoordinate2D) coordinate toPointToView:(UIView *)view - (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view Julio Barros E-String.com
    31. Legal limitations I’m not a lawyer but think carefully before using this for: vehicle/fleet tracking routing cacheing tiles geocoding / mass reverse geocoding Read the TOS http://code.google.com/apis/maps/iphone/ terms.html Julio Barros E-String.com
    32. Possible Options • OpenStreetMap.org (OSM) - map/tile data • Route-Me - OSS map view • Cloudemade.com - services around OSM • geocoder.us (among others) Julio Barros E-String.com
    33. Resources • MapKit Framework Reference - Apple • Using Map Kit with Bill Dudney - PragProg • Using Map Kit ... Bill Dudney - Wednesday Julio Barros E-String.com
    34. Thank You Julio Barros Julio@E-String.com http://www.E-String.com http://twitter.com/JulioBarros Also on Face book and Linked In Julio Barros E-String.com
    SlideShare Zeitgeist 2009

    + Juio BarrosJuio Barros Nominate

    custom

    741 views, 2 favs, 1 embeds more stats

    Slides of a presentation I did at 360iDev in Denver more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 741
      • 740 on SlideShare
      • 1 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 0
    Most viewed embeds
    • 1 views on http://iphonecodesamples.blogspot.com

    more

    All embeds
    • 1 views on http://iphonecodesamples.blogspot.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories