Chapter 5. Finding Your Way
In This Chapter
Using the Map framework
Specifying the location and zoom level of a map
Annotating significant locations on the map
Identifying the iPhone's current location
One of the things that makes iPhone applications compelling is the ability you have as a developer to incorporate the user's location into the application functionality. And one of the more compelling ways to do that is through the use of maps.
Including the ability to display a map in RoadTrip became important as people began to realize the kinds of solutions that can be delivered on the iPhone. To many travelers, nothing brands you more as a tourist than unfolding a large paper map (except of course looking through a thick guidebook). In this chapter, I show you how to take advantage of the iPhone's built-in capability to display a map of virtually anywhere in the world, as well as determine the iPhone's location and then indicate it in the map. As I mention way back in Book I, the iPhone's awareness of your location is one of the things that enables you to develop a totally new kind of application and really differentiate an iPhone application from a desktop one.
Note
Being able to build maps into your application is an important new feature in the iPhone 3.0 SDK and beyond, and it doesn't hurt that working with maps is one of the funnest things you can do on the iPhone because Apple makes it so easy.
In this chapter, I show you how to center your map on an area you want to display (San ...
Get iPhone® Application Development All-In-One For Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.