Skip to Content
API ReferenceMapLzPolygonModel

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

LzPolygonModelconstructor(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: String

Hex color string for the polygon fill (e.g. “#0000FF”).

fillOpacity

val fillOpacity: Float = 0.3f

Opacity of the fill, from 0.0 (transparent) to 1.0 (opaque).

identifier

val identifier: String

Unique identifier used to reference this polygon for removal.

strokeColor

val strokeColor: String

Hex color string for the polygon border.

strokeOpacity

val strokeOpacity: Float = 1.0f

Opacity of the border, from 0.0 to 1.0.

strokeWidth

val strokeWidth: Float = 2.0f

Width of the border in density-independent pixels.

Last updated on