Hello everyone!
I have almost completed the weather app and I was so excited until I noticed that it works only using https.
This wouldn’t be a major issue, however it doesn’t work on the ipad and on my android phone, which I think is related to the issue.
It only works on my laptop using https.
Here is my app: https://codepen.io/gerasimosgakis/full/gmJVNw/
If anyone could have a look I would be more than grateful
What makes you say this? It works on my iPhone in Safari, but Chrome isn’t working, so I don’t think it’s an HTTPS issue. If you plug your phone or iPad into your computer via USB, you should be able to open up a debug console and see what’s going on. Exactly how you do this depends on your desktop OS.
I had similar problems with navigator.geolocation so I switched to an api:
$.getJSON("http://ip-api.com/json", function (data) {
lat = data.lat;
lon = data.lon;
/*
* rest of code...
*/
});