avoytilla
Posts: 0
Joined: Thu Jul 14, 2011 2:34 am

Need Help with Air Quality App

im creating a basic air quality application.
i followed the weather tutorial for the most part to get a great hands on feel on how to build this.

im at the point now where the application generates, but no information comes up.

im still new to this so please bare with me

This is the JSON example im using (and I do insert my correct API key)
http://ws1.airnowgateway.org/GatewayW...

under request parameters:

PATH = format ; ATTRIBUTE = json
PATH=key ; ATTRIBUTE =API KEY
PATH=zipcode; COMPONENT = zipinput ; ATTRIBUTE= text

For repsonse mapping:

{"forecast": [{"DateIssue":"1/15/2010 12:00:00 AM","DateForecast":"1/15/2010 12:00:00 AM","ReportingArea":"Napa","StateCode":"CA","Latitude":"38.3300","Longitude":"-122.2800","ParameterName":"PM2.5","AQI":"74","CategoryNumber":"2","CategoryName":"Moderate","ActionDay":"False","Discussion":""},{"DateIssue":"1/15/2010 12:00:00 AM","DateForecast":"1/16/2010 12:00:00 AM","ReportingArea":"Napa","StateCode":"CA","Latitude":"38.3300","Longitude":"-122.2800","ParameterName":"PM2.5","AQI":"45","CategoryNumber":"1","CategoryName":"Good","ActionDay":"False","Discussion":""},{"DateIssue":"1/15/2010 12:00:00 AM","DateForecast":"1/17/2010 12:00:00 AM","ReportingArea":"Napa","StateCode":"CA","Latitude":"38.3300","Longitude":"-122.2800","ParameterName":"OZONE","AQI":"20","CategoryNumber":"1","CategoryName":"Good","ActionDay":"False","Discussion":""},{"DateIssue":"1/15/2010 12:00:00 AM","DateForecast":"1/18/2010 12:00:00 AM","ReportingArea":"Napa","StateCode":"CA","Latitude":"38.3300","Longitude":"-122.2800","ParameterName":"OZONE","AQI":"-1","CategoryNumber":"1","CategoryName":"Good","ActionDay":"False","Discussion":""},{"DateIssue":"1/15/2010 12:00:00 AM","DateForecast":"1/19/2010 12:00:00 AM","ReportingArea":"Napa","StateCode":"CA","Latitude":"38.3300","Longitude":"-122.2800","ParameterName":"OZONE","AQI":"-1","CategoryNumber":"1","CategoryName":"Good","ActionDay":"False","Discussion":""},{"DateIssue":"1/15/2010 12:00:00 AM","DateForecast":"1/20/2010 12:00:00 AM","ReportingArea":"Napa","StateCode":"CA","Latitude":"38.3300","Longitude":"-122.2800","ParameterName":"OZONE","AQI":"-1","CategoryNumber":"1","CategoryName":"Good","ActionDay":"False","Discussion":""}]}

Response set:

PATH = forecast: ; COMPONENT= mobilegridcell12

repsonse entry:

PATH= CategoryName ; COMPONENT=AQTEXT ; ATTRIBUTE =text

I then went to my "update" button and added the execute communication event to access datasource1

My goal for this app is to just display the CategoryName for the particular zipcode that is inputed.

Maybe by reading this, did I do something wrong or miss a step?

I appreciate any help at all!! Thank you in advance!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Need Help with Air Quality App

Your mapping seems fine, but try

PATH = forecast

instead of

PATH = forecast:

If that doesn't help, please tell me how I can get an API key for this service. Or, if possible, you can share your with me. Email it to a href="mailto:support@gotiggr.com" rel="nofollow"support@gotiggr.com/a.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Need Help with Air Quality App

I was able to run it. It looks like the service doesn't support JSONP, so you need to use JSON (set Data Type: json). But then to test it, you need to start Google Chrome with security turned off:

..../google-chrome --disable-web-security

The mapping is what I suggested,
PATH=forecast

avoytilla
Posts: 0
Joined: Thu Jul 14, 2011 2:34 am

Need Help with Air Quality App

i tried testing it again..still no go.

i also tried running it on my cell -- no go.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Need Help with Air Quality App

Ah..one more thing.

PATH = forecast ; COMPONENT= mobilegridcell12

this maps to a component inside the grid, you need to map the map the main array (forecast) to the grid itself. Here is how my mapping looks:

Image

avoytilla
Posts: 0
Joined: Thu Jul 14, 2011 2:34 am

Need Help with Air Quality App

YAY! it worked.

Thank you so much for all your help!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Need Help with Air Quality App

Good!

Let us know what you think about the apps builder. Any particular features you would like to see to make development simpler/

Return to “Issues”