R
R
Roman Khodakovsky2016-09-20 14:23:22
JavaScript
Roman Khodakovsky, 2016-09-20 14:23:22

How to get a region polygon through a geocoder and add it to the map?

The essence of the task: you need to enter the region in the line, after which it will be outlined on the map.
I decide with the help of SuggestView-> we throw the selected element into the geocoder, and it returns a collection to us. Is it possible to get a polygon from this collection to add it to the map.
It is not possible to use regions.load, because it is necessary to work with the regions of Georgia.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Korzunov, 2016-09-20
@h_roman

Look at https://github.com/esosedi/regions - there is also a reverse geocoder that allows you to find the desired region by coordinates, and a handle for obtaining the coordinates themselves.
In total, at the beginning we ask Yandex for the coordinates, then for these coordinates we ask esosedi for the regions, select the desired one and show it.
Approximately this is how the backlight works on the main ru.esosedi.org
Georgia is more or less there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question