Show the Local Weather - getCurrentPosition not working over http
See original GitHub issueChallenge Name
Show the Local Weather
https://www.freecodecamp.com/challenges/show-the-local-weather
Issue Description
getCurrentPosition does not work over http. I think that changing the url to codepen.io in that particular challenge would help others campers not thinking their code isn’t correct.
Browser Information
- Browser Name, Version: Chrome 51.0.2704.84 m
- Operating System: Windows 10
- Mobile, Desktop, or Tablet: Desktop
Your Code
// If relevant, paste all of your challenge code in here
Screenshot
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Trying to get local weather - Stack Overflow
Theres a few issues here. Firstly, you don't seem to be calling the getGeoLoc method, so that would be the first fix.
Read more >can't use geolocation API on insecure server (codepen.io ...
Show the Local Weather - can't use geolocation API on insecure server ... I tried to use freegeoip.net in my code, but the...
Read more >Geolocation.getCurrentPosition() - Web APIs | MDN
The Geolocation.getCurrentPosition() method is used to get the current position of the device.
Read more >From Geolocation To Local Weather In React - Medium
However, I wanted a simple app that figures out by itself user's location and shows local weather, with no input from the user....
Read more >National and Local Weather Radar, Daily Forecast, Hurricane ...
The Weather Channel and weather.com provide a national and local weather forecast for cities, as well as weather radar, report and hurricane coverage....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Google will not allow you to get geo location anymore over http. And unfortunately the free version of the suggested API to use (Openweathermap) cannot use https unless you pay for it. Instead I would suggest bypassing google altogether to get geolocation and use http://ip-api.com/json to get the information you need based off the IP address.
@raisedadead Ok? Point is people are trying to complete the challenge going off what they were taught prior to the challenge and they will not be able to unless the pay for open weather map and know that the issue is from using http and not https. Some one with some time on their hands should add that as a note on the challenge in order to ease people’s frustration. I was just pointing out another API that would work with OWM. That was the only one out of several that I tried that was free and got the job done.