From the course: Code Clinic: JavaScript
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using the Geolocation API - JavaScript Tutorial
From the course: Code Clinic: JavaScript
Using the Geolocation API
- [Instructor] So this problem is going to require a couple of solutions. We are going to be using the JavaScript geolocation API, which is gonna give us a series of coordinates for our map and we're gonna use this getCurrentPosition function. You could also use this watchPosition method if you want to create something where somebody is moving. And in addition to that in order to actually display a map we're gonna use the Google Maps API. The Maps API is divided into this different parts, and if you wanna make a dynamic map you can use this Maps JavaScript API. It's a lot more complicated because it's gonna require an account, it's gonna have some limits. Most of the time when I do maps I expect people to sort of go from a normal map into the phones or the devices maps system because it's usually a lot better than if I were to create an entire sort of maps from scratch. I'm not Google and I don't have any satellites so we're just gonna use theirs. And so we're actually gonna use these…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.