LzPolygonModel
data class LzPolygonModel(val identifier: String, val coordinates: List<LatLng>, val fillColor: String = "#2196F3", val fillOpacity: Float = 0.3f, val strokeColor: String = "#2196F3", val strokeWidth: Float = 2.0f, val strokeOpacity: Float = 1.0f)Describes a polygon overlay to be drawn on the map.
A polygon is a closed shape defined by a list of coordinates (minimum 3). It supports independent fill and stroke styling, matching the iOS SDK’s LZPolygonModel for cross-platform parity.
Constructors
LzPolygonModel | constructor(identifier: String , coordinates: List <LatLng>, fillColor: String = “#2196F3”, fillOpacity: Float = 0.3f, strokeColor: String = “#2196F3”, strokeWidth: Float = 2.0f, strokeOpacity: Float = 1.0f) |
Properties
coordinates
val coordinates: List<LatLng>List of lat/lng pairs defining the polygon vertices (minimum 3).
fillColor
val fillColor: StringHex color string for the polygon fill (e.g. “#0000FF”).
fillOpacity
val fillOpacity: Float = 0.3fOpacity of the fill, from 0.0 (transparent) to 1.0 (opaque).
identifier
val identifier: StringUnique identifier used to reference this polygon for removal.
strokeColor
val strokeColor: StringHex color string for the polygon border.
strokeOpacity
val strokeOpacity: Float = 1.0fOpacity of the border, from 0.0 to 1.0.
strokeWidth
val strokeWidth: Float = 2.0fWidth of the border in density-independent pixels.
Last updated on