Polygon

data class Polygon(val id: Long = 0, val geoLocations: List<GeoLocation>)

Represents a polygon displayed on a map.

Constructors

Link copied to clipboard
constructor(id: Long = 0, geoLocations: List<GeoLocation>)

Properties

Link copied to clipboard

The list of GeoLocation objects defining the vertices of the polygon. Note: The list should be closed (first and last point should be the same) to represent a complete polygon on a map.

Link copied to clipboard
val id: Long = 0

The database ID of the polygon (defaults to 0).

Functions

Link copied to clipboard

Calculates the bounding box that encompasses all GeoLocations in this Polygon.

Link copied to clipboard

Converts the Polygon model into the view object PolygonViewData used to represent polygons in the UI.