# PolylineOptions


```
public class PolylineOptions implements Parcelable
```

<br />

*** ** * ** ***

A representation of a polyline object in a 3D map.

## Summary

| ### Public fields |
|---|---|
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#altitudeMode()` |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#drawsOccludedSegments()` |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#extruded()` |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#geodesic()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#id()` |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#outerColor()` |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#outerWidth()` |
| `https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude>` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#path()` |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#strokeColor()` |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#strokeWidth()` |
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#zIndex()` |

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#PolylineOptions()()` Default constructor for PolylineOptions. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#PolylineOptions(java.lang.String,java.util.List<com.google.android.gms.maps3d.model.LatLngAltitude>,int,int,double,int,double,boolean,boolean,boolean,int)( https://developer.android.com/reference/java/lang/String.html id, https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude> path, @https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode, @https://developer.android.com/reference/androidx/annotation/ColorInt.html int strokeColor, double strokeWidth, @https://developer.android.com/reference/androidx/annotation/ColorInt.html int outerColor, double outerWidth, boolean geodesic, boolean extruded, boolean drawsOccludedSegments, int zIndex )` Constructor for PolylineOptions with parameters for required fields. |

| ### Public methods |
|---|---|
| `int` | `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getAltitudeMode()()` Returns the altitude mode of the polyline. |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getDrawsOccludedSegments()()` Returns whether the polyline draws occluded segments. |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getExtruded()()` Returns whether the polyline is extruded. |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getGeodesic()()` Returns whether the polyline is geodesic. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getId()()` Returns the ID of the polyline. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getOuterColor()()` Returns the outer color of the polyline in ARGB format. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getOuterWidth()()` Returns the outer width of the polyline. |
| `https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude>` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getPath()()` Returns the coordinates of the polyline. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getStrokeColor()()` Returns the stroke color of the polyline in ARGB format. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getStrokeWidth()()` Returns the stroke width of the polyline. |
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#getZIndex()()` Returns the z-index of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setAltitudeMode(int)(@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode)` Sets the altitude mode of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setDrawsOccludedSegments(boolean)(boolean drawsOccludedSegments)` Sets whether the polyline draws occluded segments. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setExtruded(boolean)(boolean extruded)` Sets whether the polyline is extruded. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setGeodesic(boolean)(boolean geodesic)` Sets whether the polyline is geodesic. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setId(java.lang.String)(https://developer.android.com/reference/java/lang/String.html id)` Sets the ID of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setOuterColor(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt.html int outerColor)` Sets the outer color of the polyline in ARGB format. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setOuterWidth(double)(double outerWidth)` Sets the outer width of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setPath(java.util.List<com.google.android.gms.maps3d.model.LatLngAltitude>)(https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude> path)` Sets the coordinates of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setStrokeColor(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt.html int strokeColor)` Sets the stroke color of the polyline in ARGB format. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setStrokeWidth(double)(double strokeWidth)` Sets the stroke width of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#setZIndex(int)(int zIndex)` Sets the z-index of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#writeToParcel(android.os.Parcel,int)(https://developer.android.com/reference/android/os/Parcel.html out, int flags)` |

| ### Extension functions |
|---|---|
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ValidatorsKt.https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions#(com.google.android.gms.maps3d.model.PolylineOptions).validate()(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions receiver)` Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions` object. |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited methods

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract int` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()`

## Public fields

### altitudeMode

```
public int altitudeMode
```

### drawsOccludedSegments

```
public boolean drawsOccludedSegments
```

### extruded

```
public boolean extruded
```

### geodesic

```
public boolean geodesic
```

### id

```
public String id
```

### outerColor

```
public @ColorInt int outerColor
```

### outerWidth

```
public double outerWidth
```

### path

```
public List<LatLngAltitude> path
```

### strokeColor

```
public @ColorInt int strokeColor
```

### strokeWidth

```
public double strokeWidth
```

### zIndex

```
public int zIndex
```

## Public constructors

### PolylineOptions

```
public PolylineOptions()
```

Default constructor for PolylineOptions.

### PolylineOptions

```
public PolylineOptions(
    String id,
    List<LatLngAltitude> path,
    @AltitudeMode int altitudeMode,
    @ColorInt int strokeColor,
    double strokeWidth,
    @ColorInt int outerColor,
    double outerWidth,
    boolean geodesic,
    boolean extruded,
    boolean drawsOccludedSegments,
    int zIndex
)
```

Constructor for PolylineOptions with parameters for required fields.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html id` | The unique identifier of the polyline. |
| `https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude> path` | The coordinates of the polyline. |
| `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode` | The altitude mode of the polyline. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int strokeColor` | The stroke color of the polyline. |
| `double strokeWidth` | The stroke width of the polyline. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int outerColor` | The outer color of the polyline. |
| `double outerWidth` | The outer width of the polyline. |
| `boolean geodesic` | Whether the polyline is geodesic. |
| `boolean extruded` | Whether the polyline is extruded. |
| `boolean drawsOccludedSegments` | Whether the polyline draws occluded segments. |
| `int zIndex` | The z-index of the polyline. |

## Public methods

### getAltitudeMode

```
@AltitudeMode
public int getAltitudeMode()
```

Returns the altitude mode of the polyline.

| Returns |
|---|---|
| `int` | the altitude mode of the polyline. |

### getDrawsOccludedSegments

```
public boolean getDrawsOccludedSegments()
```

Returns whether the polyline draws occluded segments.

| Returns |
|---|---|
| `boolean` | whether the polyline draws occluded segments. |

### getExtruded

```
public boolean getExtruded()
```

Returns whether the polyline is extruded.

| Returns |
|---|---|
| `boolean` | whether the polyline is extruded. |

### getGeodesic

```
public boolean getGeodesic()
```

Returns whether the polyline is geodesic.

| Returns |
|---|---|
| `boolean` | whether the polyline is geodesic. |

### getId

```
public String getId()
```

Returns the ID of the polyline.

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | the ID of the polyline. |

### getOuterColor

```
public @ColorInt int getOuterColor()
```

Returns the outer color of the polyline in ARGB format.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | the outer color of the polyline in ARGB format. |

### getOuterWidth

```
public double getOuterWidth()
```

Returns the outer width of the polyline.

| Returns |
|---|---|
| `double` | the outer width of the polyline. |

### getPath

```
public List<LatLngAltitude> getPath()
```

Returns the coordinates of the polyline.

| Returns |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude>` | the coordinates of the polyline. |

### getStrokeColor

```
public @ColorInt int getStrokeColor()
```

Returns the stroke color of the polyline in ARGB format.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | the stroke color of the polyline in ARGB format. |

### getStrokeWidth

```
public double getStrokeWidth()
```

Returns the stroke width of the polyline.

| Returns |
|---|---|
| `double` | the stroke width of the polyline. |

### getZIndex

```
public int getZIndex()
```

Returns the z-index of the polyline.

| Returns |
|---|---|
| `int` | the z-index of the polyline. |

### setAltitudeMode

```
public void setAltitudeMode(@AltitudeMode int altitudeMode)
```

Sets the altitude mode of the polyline.

| Parameters |
|---|---|
| `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode` | the altitude mode of the polyline. |

### setDrawsOccludedSegments

```
public void setDrawsOccludedSegments(boolean drawsOccludedSegments)
```

Sets whether the polyline draws occluded segments.

| Parameters |
|---|---|
| `boolean drawsOccludedSegments` | whether the polyline draws occluded segments. |

### setExtruded

```
public void setExtruded(boolean extruded)
```

Sets whether the polyline is extruded.

| Parameters |
|---|---|
| `boolean extruded` | whether the polyline is extruded. |

### setGeodesic

```
public void setGeodesic(boolean geodesic)
```

Sets whether the polyline is geodesic.

| Parameters |
|---|---|
| `boolean geodesic` | whether the polyline is geodesic. |

### setId

```
public void setId(String id)
```

Sets the ID of the polyline.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html id` | the ID of the polyline. |

### setOuterColor

```
public void setOuterColor(@ColorInt int outerColor)
```

Sets the outer color of the polyline in ARGB format.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int outerColor` | the outer color of the polyline in ARGB format. |

### setOuterWidth

```
public void setOuterWidth(double outerWidth)
```

Sets the outer width of the polyline.

| Parameters |
|---|---|
| `double outerWidth` | the outer width of the polyline. |

### setPath

```
public void setPath(List<LatLngAltitude> path)
```

Sets the coordinates of the polyline.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude> path` | the coordinates of the polyline. |

### setStrokeColor

```
public void setStrokeColor(@ColorInt int strokeColor)
```

Sets the stroke color of the polyline in ARGB format.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int strokeColor` | the stroke color of the polyline in ARGB format. |

### setStrokeWidth

```
public void setStrokeWidth(double strokeWidth)
```

Sets the stroke width of the polyline.

| Parameters |
|---|---|
| `double strokeWidth` | the stroke width of the polyline. |

### setZIndex

```
public void setZIndex(int zIndex)
```

Sets the z-index of the polyline.

| Parameters |
|---|---|
| `int zIndex` | the z-index of the polyline. |

### writeToParcel

```
public void writeToParcel(Parcel out, int flags)
```

## Extension functions

### ValidatorsKt.validate

```
public final void ValidatorsKt.validate(@NonNull PolylineOptions receiver)
```

Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions` object.

| Throws |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PolylineOptions` is not valid. |