I've seen in several posts references to a 'Weather Sample App'.
However, I couldn't find it anywhere.
Can anybody please provide me with the directions to have that sample app?
Thank you in advance.
Comm.makeJsonRequest("api.openweathermap.org/.../weather",
{"lat"=>latLon[0].toFloat(), "lon"=>latLon[1].toFloat(),"appid"=>"your api key here"}, {}, method(:onReceive));
If you get an old version from a prior SDK, remember that you'll need to get an API KEY from Open Weather, and change the makeJsonRequest() in the sample to supply it.
you need to do this to the request:
Comm.makeJsonRequest("api.openweathermap.org/.../weather",
{"lat"=>latLon[0].toFloat(), "lon"=>latLon[1].toFloat(),"appid"=>"your api key here"}, {}, method(:onReceive));
To get the key, see http://openweathermap.org/appid
One other thing, is the sample starts out looking for GPS. To do this in the simulator, Click on "Simulation", then "Fit Data", them "Simulate Data". You'll get GPS locations in Kansas.
There are no breakpoints with Eclipse and monkey c.
If you what to see the data, in onReceive(), add
Sys.println(data);
You'll see a dictionary of the returned data.
This Garmin environment is a bit rude, isn't it?
Comm.makeJsonRequest("api.openweathermap.org/.../weather",
{"lat"=>latLon[0].toFloat(), "lon"=>latLon[1].toFloat(),"appid"=>"your api key here"}, {}, method(:onReceive));
Comm.makeJsonRequest("api.openweathermap.org/.../forecast",
{"lat"=>latLon[0].toFloat(), "lon"=>latLon[1].toFloat(),"appid"=>"your api key here"}, {}, method(:onReceive));
Comm.makeJsonRequest("api.openweathermap.org/.../forecast",
{"cnt"=>3, "lat"=>latLon[0].toFloat(), "lon"=>latLon[1].toFloat(),"appid"=>"your api key here"}, {}, method(:onReceive));