How to get the location of a user? convert lat lng to country name

I need to get the location of the user and then show them on the Home page. As in this picture, you can see it.

I need to make such things, How can I do that, particularly in Custom code?

I did, but I had many problems in how to convert lat lng and custom code.

Anyone can help me to do that?

1
6 replies