Answer the question
In order to leave comments, you need to log in
How to get the region and district due to geocoding in Yandex?
I have only one idea:
var myGeocoder = ymaps.geocode(coords, {results: 1});
myGeocoder.then(
function (res) {
var desc = res.geoObjects.get(0).properties.get('description').split(', '),
region = desc[1],
rajon = /район/i.test(desc[2])
? desc[2]
: '';
console.log(region, ' :: ', rajon);
},
function (err) {
alert('Ошибка');
}
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question