Intermediate Front End Projects: Local Weather

Hi there,

Would you mind taking a look at my local weather app, any comment or feedback is appreciated.

Thank you in advance,

Don’t know if the problem is from my end but I get position error all the time

I receive the same error.

Try it now, please !

Nothing’s changed, I still receive the same error. It’s because Chrome no longer supports geolocation on non-secure origins.

Anyway, it’s worth changing your callback on error for something that better describes the error. Like this:

function errorCallback(error) {
    console.error('Error (' + error.code + '): ' + error.message);

Hi @zsoltime,

Thank you for your comments, I have already changed the error callback as requested.

So, I guess, there is no other option than try it using another browser !

Well, would you as a user of your app change browser or just use another app? :slight_smile:

You can use the user’s IP address to get its location. You can use the geolocation API first and if it’s unsuccessful, you can get the location from an IP to location API. I hope it helps.

Of course, I would try another app, but within this scope I would give it a shot with another browser :smiley:

Anyway, I guess other users are facing the same problem when posting their codepen for this project, so it might be worth it, reporting this behavior to @freeCodeCamp.

Thank you for your comments @zsoltime \m/