G
G
GreyKnight2016-12-16 14:08:03
Geolocation
GreyKnight, 2016-12-16 14:08:03

How to determine the user's location?

Task: automatically select the user's city on the site without asking the user for permission to determine the location.
The definition is planned to be implemented through Yandex.Locator . The specified service allows you to determine the coordinates using:

  1. IP address;
  2. List of Wi-Fi networks;
  3. List of cell towers.

There are no problems with determining the IP address for transmission to the service, but it gives a large error. But I did not find a way to get a list of available Wi-Fi networks and cell towers in the browser. Do they exist?
An alternative solution to the problem is to use the Geolocation API, but using it will require permission to determine the location from the user, and this must be avoided.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Karavaev, 2016-12-16
@Quieteroks

But I did not find a way to get a list of available Wi-Fi networks and cell towers in the browser. Do they exist?

It exists if you enter into agreements with telecom operators to provide such information. Otherwise, you still have to transfer the ip address and ask the User for permission or correct location.
You just need to find the city, why do you need accuracy?

V
Valeriyat, 2016-12-25
@Valeriyat

To determine the user's location by IP, see DaData.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question