---
keywords: gml:LineString
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/maps/ymapsml/doc/en/llms.txt


# gml:LineString

### Diagram

![](../_images/LineString.png)

### Description {#desc}

Specifies the "Polyline" type of geo object.

This tag indicates that a geo object is a polyline and contains a description of its points.

There are two ways to set the point coordinates of a polyline:

1. Using multiple [gml: pos](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md) tags.
1. Using the [gml: posList](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md) tag.

In the first case, the coordinates of each point are wrapped in a separate[gml: pos](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md) tag; in the second case, they are listed in a more compact way within one [gml: posList](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md) tag.

{% note tip %}

It is recommended to use the [gml: posList](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md) tag for describing a polyline with a large number of points.

{% endnote %}

### Contains:

[gml:description](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-description.md), [gml:metaDataProperty](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-metaDataProperty.md), [gml:name](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-name.md), [gml:pos](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md), [gml:posList](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md)

### May be included in elements by substitutions:

[ymaps:GeoObject](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/ymaps-GeoObject.md)

> ### gml:LineString
> 
> Part of a YMapsML document that describes the coordinates of the ends of a line segment:
> 
> ```xml
> <gml:LineString>
>     <gml:pos>32.199411 58.601185</gml:pos>
>     <gml:pos>32.189411 58.595185</gml:pos>
> </gml:LineString>
> ```

