Polygon
data class Polygon(val points: List<LatLng>, val strokeColor: Color = Color.Black, val strokeWidth: Float = 10.0f, val strokePattern: PathEffect? = null, val strokeCap: StrokeCap = StrokeCap.Butt, val strokeJoin: StrokeJoin = StrokeJoin.Round, val fillColor: Color = Color(red = 128, green = 128, blue = 128, alpha = 128), val holes: List<List<LatLng>> = emptyList(), val geodesic: Boolean = false, val visible: Boolean = true, val clickable: Boolean = false, val zIndex: Float = 0.0f, val tag: Any? = null)(source)
Represents a polygon on the map, consisting of a closed shape with optional holes.
Constructors
Link copied to clipboard
constructor(points: List<LatLng>, strokeColor: Color = Color.Black, strokeWidth: Float = 10.0f, strokePattern: PathEffect? = null, strokeCap: StrokeCap = StrokeCap.Butt, strokeJoin: StrokeJoin = StrokeJoin.Round, fillColor: Color = Color(red = 128, green = 128, blue = 128, alpha = 128), holes: List<List<LatLng>> = emptyList(), geodesic: Boolean = false, visible: Boolean = true, clickable: Boolean = false, zIndex: Float = 0.0f, tag: Any? = null)
Properties
Link copied to clipboard
Color of the polygon outline (default: black)
Link copied to clipboard
Shape of line corners (default: Round)
Link copied to clipboard
Pattern for the stroke (dashed, dotted, etc.). Null means solid line (default: null)
Link copied to clipboard
Width of the outline in pixels (default: 10f)