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

# ICircleGeometryAccess

Extends [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md).

Interface for access to the "Circle" geometry.

[Constructor](#constructor-summary) | [Fields](#properties-summary) | [Events](#events-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
ICircleGeometryAccess()
```

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [events](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#events) | [IEventManager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md) | Event manager for the object.

Inherited from [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#events). ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [change](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#event-change) | Changed coordinates. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- oldCoordinates - Old coordinates of the center.
- newCoordinates - New coordinates of the center.
- oldRadius - Old radius.
- newRadius - New radius. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [contains](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#contains)([position](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#contains-param-position)) | Boolean | Checks whether the passed point is located inside the circle. ||
|| [freeze](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#freeze)() | [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md) | Switches the object to "frozen" mode.

Inherited from [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#freeze). ||
|| [getClosest](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#getClosest)([anchorPosition](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#getClosest-param-anchorPosition)) | Object | Searches for a point on the circle closest to the anchorPosition. ||
|| [getCoordinates](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#getCoordinates)() | Number[]\|null | Returns coordinates of the center of the circle. ||
|| [getRadius](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#getRadius)() | Number | Returns radius of the circle. ||
|| [isFrozen](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#isFrozen)() | Boolean | Returns true if the object is in "frozen" mode, otherwise false.

Inherited from [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#isFrozen). ||
|| [setCoordinates](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#setCoordinates)([coordinates](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#setCoordinates-param-coordinates)) | [ICircleGeometryAccess](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md) | Sets the coordinates of the center of the circle. ||
|| [setRadius](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#setRadius)([radius](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md#setRadius-param-radius)) | [ICircleGeometryAccess](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICircleGeometryAccess.md) | Sets the radius of the circle. ||
|| [unfreeze](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#unfreeze)() | [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md) | Switches the object to active mode.

Inherited from [IFreezable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IFreezable.md#unfreeze). ||
|#

## Events details {#event_detail}

### change {#change}

Changed coordinates. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- oldCoordinates - Old coordinates of the center.
- newCoordinates - New coordinates of the center.
- oldRadius - Old radius.
- newRadius - New radius.

## Methods details {#method_detail}

### contains {#contains}

```javascript
{Boolean} contains(position)
```

Checks whether the passed point is located inside the circle.

**Returns** an indicator for whether the point belongs to the circle.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`position`](#contains-param-position)[*](*star) | — | Type: Number[]

Coordinates of a point. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
var myCircle = new ymaps.geometry.base.Circle([0, 0], 10);
myCircle.contains([0, 10]); // => true
```

### getClosest {#getClosest}

```javascript
{Object} getClosest(anchorPosition)
```

Searches for a point on the circle closest to the anchorPosition.

**Returns** an object with the following fields: 
- position - Point on the circle closest to "anchorPosition".
- distance - Distance from "anchorPosition" to "position".

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`anchorPosition`](#getClosest-param-anchorPosition)[*](*star) | — | Type: Number[]

Coordinates of a point for which the nearest point on the circle is calculated. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
var myCircle = new ymaps.geometry.base.Circle([0, 0], 10);
myCircle.getClosest([0, 15]).position; // => [0, 10]
```

### getCoordinates {#getCoordinates}

```javascript
{Number[]|null} getCoordinates()
```

**Returns** coordinates of the center of the circle.

### getRadius {#getRadius}

```javascript
{Number} getRadius()
```

**Returns** radius of the circle.

### setCoordinates {#setCoordinates}

```javascript
{ICircleGeometryAccess} setCoordinates(coordinates)
```

Sets the coordinates of the center of the circle.

**Returns** self-reference.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`coordinates`](#setCoordinates-param-coordinates)[*](*star) | — | Type: Number[]\|null

Coordinates of the center of the circle. ||
|#

\* Mandatory parameter/option.

### setRadius {#setRadius}

```javascript
{ICircleGeometryAccess} setRadius(radius)
```

Sets the radius of the circle.

**Returns** self-reference.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`radius`](#setRadius-param-radius)[*](*star) | — | Type: Number

Radius of the circle. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.