A
A
Anton2018-10-13 19:56:12
API
Anton, 2018-10-13 19:56:12

Determining the city by ip and displaying the city on the site, which option is better?

Hello, the question arose of determining the city of the site visitor and displaying it on the site.
At the moment, there is Yandex, but it somehow does not determine exactly, if you enter from a mobile phone, it shows a completely different city.
Which option is the most convenient and best, maybe someone came across this question at one time and tried different options and came to a general conclusion which option for determining the city is better.
I know two options so far:
Through the Yandex api - https://yandex.ru/blog/mapsapi/opredelenie-goroda-...
Sypex Geo - https://habr.com/post/146597/
Both options are not shown quite accurately.
Only cities are determined, and if the village, villages, etc., they don’t show something like that. Although I logged in today from the phone and usually showed Khabarovsk to me, although I am from Vladivostok, but from the phone today it showed Mastakh Village in general. )
Or somehow by coordinates it is possible to determine where a person is located and to assign the nearest city, can something like this be done?
Is it possible to implement through doublegis, there is generally a good card, there is just everything.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey, 2018-10-13
@VELIK505

I like maxmind (countries and cities) in principle, I don’t notice jambs at all lately.
The only thing that's toko if the village is likely to give out the nearest city. (but maybe there are villages in the paid version) I have been using their free databases of countries and cities for 4 years already, I’m happy as an elephant (they also periodically update free databases) and no api is needed.

D
Dimonchik, 2018-10-13
@dimonchik2013

https://www.maxmind.com/en/locate-my-ip-address
there will be no miracles with mobils, yanleks can collect coordinates and ip, but the operator's lies can change

A
Alex_B, 2019-03-26
@Aleks_B

Yes, the geolocation of mobile devices is a rather complicated matter, and indeed miracles are not to be expected here.
But regarding the API, I can advise BigDataCloud.net . They provide an extremely fast and accurate API.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question