S
S
Sergey Eremin2014-07-24 10:38:55
Opera
Sergey Eremin, 2014-07-24 10:38:55

How to get geolocation data from browser?

Chrome, Opera and probably other browsers request geolocation from the user. They explain why it is useful, and how relevance in search engines increases. As a result, many users have this geolocation turned on. How can I get this data from the browser from my own application on the server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Makaveli, 2014-07-24
@Sergei_Erjemin

Use the browser's Geolocation API:
htmlbook.ru/html5/geolocation
Keep in mind that your location is normally determined only if you are connected to the network via Wi-Fi. If by LAN-wire, then, as a rule, just a city is determined. Those coordinates will be given out, which you would get by simply entering the name of the city in the search.

D
deleted, 2014-07-24
@zayac_agito

freegeoip.net
https://www.maxmind.com/en/home
Or.
In general, I think that you can find out all this from the browser and send it to the server yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question