P
P
Petr Ponomarev2017-04-06 23:06:37
Yandex
Petr Ponomarev, 2017-04-06 23:06:37

How to get an object of type: Polygon, which includes the specified point??

There are objects added to the map from the json array.
function parseJson(url){
$.getJSON(url)
.done(function (geoJson) {
geoJson.features.forEach(function (obj) {
// Set balloon content.
inc_price = obj.properties.price;
itogsum = obj.properties .price;
//obj.properties.balloonContent = itogsum;
// Set the preset for labels with the iconCaption field
if (obj.properties.iconCaption) {
obj.options = {
preset: "islands#greenDotIconWithCaption"
}
}
});
// Add a description of the objects in JSON format to the object manager.
objectManager.add(geoJson);
// Add objects to the map.
map.geoObjects.add(objectManager);
});
There is also an input field where the address is entered, through the geocoder I get the coordinates of the point.
How to get exactly the object that includes this point?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2017-04-07
@freeExec

https://tech.yandex.ru/maps/doc/jsapi/2.0/dg/conce...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question