Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

10. Geolocation and Mapping > Location-Dependent Weather

Location-Dependent Weather

In Chapter 7, we built a simple Weather application, but it would be much better if the application gave us weather information for our current location. We can use the Core Location framework to retrieve the user’s latitude and longitude. However, the Google Weather Service, which we used to back our Weather application, takes only city names, not latitude or longitude arguments.

There are several ways around this problem. If you were developing on a platform that didn’t support geocoding, you’d need to make use of one of the many web services that provide geocoding (see sidebar for one such service); however, with the arrival of iOS 5, Apple has provided native support for both forward and reverse geocoding.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial