O'Reilly logo

iPhone Location Aware Apps by Example by Zeeshan Chawdhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — converting location data into city name

To display the city in which the user is interacting with our Weather application, we need to convert the latitude/longitude pairs to an appropriate city or local area name, so that it makes visual sense to the end user.

  1. Before we can use the GeoNames API, you need to register and get your own username with GeoNames.org through http://www.geonames.org/login. The documentation for the web service can be found at: http://www.geonames.org/export/ws-overview.html.
  2. We begin extending the SQLite example discussed previously, by adding two UILabels for city and country to our Hello_LocationViewController.xib file, as well as by adding two UITextFields that will be use to render the city ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required