Intermediate Front End Projects: Local Weather

Intermediate Front End Projects: Local Weather
0

#1

Hi there,

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

http://codepen.io/utxeee/pen/NRmkqo

Thank you in advance,
utxeee.


#2

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


#3

I receive the same error.


#4

Try it now, please !


#5

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);
}

#6

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 !


#7

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.


#8

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/