By Fagault Eric on Tuesday, 21 May 2019
Posted in General Issues
Replies 5
Likes 0
Views 366
Votes 0
Hello,
For the project of a module that I want to integrate into my site EasySocial, I would like to know if you could send me the script that can geolocate the computer of the user.
The extension that I prepare will record the location in the context of professional training.
Best regards.
Eric
Hey there,

I am really sorry for the delay of this reply as it is a public holiday for us here.

Do you mean you would like something like this "detect my location" (screenshot : http://take.ms/roUzHx) ?
·
Wednesday, 22 May 2019 10:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,

In my turn I'm late to answer, it's morning here.

Yes it is exactly that, to then be able to record this position.

Best regards.

Eric
·
Wednesday, 22 May 2019 17:47
·
0 Likes
·
0 Votes
·
0 Comments
·
I think the faster way to learn how to do this, you have to read Google map developer documentation or other location map provider. https://developers.google.com/maps/documentation/javascript/geolocation

By the way, this is the file involved for the detect location functionality, i use address custom field for example :

JoomlaFolder/media/com_easysocial/scripts/vendors/gmaps.js (Google map library)
JoomlaFolder/media/com_easysocial/scripts/apps/fields/user/address/maps.js (look for "{detectButton} click": function)
JoomlaFolder/media/com_easysocial/apps/fields/user/address/themes/default/gmaps.php (render that detect location button)
·
Thursday, 23 May 2019 11:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,
Thank you very much for your answer.
I used these APIs in a module that I developed for the pages of my site EasySocial, but I used the address provided by the customer in the coordinates of his company. (For his page)

I will look at how to detect the position with these APIs.
Best regards.
Eric
·
Thursday, 23 May 2019 20:58
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome.
·
Friday, 24 May 2019 10:18
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post