Local Weather App OpenWeatherMap API call not working

Local Weather App OpenWeatherMap API call not working
0

#1

I’ve been stuck on trying to get the API call to the Open Weather Map API working for a while now. After looking at other campers’ projects, I’ve not been able to see a difference in how I’m trying to implement the call. I’m just looking for help on the API call for now. Any assistance would be appreciated!

My pen can be found here: http://codepen.io/jacobwhood/pen/VPOzOE?editors=0011.


#2
var url = "api.openweathermap.org/data/2.5/weather?lat=" + data["lat"].toString()+ "&lon=" + data["lon"].toString() + "&units=imperial"+ "&APPID=314ae717f43dde7ca9e65f7dc9f79b67"

You’re missing the protocol at the beginning of the string. http is all that will work with openweathermap.