Could someone point my onto why my wather app doesn;'t work on mobile?

Could someone point my onto why my wather app doesn;'t work on mobile?
0

#1

https://jadczakd.github.io/weatherapp/
Thanks in advance guys!


#2

It works for me, latest Safari on iOS 10. Make sure you haven’t denied location services to that domain, that your connections are all HTTPS, and that you’re not using some sort of content blocker. If you could describe the problem you’re seeing, or better yet, put the code up on CodePen instead of GHPages, you’ll get better help.


#3

Small point, but when you click C to F it doesn’t switch to say F to C… Maybe a different text message would resolve this?


#4

Fair point totally overlooked that. I will make it update with the next push. Thanks you.
http://codepen.io/jadczakd/full/JRpdvy/ -
here’s a codepen version.
It doesn’t work on my mobile. Huawei, android, chrome browser. Works on desktop.


#6

On line 41

var url = "http://api.openweathermap.org/data/2.5/weather?" +
	"zip=" + zip + "&APPID=" + opwAPI;

try changing it to

var url = "https://crossorigin.me/http://api.openweathermap.org/data/2.5/weather?" +
	"zip=" + zip + "&APPID=" + opwAPI;

If that doesn’t fix it, you should set up Chrome for remote debugging and then add the lines

rehttp.addEventListener('error', function(error) {
    console.log(error);
  });

somewhere in your sendReq function on line 46. That will log any error you’re getting from the XHR object.


#7

I must have been starting at it far too long , since the other link it actually done this way.
Thank you! The link is also great, I didn’t know you could do that, it will definitely help me a lot!