Getting the user's location with JavaScript (Geolocation API tutorial)

Published: 22 December 2020
on channel: Jonah Lawrence • Dev Pro Tips
11,904
315

Using the Geolocation API to get the coordinates and address of a user with JavaScript

❤ Subscribe: http://bit.ly/SubscribeDPT

In this tutorial, I will show you how to use the navigator.geolocation API and the OpenCage API in JavaScript to get the user's coordinates, address, and city.

We will then use this to improve the weather app from last video
▶ Build a Weather App -    • Build a Weather App with HTML, CSS & ...  

We will make the weather app display the weather for the user's current location as soon as they open the page.

Follow me on Twitter for JavaScript tips and quizzes!
▶   / denvercoder1  

👨‍💻 My code
▶ https://github.com/DenverCoder1/weath...

What topics should I cover next?

Let me know in the comments what you want to see next in my tutorials!

🖥 More Web Development tutorials
▶    • Web Development  

💻 More tutorials
▶    • Tutorials  

🙋‍♂️ Find me on other channels
Discord 🗨️ https://bit.ly/dpt-discord
Twitter ✍   / denvercoder1  
Github 👨‍💻 https://github.com/DenverCoder1
Sponsor 💞 https://github.com/sponsors/DenverCoder1
One-time donation ☕ https://ko-fi.com/jlawrence

💖 SPONSORS 💖
Get your username or a link to your channel here by sponsoring on Github
▶ https://github.com/sponsors/DenverCoder1

🎁 GET FREE STUFF WHILE SUPPORTING MY TUTORIALS
► https://bit.ly/jlawrencepromos


On this page of the site you can watch the video online Getting the user's location with JavaScript (Geolocation API tutorial) with a duration of hours minute second in good quality, which was uploaded by the user Jonah Lawrence • Dev Pro Tips 22 December 2020, share the link with friends and acquaintances, this video has already been watched 11,904 times on youtube and it was liked by 315 viewers. Enjoy your viewing!