getCurrentPosition

The getCurrentPosition() method of the Geolocation interface is used to get the current position of the device.

MDN Reference