borders.load

Static function.

Provides access to the geometry of various regions and countries. If you are using a content security policy, then you need to add the 'connect-src' rule for the following hosts: https://api-maps.yandex.ru https://suggest-maps.yandex.ru https://*.maps.yandex.net https://yandex.ru

Returns Promise object.

Examples:

1.

// Show objects on the map using ObjectManager
ymaps.borders.load('RU', {
    lang: 'en'
}).then(function (geojson) {
    var features = geojson.features.map(function (feature) {
        feature.id = feature.properties.iso3166;
        return feature;
    });
    var objectManager = new ymaps.ObjectManager();
    objectManager.add(features);
    myMap.geoObjects.add(objectManager);
});

2.

// Show objects on the map using GeoObject
ymaps.borders.load('RU', {
    lang: 'en'
}).then(function (geojson) {
    for (var i = 0; i < geojson.features.length; i++) {
        var geoObject = new ymaps.GeoObject(geojson.features[i]);
        myMap.geoObjects.add(geoObject);
    }
});