V
V
Vladimir Kai2018-12-19 12:31:48
JavaScript
Vladimir Kai, 2018-12-19 12:31:48

How to get a list of settlements from a Yandex map - from a defined. Zones?

Created a delivery zone on the Yandex.Maps service.
For example:
5c1a0fcbc94a2824199801.png
Or
5c1a0fd5c5b4a324851726.png
How can I get a list of settlements located in each of the zones?
Names are required

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey Ukolov, 2016-02-16
@ddimonn8080

The first option allows you to separate the libraries from the linking code. In this case, you can move someFunction into a separate package and reuse it from project to project. Well, it just helps keep the code clean.
The second option is good because the function does not flow beyond the boundaries of the closure, but in reality this is a dubious plus.

N
nikosias, 2016-02-16
@nikosias

the first option can be done
(function(){
function someFunction(){
//some code
}
$(document).ready(someFunction);
})();
The second option is only if you want to close the function in scope $(document).ready(function(){
...
});

I
Ilya, 2018-12-19
@jasper-blondin

Maybe try math?
Take a list of settlements whose coordinates are within a large zone (outer figure). And exclude from the list the list of settlements, the coordinates of which are within the small zone (inner figure). Then, by coordinates, pull out information about settlements.
As an option. But it is better to first clarify in the Yandex TP.

A
Alexey Bespalov, 2018-12-19
@FreeArcher

It is better to ask in Yandex. I have not seen this in their API. But I didn't specifically look for it.

D
DanilGH, 2021-02-17
@DanilGH

It seems that more than two years have passed, maybe there was a solution? Or is it still an unresolved issue?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question