PolygonAnnotationOptions

class PolygonAnnotationOptions : AnnotationOptions<Polygon, PolygonAnnotation>

Builder class from which a polygonAnnotation is created.

Constructors

PolygonAnnotationOptions
Link copied to clipboard
fun PolygonAnnotationOptions()

Types

Companion
Link copied to clipboard
object Companion

Static variables and methods.

Functions

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

Build an annotation

getData
Link copied to clipboard
fun getData(): JsonElement?

Get the arbitrary json data of the annotation.

getDraggable
Link copied to clipboard
fun getDraggable(): Boolean

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

getGeometry
Link copied to clipboard
fun getGeometry(): Polygon?

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

getPoints
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

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

Set the arbitrary json data of the annotation.

withDraggable
Link copied to clipboard
fun withDraggable(draggable: Boolean): PolygonAnnotationOptions

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

withFillColor
Link copied to clipboard
fun withFillColor(@ColorInt fillColor: Int): PolygonAnnotationOptions
fun withFillColor(fillColor: String): PolygonAnnotationOptions

Set fill-color to initialise the polygonAnnotation with.

withFillOpacity
Link copied to clipboard
fun withFillOpacity(fillOpacity: Double): PolygonAnnotationOptions

Set fill-opacity to initialise the polygonAnnotation with.

withFillOutlineColor
Link copied to clipboard
fun withFillOutlineColor(@ColorInt fillOutlineColor: Int): PolygonAnnotationOptions
fun withFillOutlineColor(fillOutlineColor: String): PolygonAnnotationOptions

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

withFillPattern
Link copied to clipboard
fun withFillPattern(fillPattern: String): PolygonAnnotationOptions

Set fill-pattern to initialise the polygonAnnotation with.

withFillSortKey
Link copied to clipboard
fun withFillSortKey(fillSortKey: Double): PolygonAnnotationOptions

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

withGeometry
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

withPoints
Link copied to clipboard
fun withPoints(points: List<List<Point>>): PolygonAnnotationOptions

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

Properties

fillColor
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.

fillOpacity
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.

fillOutlineColor
Link copied to clipboard
var fillOutlineColor: String? = null

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

fillPattern
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.

fillSortKey
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.