Geolocation doesn't work at codepen

I am making a local weather web, but I cannot use geolocation.

Hi gallegi,

you might need to open codepen with a secure context such as HTTPS (https://codepen.io). The syntax of the API is very well described in this article https://www.w3schools.com/html/html5_geolocation.asp.

Hope that helps.