PolylineOptions

public class PolylineOptions implements Parcelable


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

Summary

Constants

static final Parcelable.Creator<PolylineOptions>

Public constructors

Default constructor for PolylineOptions.

PolylineOptions(
    String id,
    List<LatLngAltitude> coordinates,
    @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.

Public methods

int

Returns the altitude mode of the polyline.

List<LatLngAltitude>

Returns the coordinates of the polyline.

boolean

Returns whether the polyline draws occluded segments.

boolean

Returns whether the polyline is extruded.

boolean

Returns whether the polyline is geodesic.

String

Returns the ID of the polyline.

@ColorInt int

Returns the outer color of the polyline in ARGB format.

double

Returns the outer width of the polyline.

@ColorInt int

Returns the stroke color of the polyline in ARGB format.

double

Returns the stroke width of the polyline.

int

Returns the z-index of the polyline.

void
setAltitudeMode(@AltitudeMode int altitudeMode)

Sets the altitude mode of the polyline.

void

Sets the coordinates of the polyline.

void
setDrawsOccludedSegments(boolean drawsOccludedSegments)

Sets whether the polyline draws occluded segments.

void
setExtruded(boolean extruded)

Sets whether the polyline is extruded.

void
setGeodesic(boolean geodesic)

Sets whether the polyline is geodesic.

void

Sets the ID of the polyline.

void
setOuterColor(@ColorInt int outerColor)

Sets the outer color of the polyline in ARGB format.

void
setOuterWidth(double outerWidth)

Sets the outer width of the polyline.

void
setStrokeColor(@ColorInt int strokeColor)

Sets the stroke color of the polyline in ARGB format.

void
setStrokeWidth(double strokeWidth)

Sets the stroke width of the polyline.

void
setZIndex(int zIndex)

Sets the z-index of the polyline.

void
writeToParcel(Parcel out, int flags)

Extension functions

final void

Validates a specified PolylineOptions object.

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int

Constants

CREATOR

public static final Parcelable.Creator<PolylineOptionsCREATOR

Public fields

altitudeMode

public int altitudeMode

coordinates

public List<LatLngAltitudecoordinates

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

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> coordinates,
    @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
String id

The unique identifier of the polyline.

List<LatLngAltitude> coordinates

The coordinates of the polyline.

@AltitudeMode int altitudeMode

The altitude mode of the polyline.

@ColorInt int strokeColor

The stroke color of the polyline.

double strokeWidth

The stroke width of the polyline.

@ColorInt 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.

getCoordinates

public List<LatLngAltitudegetCoordinates()

Returns the coordinates of the polyline.

Returns
List<LatLngAltitude>

the coordinates 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
String

the ID of the polyline.

getOuterColor

public @ColorInt int getOuterColor()

Returns the outer color of the polyline in ARGB format.

Returns
@ColorInt 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.

getStrokeColor

public @ColorInt int getStrokeColor()

Returns the stroke color of the polyline in ARGB format.

Returns
@ColorInt 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
@AltitudeMode int altitudeMode

the altitude mode of the polyline.

setCoordinates

public void setCoordinates(List<LatLngAltitude> coordinates)

Sets the coordinates of the polyline.

Parameters
List<LatLngAltitude> coordinates

the coordinates 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
String id

the ID of the polyline.

setOuterColor

public void setOuterColor(@ColorInt int outerColor)

Sets the outer color of the polyline in ARGB format.

Parameters
@ColorInt 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.

setStrokeColor

public void setStrokeColor(@ColorInt int strokeColor)

Sets the stroke color of the polyline in ARGB format.

Parameters
@ColorInt 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 PolylineOptions object.