How do I specify which icon set to use?

  • 2
  • Question
  • Updated 6 years ago
I can't seem to find anyplace in the (limited) documentation or examples about how to specify which Icon set to use in the API request.

By default the API returns the "k" set which appears to be the daytime set of "c".
This is for a desktop weather app and at some point I will make the UI skinable, The icon set required will depend on the skin set by the user.

I can probably work around the issue after the data is downloaded but it would be very handy to specify it in the request.
Photo of GEOSoft

GEOSoft

  • 26 Posts
  • 1 Reply Like

Posted 6 years ago

  • 2
Photo of wigging

wigging

  • 15 Posts
  • 0 Reply Likes
Just change the request like you said when you're specifying which icons to use in your app.

For example,
set #2 is http://icons.wxug.com/i/c/b/partlyclo...
set #3 is http://icons.wxug.com/i/c/c/partlyclo...
etc...
Photo of GEOSoft

GEOSoft

  • 26 Posts
  • 1 Reply Like
Thanks wigging I was just hoping I could specify it in the request string but is easy enough to modify the results to change the icon url.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
That's why we include the field "icon":"partlycloudy", so you can modify the icon URL yourself. Sorry its not a parameter you can pass to the API to pick. Maybe in the future it will be, its a good thought.
Photo of jaketeater

jaketeater

  • 1 Post
  • 1 Reply Like
It would be nice if we could select the icon set through the api, instead of handling later.
Photo of GEOSoft

GEOSoft

  • 26 Posts
  • 1 Reply Like
Thanks again Brendan and I think it would be a great addition.
It works just fine modifying the URL and as it turns out that will be the best way for this app since there are other icon related items to deal with when it comes time to skin it out. For example nt_ depending on the set in use and the time of day.