getting weather forecast passing lat lon only

  • 1
  • Question
  • Updated 6 years ago
Hi. I am a developer passionate about computational design with Processing (Java). Would like to create (for my own use, with my API key) a 3D globe with current weather conditions. My idea is to texturize a sphere with a world map (easy), get latitude longitude on event (could be mouse position on the globe + SPACEBAR to query wunderground). This latter event is doable (I can get lat lon of mouse position on my sphere/planet) but the question is: is it possible to retrieve weather forecast passing lat lon only? Tried but i get a list of weather observation stations... sounds doable? Or do I have to re-query the selected station? JSON parsing is not an issue too (in Processing).
Cheers
Gian Carlo Mingati, Rome, Italy
www.gcmingati.net
Photo of GianCarlo

GianCarlo

  • 4 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of John Celenza

John Celenza

  • 40 Posts
  • 21 Reply Likes
Hello,

This can be done :-)

You should be able to path a URL like:

/api/APIKEY/conditions/forecast/q/37.1,-121.5.json

Where
37.1 is the decimal latitude (positive for Northern Hemisphere)
and
-121.5 is the decimal longitude (positive for Eastern Hemisphere)

I hope this helps!
-John
Photo of GianCarlo

GianCarlo

  • 4 Posts
  • 0 Reply Likes
is doable, it gets weather for that point, very cool. i'll start with a 2d version, based on googlemaps. an overlay will show weather conditions / forecast. also i really like the autocomplete feature, wich could be used to search cities. once a city is selected one could query /forecas AND_pan&zoom to location. for 3d version, i must admit, getting lat lon is not that easy

Thank you very much for the tip :;-)
GC
Photo of GianCarlo

GianCarlo

  • 4 Posts
  • 0 Reply Likes
edit: the autocomplete feature does not works for me (using javaScript only). But the 'page' is almost ready. To retrieve weather info/forecast one will have to drag around the marker. Once released, lat/lon are used to query your service. Weather info will appear on map's infoWindow. Will show up in a few days.
Photo of John Celenza

John Celenza

  • 40 Posts
  • 21 Reply Likes
This sounds great. Let me know if you continue to have trouble with autocomplete and javascript. I wonder if you are having a permissions issue.

Thanks,
John
Photo of so12

so12

  • 2 Posts
  • 0 Reply Likes
Just wanted to know if you want a dynamic weather position in your google maps ? how it works ?

i have 3 markers position

a( 48.889792, 2.368881 )
b(48.82574, 2.274327)
c(48.8588, 2.34738)

with a boucle for in java for example, can i in a one URL get those 3 markers weather ?
like adding parameters for example :

http://api.wunderground.com/api/APIKE...

thanks from france !
Photo of elmottaki

elmottaki

  • 8 Posts
  • 0 Reply Likes
please how to use key with java api to get information about weather i use https://code.google.com/p/wundergroun...
but doesn't work with other station