Lab Session: Weather Data

From NSB App Studio
Revision as of 21:08, 12 December 2013 by James (talk | contribs)
Jump to navigation Jump to search

In this lab you will pull in some weather data from http://openweathermap.org/API.

Student Outline

  1. Open LabWeather.nsx.
  2. Add a click event to btnLoad on frmMain
  3. Have the click event use the value from txtCity to query OpenWeatherMap's API: http://api.openweathermap.org/data/2.5/weather?q=Riyadh,sa (keep in mind that you should URL encode any user entered parameters, like city, using encodeURIComponent)
  4. Upon receiving the response, you should parse the response into the various Value labels on frmMain. The format of the response is described here: http://bugs.openweathermap.org/projects/api/wiki/Weather_Data

Files