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

# shape.MultiPolygon

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

"Multipolygon" pixel shape.

[Constructor](#constructor-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
shape.MultiPolygon(pixelGeometry[, params])
```

Creates the shape.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`pixelGeometry`](#param-pixelGeometry)[*](*star) | — | Type: [IPixelMultiPolygonGeometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPixelMultiPolygonGeometry.md)

Pixel geometry of a shape. ||
|| [`params`](#param-params) | — | Type: Object

Shape parameters. ||
|| [`params.fill`](#param-params.fill) | true | Type: Boolean

Flag for filling the shape. ||
|| [`params.outline`](#param-params.outline) | true | Type: Boolean

Flag for an outline. ||
|| [`params.strokeWidth`](#param-params.strokeWidth) | 0 | Type: Number

The outline width, in pixels. ||
|#

\* Mandatory parameter/option.

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [contains](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#contains)([position](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#contains-param-position)) | Boolean | Checks whether the passed point is located inside the shape.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#contains). ||
|| [equals](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#equals)([shape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#equals-param-shape)) | Boolean | Returns true if the passed shape is equivalent to the given one.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#equals). ||
|| [getBounds](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#getBounds)() | Number[][]\|null | Returns coordinates of the two opposite corners of the area spanning the shape. The first item in the array is the corner with the smallest coordinate values relative to the rest of the points in the area; the second item is the corner with the largest coordinate values.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#getBounds). ||
|| [getGeometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#getGeometry)() | [IPixelGeometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPixelGeometry.md) | Returns pixel geometry of a shape.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#getGeometry). ||
|| [getType](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#getType)() | String | Returns ID of the shape type.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#getType). ||
|| [scale](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#scale)([factor](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#scale-param-factor)) | [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md) | Creates a scaled copy of the shape.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#scale). ||
|| [shift](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#shift)([offset](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#shift-param-offset)) | [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md) | Creates a copy of the shape that is shifted by the specified amount.

Inherited from [IShape](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IShape.md#shift). ||
|#


[*star]: Mandatory parameter/option.