HTML & CSS
/Intermediate
Geolocation API
Definition
An HTML5 API that allows the user to provide their geographical location to web applications.
Explain Like I'm New
It's the browser feature that pops up a prompt saying 'This website wants to know your location. Allow or Block?'. If allowed, it gives the website your precise latitude and longitude.
Real World Example
Opening Google Maps in your browser and clicking 'Find Me', or Uber's web app automatically placing the pin at your current location.
Common Use Cases
- •Finding nearby stores
- •Location-based weather apps
- •Delivery tracking
Interactive Example
Interview Questions
basic
- Can a website get your location secretly??
intermediate
- What protocol is strictly required to use the Geolocation API?