I have finished my local weather project. I am not quite happy with it because I can’t get navigator.geolocation.getCurrentPosition to work in Chrome (it works fine with firefox). So I used an API from http://ip-api.com/json to get my current position. Any feedback welcome.
Regarding navigator.getlocation not working in chrome, were you using codepen with https or http? Chrome won’t let any sites without https protocol access your location. Try using https://codepen.io/yourname/yourproject see if it works. The app works well for me (although it’s not very precise with my location, but that’s not your fault). Cheers, and great work!
Now everything work as it should. Thank you very much. Now I can get location by navigator.getlocation.