# Polyline

#### new Cesium.Polyline(options)
Scene/Polyline.js 48

  A renderable polyline. Create this by calling `PolylineCollection#add`

  Name | Type | Description
  --- | --- | ---

  `options`

  Object

  optional Object with the following properties:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `show` | Boolean | `true` | optional `true` if this polyline will be shown; otherwise, `false`.
  `width` | Number | `1.0` | optional The width of the polyline in pixels.
  `loop` | Boolean | `false` | optional Whether a line segment will be added between the last and first line positions to make this line a loop.
  `material` | Material | `Material.ColorType` | optional The material.
  `positions` | Array.<Cartesian3> |  | optional The positions.
  `id` | Object |  | optional The user-defined object to be returned when this polyline is picked.
  `distanceDisplayCondition` | DistanceDisplayCondition |  | optional The condition specifying at what distance from the camera that this polyline will be displayed.

  ##### See:

  - PolylineCollection

### Members

#### distanceDisplayCondition : DistanceDisplayCondition
Scene/Polyline.js 301

  Gets or sets the condition specifying at what distance from the camera that this polyline will be displayed.
  Default Value: `undefined`

#### id : Object
Scene/Polyline.js 283

  Gets or sets the user-defined object returned when the polyline is picked.

#### loop : Boolean
Scene/Polyline.js 242

  Gets or sets whether a line segment will be added between the first and last polyline positions.

#### material : Material
Scene/Polyline.js 195

  Gets or sets the surface appearance of the polyline. This can be one of several built-in `Material` objects or a custom material, scripted with Fabric.

#### positions : Array.<Cartesian3>
Scene/Polyline.js 154

  Gets or sets the positions of the polyline.

  ##### Example:

      polyline.positions = Cesium.Cartesian3.fromDegreesArray([
          0.0, 0.0,
          10.0, 0.0,
          0.0, 20.0
      ]);

#### show : Boolean
Scene/Polyline.js 125

  Determines if this polyline will be shown. Use this to hide or show a polyline, instead of removing it and re-adding it to the collection.

#### width : Number
Scene/Polyline.js 218

  Gets or sets the width of the polyline.