Help with Weather App Project


So I am working on my weather app and I have managed to get the longitude/latitude and I have copied this the part (the commented part in the project ) and it is supposed to give me the city name when given the longitude/latitude coordinates but it is just returning an error.???

Project link

This is the post that I retrieved the code from:


The stackoverflow post has java code not javascript

this is the javascript reference to get an address from coordinates


That stack overflow article is for native android apps, try the recommended approaches mentioned here instead:

I’ve written a codepen to help show how to do it as well:


Thanks guys I got it now .