The geolocation APIs work with another property of the global navigator object ie. Geolocation object which can be made as pursues − var geolocation = navigator.geolocation; A geolocation object is a service object that enables widgets to recover data about the geographic area of the device.
Geolocation Methods
1) getCurrentPosition(): getCurrentPosition() technique retrieves current geographic location of the user.
2) watchPosition(): watchPosition() technique retrieves periodic updates about the current geographic location of the device.
3) clearWatch(): clearWatch() technique cancels an ongoing watchPosition call.