PolygonAnnotationOptions

Builder class from which a polygonAnnotation is created.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
object Companion

Static variables and methods.

Functions

Link copied to clipboard
open override fun build(id: String, annotationManager: AnnotationManager<Polygon, PolygonAnnotation, *, *, *, *, *>): PolygonAnnotation

Build an annotation

Link copied to clipboard
fun getData(): JsonElement?

Get the arbitrary json data of the annotation.

Link copied to clipboard

Returns whether this polygonAnnotation is draggable, meaning it can be dragged across the screen when touched and moved.

Link copied to clipboard
fun getGeometry(): Polygon?

Get the geometry of the polygonAnnotation, which represents the location of the polygonAnnotation on the map

Link copied to clipboard
fun getPoints(): List<List<Point>>

Get a list of lists of Point for the fill, which represents the locations of the fill on the map

Link copied to clipboard
fun withData(jsonElement: JsonElement): PolygonAnnotationOptions

Set the arbitrary json data of the annotation.

Link copied to clipboard

Set whether this polygonAnnotation should be draggable, meaning it can be dragged across the screen when touched and moved.

Link copied to clipboard

Set fill-color to initialise the polygonAnnotation with.

Link copied to clipboard

Set fill-opacity to initialise the polygonAnnotation with.

Link copied to clipboard

Set fill-outline-color to initialise the polygonAnnotation with.

Link copied to clipboard

Set fill-pattern to initialise the polygonAnnotation with.

Link copied to clipboard

Set fill-sort-key to initialise the polygonAnnotation with.

Link copied to clipboard

Set fill-z-offset to initialise the polygonAnnotation with.

Link copied to clipboard
fun withGeometry(geometry: Polygon): PolygonAnnotationOptions

Set the geometry of the polygonAnnotation, which represents the location of the polygonAnnotation on the map

Link copied to clipboard

Set a list of lists of Point for the fill, which represents the locations of the fill on the map

Properties

Link copied to clipboard
var fillColor: String? = null

The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used. Default value: "#000000".

Link copied to clipboard
var fillOpacity: Double? = null

The opacity of the entire fill layer. In contrast to the fill-color, this value will also affect the 1px stroke around the fill, if the stroke is used. Default value: 1. Value range: 0, 1

Link copied to clipboard

The outline color of the fill. Matches the value of fill-color if unspecified.

Link copied to clipboard
var fillPattern: String? = null

Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

Link copied to clipboard
var fillSortKey: Double? = null

Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.

Link copied to clipboard
var fillZOffset: Double? = null

Specifies an uniform elevation in meters. Note: If the value is zero, the layer will be rendered on the ground. Non-zero values will elevate the layer from the sea level, which can cause it to be rendered below the terrain. Default value: 0. Minimum value: 0.

Extensions

Link copied to clipboard

Set fill-color to initialise the polygonAnnotation with.

Link copied to clipboard

Set fill-outline-color to initialise the polygonAnnotation with.