---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/examples/cases/circleEditor.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/llms.txt

# Редактор круга

<iframe id="LIVE-EXAMPLE" style="width:100%;height: 400px;border-radius: 8px;border: 1px solid rgba(92, 94, 102, 0.14);" frameBorder="0" src="https://yastatic.net/s3/front-maps-static/maps-front-jsapi-v2-1/examples/2/out/s3-cases/ru/circleEditor/index.html" allow="fullscreen"></iframe>

<a target="_blank" rel="noopener noreferrer" style="display: inline-block;margin-top: 10px;cursor: pointer;border-radius: 4px;padding: 9px 12px;background: #151515;color: white;text-decoration: none;font-weight: 500" href="https://codesandbox.io/p/sandbox/4qk95g?file=index.html">Open in CodeSandbox</a>

<div id="references">
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/ready">ready</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/Map">Map</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/Circle">Circle</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/map.GeoObjects">map.GeoObjects</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/geometryEditor.Circle">geometryEditor.Circle</a>
</div>
<p>
    Для круга доступен <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/dg/concepts/geoobjects#visual_editing">визуальный редактор</a>. Через визуальное редактирование можно изменять радиус круга. Ссылка на редактор содержится в поле <a href="https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/GeoObject#editor">editor</a> объекта-круга.
</p>

{% list tabs %}

-   index.html

    ```html
    <!DOCTYPE html>
    <html>
        <head>
            <title>Редактор круга</title>
            <meta
                http-equiv="Content-Type"
                content="text/html; charset=utf-8"
            />
            <!--
            Укажите свой API-ключ. Тестовый ключ НЕ БУДЕТ работать на других сайтах.
            Получить ключ можно в Кабинете разработчика: https://developer.tech.yandex.ru/keys/
        -->
            
            
            
        </head>
        <body>
            <div id="map"></div>
        </body>
    </html>
    ```

-   circleEditor.js

    ```js
    ymaps.ready(init);

    function init() {
        // Создаем карту.
        var myMap = new ymaps.Map(
            "map",
            {
                center: [55.76, 37.64],
                zoom: 10,
                controls: [],
            },
            {
                searchControlProvider: "yandex#search",
            }
        );

        // Создаем круг.
        var myCircle = new ymaps.Circle(
            [
                // Координаты центра круга.
                [55.76, 37.6],
                // Радиус круга в метрах.
                10000,
            ],
            {},
            {
                // Задаем опции круга.
                // Цвет заливки.
                fillColor: "#DB709377",
                // Цвет обводки.
                strokeColor: "#990066",
                // Прозрачность обводки.
                strokeOpacity: 0.8,
                // Ширина обводки в пикселях.
                strokeWidth: 5,
            }
        );

        // Добавляем круг на карту.
        myMap.geoObjects.add(myCircle);

        // Включаем редактирование круга.
        myCircle.editor.startEditing();
    }
    ```

{% endlist %}
