+ Start a Discussion
Ajith Anand2Ajith Anand2 

How to determine the current location of a user

Hi, Kindly help me with the below mentioned requirement.

In an object's detail page, there is a custom button, which on being clicked, should update the record with the geolocation (latitude and longitude) of the user.

Please suggest.

This sounds like you want the Geolocation API : 


This allows you to capture the lat/long, and you can then update the record using the techniques in this blog (not mine) : 


Bear in mind that the user typically has to give permission for their current location to be used.
Ajith Anand2Ajith Anand2
Thank you @bob_buzzard
I was able to extract the geographical co-ordinates with Geolocation API. Any suggestions on how to extract the entire address corrosponding to the co-ordinates?