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

# geometryEditor.model.ChildLineString

{% note info %}

The constructor of the geometryEditor.model.ChildLineString class is hidden, as this class is not intended for autonomous initialization.

{% endnote %}

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

Model of the child polyline. The constructor is not available in the package.full (a standard set of modules). This module is loaded on demand.

[Fields](#properties-summary) | [Methods](#methods-summary)

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [editor](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#editor) | [IGeometryEditor](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditor.md)| Geometry editor.

Inherited from [IGeometryEditorChildModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#editor). ||
|| [events](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events) | [IEventManager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md)| Event manager.

Inherited from [IEventEmitter](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [geometry](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#geometry) | [IBaseGeometry](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBaseGeometry.md)| Geometry of the model.

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

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [destroy](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#destroy)() | | Destructor.

Inherited from [IGeometryEditorModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#destroy). ||
|| [getAllVerticesNumber](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#getAllVerticesNumber)() | Integer
| Returns the total number of vertexes in the geometry being edited. ||
|| [getEdgeModels](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#getEdgeModels)() | [geometryEditor.model.Edge](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.Edge.md)[]
| Returns an array of models for interim placemarks. ||
|| [getIndex](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#getIndex)() | Integer
| Returns the index of the child polyline in the parent model. ||
|| [getParent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#getParent)() | [IGeometryEditorModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md)
| Returns the parent data model.

Inherited from [IGeometryEditorChildModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#getParent). ||
|| [getPixels](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#getPixels)() | Number[]
| Returns the model's pixel data.

Inherited from [IGeometryEditorModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorModel.md#getPixels). ||
|| [getVertexModels](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#getVertexModels)() | [geometryEditor.model.ChildVertex](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildVertex.md)[]
| Returns an array of models for child vertexes. ||
|| [setIndex](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#setIndex)([index](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#setIndex-param-index)) | | Sets the index of the child polyline in the parent model. ||
|| [setPixels](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#setPixels)([pixels](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#setPixels-param-pixels)) | | Sets the model's pixel data.

Inherited from [IGeometryEditorChildModel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometryEditorChildModel.md#setPixels). ||
|| [spliceVertices](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#spliceVertices)([start](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#spliceVertices-param-start), [deleteCount](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometryEditor.model.ChildLineString.md#spliceVertices-param-deleteCount)) | Number[][]
| Deletes a defined number of polyline vertexes, starting from the specified index. New vertexes can be added in place of the deleted ones. Global pixel coordinates of the new vertexes can be passed as additional arguments after the "deleteCount" parameter. ||
|#

## Methods details {#method_detail}

### getAllVerticesNumber {#getAllVerticesNumber}

```javascript
{Integer} getAllVerticesNumber()
```

**Returns** the total number of vertexes in the geometry being edited.

### getEdgeModels {#getEdgeModels}

```javascript
{geometryEditor.model.Edge[]} getEdgeModels()
```

**Returns** an array of models for interim placemarks.

### getIndex {#getIndex}

```javascript
{Integer} getIndex()
```

**Returns** the index of the child polyline in the parent model.

### getVertexModels {#getVertexModels}

```javascript
{geometryEditor.model.ChildVertex[]} getVertexModels()
```

**Returns** an array of models for child vertexes.

### setIndex {#setIndex}

```javascript
{} setIndex(index)
```

Sets the index of the child polyline in the parent model.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`index`](#setIndex-param-index)[*](*star) | — | Type: Integer

Index of a child vertex. ||
|#

\* Mandatory parameter/option.

### spliceVertices {#spliceVertices}

```javascript
{Number[][]} spliceVertices(start, deleteCount)
```

Deletes a defined number of polyline vertexes, starting from the specified index. New vertexes can be added in place of the deleted ones. Global pixel coordinates of the new vertexes can be passed as additional arguments after the "deleteCount" parameter.

**Returns** an array of coordinates of deleted vertexes.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`start`](#spliceVertices-param-start)[*](*star) | — | Type: Integer

The index to start from for removing and adding vertexes. ||
|| [`deleteCount`](#spliceVertices-param-deleteCount)[*](*star) | — | Type: Integer

The number of deleted vertexes. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.