Page 1 of 1

Need Help with Air Quality App

Posted: Thu Jul 14, 2011 5:39 am
by avoytilla

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!


Need Help with Air Quality App

Posted: Thu Jul 14, 2011 5:51 am
by maxkatz

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.


Need Help with Air Quality App

Posted: Thu Jul 14, 2011 6:20 am
by maxkatz

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


Need Help with Air Quality App

Posted: Thu Jul 14, 2011 6:43 am
by avoytilla

i tried testing it again..still no go.

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


Need Help with Air Quality App

Posted: Thu Jul 14, 2011 3:58 pm
by maxkatz

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


Need Help with Air Quality App

Posted: Thu Jul 14, 2011 4:59 pm
by avoytilla

YAY! it worked.

Thank you so much for all your help!


Need Help with Air Quality App

Posted: Thu Jul 14, 2011 5:02 pm
by maxkatz

Good!

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