$29
Objectives: Further enhance the knowledge about using Calling web services, JSON data processing
Pre-requisite: create an account in http://www.geonames.org/login to use their free web service.
Lab: During this lab, you will be developing an app that displays the earthquake information for a given city and surrounding area. Display the datetime and magnitude of each earth quick in a suitable UI object such as textarea. If you get more than 10 earth quick information, display the first 10.
Essentially, this lab can be done in two steps:
Step1: Get longitude and latitude of a given city/address
First your application should ask the address/city name where you need to get earthquake information. During map and core-location lectures, we have discussed how to use geo-coding to get longitude and latitude of a given city/address.
Step 2: Use the web service 8 (earthquake JSON) from the flowing list to get earthquake information around the city http://www.geonames.org/export/ws-overview.html
Here is a sample Web Service Call to get earthquake information around phoenix, AZ
http://api.geonames.org/earthquakesJSON?north=43.45&south=23.45&east= 102.06&west=122.06&username=demo
Lon and Lat of Phoenix is 33.45 and 112.06 respectively
You can use the lon/lat value from step 1 above as the center and then use +/- 10 to get north/south/east/west values for the web service call.
Week 10 module has web service call examples and processing JSON data lecture motes
Design: You are free to design your UI the best way to implement about application.
Submission Instructions
Submit online to the canvas using the link given under Lab 7