D
D
daggett2062016-02-15 11:32:13
JavaScript
daggett206, 2016-02-15 11:32:13

How to select a country using yandex api maps?

It is necessary to highlight the region of the country (Belarus) on the Yandex map. It turned out to be implemented through the Regions service, but a little incorrectly - he selected the country and divided it into regions, but I do n’t need division into regions, I need the country as one object. I will be glad for any help! Thanks in advance.

ymaps.regions.load("BY").then(function (result) {
            var regions = result.geoObjects;
            regions.options.set({
                strokeWidth: 2,
                fillColor: 'cccc99',
                strokeColor: 'ccffcc',
                opacity: 0.35,
                hasHint: true
            });
            regionMap.geoObjects.add(regions);
        });

I understand that it is possible to implement the selection as a polygon, but I do not understand where to get the coordinates for its construction.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question