9 - Get Geolocation Data to Find User's GPS Coordinates - JSON APIs and AJAX - freeCodeCamp Tutorial
Ganesh H
We have a navigator object which the browser provides. This has methods to obtain geo location data, including a user's GPS coordinates, with permission of course!
Link to challenge : https://www.freecodecamp.org/learn/data-visualization/json-apis-and-ajax/get-geolocation-data-to-find-a-users-gps-coordinates Concepts: navigator The Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. https://developer.mozilla.org/en-US/docs/Web/API/Navigator
getCurrentPosition() The Geolocation.getCurrentPosition() method is used to get the current position of the device. https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition
GeolocationPosition The GeolocationPosition interface represents the position of the concerned device at a given time. The position, represented by a GeolocationCoordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed. https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition
innerHTML The Element property innerHTML gets or sets the HTML or XML markup contained within the element. https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML -————————————————————————————————————- JSON (JavaScript Object Notation) is an open standard file format, and data interchange format, that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and array data types.
Ajax is a set of web development techniques using many web technologies on the client side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behavior of the existing page.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students practical development experience.
Thanks for Watching! ... https://www.youtube.com/watch?v=CZy5-rTTpQA
14694495 Bytes