[SOLVED] Local Weather Trouble - Not Retrieving Coordinates and JSON

Greetings,

I’m currently building the “show current web” app.
The problem is that trying to access the app with http:// results in an error related to the “getCurrentPosition()” being deprecated and trying to access it with https:// results in an error related to the getJSON being blocked.

Does anyone know how to solve this?
Any other suggestions are also very welcome.

https://codepen.io/WillhelmEdward/pen/dOpEXa

Nevermind!

Found a solution.
It seems like trying to connect to an external https site caused some errors due to security reasons while using http the case was that recent browser updates make them doesn’t support the getCurrentPosition anymore as I said earlier.

The solution was to use http and get the latitude and longitude with another $.getJSON new targeting “http://ip-api.com/json” and retrieving latitude and longitude from it.