No weather icon?

No weather icon?
0

#1

I am working on the weather challenge and my queries to the weather API are not returning an icon.

https://fcc-weather-api.glitch.me/api/current?lat=45&lon=-123

returns (relevant portions)

"weather":[  
      {  
         "id":500,
         "main":"Rain",
         "description":"light rain"
      },
      {  
         "id":701,
         "main":"Mist",
         "description":"mist",
         "icon":"50n"
      }
   ],

However, if I change the longitude one degree it works as expected:

https://fcc-weather-api.glitch.me/api/current?lat=45&lon=-122

"weather":[  
      {  
         "id":500,
         "main":"Rain",
         "description":"light rain",
         "icon":"https://cdn.glitch.com/6e8889e5-7a72-48f0-a061-863548450de5%2F10n.png?1499366021399"
      }

For reference here’s my pen: https://codepen.io/mikegcoleman/pen/xPgxrp
Any thoughts?


#2

For this challenge I went to YouTube and followed this guy’s 3 part tutorial. After I followed along and built a weather app like he instructed. I then tested it and made sure it worked. Then I built my own.

For me (on your weather app) the icon came up fine but the temp wasn’t displayed properly. It needs some work.

I understand this is a frustrating tutorial and I got lost when I did mine and everything kind of jumbled. So, I sought some outside help…

So check out this guy’s channel and tutorial… And then learn it so you can build a kick ass weather app of your own…

This is his channel

here is the start to his tutorial.


#3

I am also having the same problem. Some weather conditions have an icon while others don’t. I was instructed by the freeCodeCamp subreddit to change the background depending on the weather using a switch statement. After I finish the Twitch project that’s what I’m gonna do.