Alright, so I’ve been trying to work on this weather site and from reading on the forums there seems to be a bunch of problems with the API’s and getting location data from the browser.
SO, my idea is to actually ask for the location, so in theory, this website would load the weather for anywhere. I’m using a google maps API to get the coordinates, and then I am going to use those coordinates for the dark sky API.
Right now my problem is, for some reason, I cannot get the temperature displayed to update? I am trying to call the function to a variable “coordinates” and put the coordinates variable into the html. Right now I can see in the console that the function does log everything, including the “location” so I am wondering why it does not return and insert into the html?
Currently, I am expecting the app to simply update the text when I push the button and show the location instead. I would later use a form to update the “address” var and then pass the location that’s returned by the getCoordinate function into the query for the dark sky weather api…