Generating the Weather widget location code based on an address

  • 1
  • Question
  • Updated 5 years ago
The weather widget seems to use a code for the region in the format of (location=FRXX0076) I'm wondering how I can generate this code, either with the Weather API or other means. I need to be able to do this dynamically, based on a lat lng or address. I can geocode that lat lng and get other informatio, but I'm still unsure what everything in this code represents. The widget does not seem to accept an address or simple city and state. Thank you!

Example of the weather widget script:
Photo of mrbooie

mrbooie

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of WunderWilliam

WunderWilliam

  • 267 Posts
  • 18 Reply Likes
I'm not seeing an example -- could you try pasting it in the message again?
Photo of mrbooie

mrbooie

  • 2 Posts
  • 0 Reply Likes
Hmm, sorry about that.
If you go here and type in "Paris France", it will generate a js script include that has that location code in it.

http://www.weather.com/services/oap/w...

Basically it gives this
http://voap.weather.com/weather/oap/F... in a script tag.

I wish to generate "FRXX0076" based on an address, so I can embed widgets dynamically.
Photo of WunderWilliam

WunderWilliam

  • 267 Posts
  • 18 Reply Likes
I don't believe the wunderground.com API uses those codes. That's something specific to weather.com.