Polyline Options
Builder class for creating Polyline instances with a fluent API. A builder for polyline configuration.
Example usage:
val polyline = PolylineOptions()
.add(LatLng(51.5, 0.0))
.add(LatLng(51.6, 0.1))
.color(Color.Blue)
.width(5f)
.strokePattern(PathEffect.dashPathEffect(floatArrayOf(20f, 10f), 0f))
.clickable(true)Functions
Adds a vertex to the end of the polyline.
Adds several vertices in order, e.g. add(a, b, c) from Java.
Adds vertices to the end of the polyline.
Sets whether the polyline is clickable.
Sets the stroke color of the polyline.
Sets the stroke color of the polyline as an ARGB color int. Use this overload from Java, e.g. with android.graphics.Color.RED or 0x800000FF.
Sets the stroke cap style for the end of the polyline.
Sets the shape of the end, e.g. endCap(new RoundCap()) from Java.
Sets whether segments are drawn as geodesics (great-circle paths).
Sets the shape of the corners from a JointType constant, e.g. jointType(JointType.ROUND).
Sets the stroke pattern as dots, dashes and gaps, e.g. listOf(Dot(), Gap(20f)). It is used instead of a strokePattern if not null.
Sets style spans for multi-colored polylines.
Sets the stroke cap style for the start of the polyline.
Sets the shape of the start, e.g. startCap(new RoundCap()) from Java.
Sets the stroke join style for line corners.
Sets the stroke pattern from an android.graphics.PathEffect, e.g. a DashPathEffect from Java.
Sets the stroke pattern of the polyline (dashed, dotted, etc.).
Sets optional user data associated with the polyline.
Sets whether the polyline is visible.
Sets the stroke width of the polyline in pixels.
Sets the z-index for draw order.