# Polyline

# Polyline


```
public class Polyline
```

<br />

*** ** * ** ***

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

## Summary

| ### 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/Polyline#getAltitudeMode()()` Returns the altitude mode 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>` | `[getCoordinates](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getCoordinates())()` **This method is deprecated.** Use `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getPath()` instead. <br /> |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getDrawsOccludedSegments()()` Returns the drawsOccludedSegments of the polyline. |
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getGeodesic()()` Returns the geodesic of the polyline. |
| `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/Polyline#getId()()` Returns the id of the polyline. |
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getOuterColor()()` Returns the outer color of the polyline in ARGB format, i.e. 0xffffffff. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#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/Polyline#getPath()()` Returns the coordinates of the polyline. |
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getStrokeColor()()` Returns the stroke color of the polyline in ARGB format, i.e. 0xffffffff. |
| `double` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#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/Polyline#getZIndex()()` Returns the zIndex of the marker. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#remove()()` Removes this polyline from the 3d map scene. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setAltitudeMode(int)(@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int value)` 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/Polyline#setClickListener(com.google.android.gms.maps3d.OnPolylineClickListener)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnPolylineClickListener listener)` Sets the listener for click events on the model. |
| `void` | `[setCoordinates](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setCoordinates(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> value)` **This method is deprecated.** Use `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setPath(java.util.List<com.google.android.gms.maps3d.model.LatLngAltitude>)` instead. <br /> |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setDrawsOccludedSegments(boolean)(boolean value)` Sets the drawsOccludedSegments of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setGeodesic(boolean)(boolean value)` Sets the geodesic of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setOuterColor(int)(int value)` Sets the outer color of the polyline in ARGB format, i.e. 0xffffffff. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setOuterWidth(double)(double value)` 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/Polyline#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> value)` Sets the coordinates of the polyline. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setStrokeColor(int)(int value)` Sets the stroke color of the polyline in ARGB format, i.e. 0xffffffff. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setStrokeWidth(double)(double value)` 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/Polyline#setZIndex(int)(int value)` Sets the zIndex of the marker. |

## Public methods

### getAltitudeMode

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

Returns the altitude mode of the polyline.

### getCoordinates

```
public List<LatLngAltitude> [getCoordinates](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getCoordinates())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#getPath()` instead.

Returns the coordinates of the polyline.

### getDrawsOccludedSegments

```
public boolean getDrawsOccludedSegments()
```

Returns the drawsOccludedSegments of the polyline.

### getGeodesic

```
public boolean getGeodesic()
```

Returns the geodesic of the polyline.

### getId

```
public String getId()
```

Returns the id of the polyline.

### getOuterColor

```
public int getOuterColor()
```

Returns the outer color of the polyline in ARGB format, i.e. 0xffffffff.

### getOuterWidth

```
public double getOuterWidth()
```

Returns the outer width of the polyline.

### getPath

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

Returns the coordinates of the polyline.

### getStrokeColor

```
public int getStrokeColor()
```

Returns the stroke color of the polyline in ARGB format, i.e. 0xffffffff.

### getStrokeWidth

```
public double getStrokeWidth()
```

Returns the stroke width of the polyline.

### getZIndex

```
public int getZIndex()
```

Returns the zIndex of the marker.

### remove

```
public void remove()
```

Removes this polyline from the 3d map scene.

### setAltitudeMode

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

Sets the altitude mode of the polyline.

### setClickListener

```
public void setClickListener(@Nullable OnPolylineClickListener listener)
```

Sets the listener for click events on the model.

### setCoordinates

```
public void [setCoordinates](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setCoordinates(java.util.List<com.google.android.gms.maps3d.model.LatLngAltitude>))(List<LatLngAltitude> value)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Polyline#setPath(java.util.List<com.google.android.gms.maps3d.model.LatLngAltitude>)` instead.

Sets the coordinates of the polyline.

### setDrawsOccludedSegments

```
public void setDrawsOccludedSegments(boolean value)
```

Sets the drawsOccludedSegments of the polyline.

### setGeodesic

```
public void setGeodesic(boolean value)
```

Sets the geodesic of the polyline.

### setOuterColor

```
public void setOuterColor(int value)
```

Sets the outer color of the polyline in ARGB format, i.e. 0xffffffff.

### setOuterWidth

```
public void setOuterWidth(double value)
```

Sets the outer width of the polyline.

### setPath

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

Sets the coordinates of the polyline.

### setStrokeColor

```
public void setStrokeColor(int value)
```

Sets the stroke color of the polyline in ARGB format, i.e. 0xffffffff.

### setStrokeWidth

```
public void setStrokeWidth(double value)
```

Sets the stroke width of the polyline.

### setZIndex

```
public void setZIndex(int value)
```

Sets the zIndex of the marker.