M
M
mrSeller2018-02-04 02:09:00
Yandex maps
mrSeller, 2018-02-04 02:09:00

How to test the behavior of YMaps.location in different situations?

I determine the user's position using YMaps.location, I build the database of cities and regions according to this service, so that it is convenient to work with the received data and the database.

But I had a question: St. Petersburg and Moscow are cities of federal significance, i.e. they are equated with regions, like regions or republics.
On Avito, for example, there is no city of Moscow in the Moscow Region region, but there is in the Moscow region - and what results will YMaps.location give me?

region: 'Москва',
city: 'Москва'

or
region: 'Московская область',
city: 'Москва'


How can you check? And there may be other situations where a similar test is needed.
The option "Go to Moscow or St. Petersburg and check" is not accepted)

UPD: I also found out that since 2014 Sevastopol has also been equated with a city of federal significance ... braces

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2018-02-04
@mrSeller

Start geocoding with coordinates not from YMaps.location, but Moscow, St. Petersburg and other Sevastopol.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question