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

# Circle

<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/en/circle/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/y95h5w?file=index.html">Open in CodeSandbox</a>

<div id="references">
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ready">ready</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map">Map</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject">GeoObject</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Circle">Circle</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.GeoObjects">map.GeoObjects</a>
</div>
<p>
   A circle can be created using the <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/geoobjects#geometry">Circle</a> class.
</p>
<p>
    When creating a circle, you must specify the coordinates of its center and radius (in meters). You can also set  <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject#constructor-summary">properties</a> (such as the contents of the balloon or hint) and <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject#constructor-summary">options</a> (such as the fill color) for the circle.
</p>
<p>
  Circles can be combined in a <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/geoobjects#geoobject_collections">collection</a>.
</p>

{% list tabs %}

-   index.html

    ```html
    <!DOCTYPE html>
    <html>
        <head>
            <title>Examples. Circle</title>
            <meta
                http-equiv="Content-Type"
                content="text/html; charset=UTF-8"
            />
            <!--
            Set your own API-key. Testing key is not valid for other web-sites and services.
            Get your API-key on the Developer Dashboard: https://developer.tech.yandex.ru/keys/
        -->
            
            
            
        </head>
        <body>
            <div id="map"></div>
        </body>
    </html>
    ```

-   circle.js

    ```js
    ymaps.ready(init);

    function init() {
        // Creating the map.
        var myMap = new ymaps.Map(
            "map",
            {
                center: [55.76, 37.64],
                zoom: 10,
            },
            {
                searchControlProvider: "yandex#search",
            }
        );

        // Creating a circle.
        var myCircle = new ymaps.Circle(
            [
                // The coordinates of the center of the circle.
                [55.76, 37.6],
                // The radius of the circle in meters.
                10000,
            ],
            {
                /**
                 * Describing the properties of the circle.
                 * The contents of the balloon.
                 */
                balloonContent: "Radius of the circle: 10 km",
                // The contents of the hint.
                hintContent: "Move me",
            },
            {
                /**
                 * Setting the circle options.
                 * Enabling drag-n-drop for the circle.
                 */
                draggable: true,
                /**
                 * Fill color.
                 * The last byte (77) defines transparency.
                 * The transparency of the fill can also be set using the option "fillOpacity".
                 */
                fillColor: "#DB709377",
                // Stroke color.
                strokeColor: "#990066",
                // Stroke transparency.
                strokeOpacity: 0.8,
                // The width of the stroke in pixels.
                strokeWidth: 5,
            }
        );

        // Adding the circle to the map.
        myMap.geoObjects.add(myCircle);
    }
    ```

{% endlist %}
