function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Roberto NistiRoberto Nisti 

button to get geolocation

I need to get geolocation from users when they click in a button, I saw some solutions but using javascript. 
My doubt is: are there one way to do it without javascript?

 
Best Answer chosen by Roberto Nisti
Raj VakatiRaj Vakati
I guess in salesforce the only way is using javascript and its easy way .. 

Even if you use the Google API or HTML 5 you need to use the javascript 


Refer some nice articles 

https://crate.io/a/geolocation-101-get-users-location/
https://www.codingame.com/playgrounds/3799/html-geolocation
https://medium.com/@mariorandrade/how-to-use-getcurrentposition-user-location-with-javascript-on-unsecured-pages-76587bdd572c

https://developer.salesforce.com/blogs/developer-relations/2010/07/html-5-geolocation-in-visualforce.html

https://developer.salesforce.com/blogs/developer-relations/2012/10/winter-13-using-apex-and-soql-with-geolocation.html

All Answers

Raj VakatiRaj Vakati
I guess in salesforce the only way is using javascript and its easy way .. 

Even if you use the Google API or HTML 5 you need to use the javascript 


Refer some nice articles 

https://crate.io/a/geolocation-101-get-users-location/
https://www.codingame.com/playgrounds/3799/html-geolocation
https://medium.com/@mariorandrade/how-to-use-getcurrentposition-user-location-with-javascript-on-unsecured-pages-76587bdd572c

https://developer.salesforce.com/blogs/developer-relations/2010/07/html-5-geolocation-in-visualforce.html

https://developer.salesforce.com/blogs/developer-relations/2012/10/winter-13-using-apex-and-soql-with-geolocation.html
This was selected as the best answer
Roberto NistiRoberto Nisti
Thank you Raj