A geolocation API is a high-level interface used to locate information. It lets you find out where the user is and keep a track of his/her location when he/she moves. The geolocation API is device-agnostic of the underlying location source and doesn't care how the web browser determines the location. The following are the common sources for the location:
GPS
The network IP address
RFID
Wi-Fi
The Bluetooth MAC address
The GSM/CDMA cell ID
User inputs
The API represents location by latitude and longitude coordinates.
The geolocation API has the following classes: