PolygonAnnotationOptions

Builder class from which a polygonAnnotation is created.

class PolygonAnnotationOptions : AnnotationOptions<Polygon, PolygonAnnotation>

Constructors

PolygonAnnotationOptions
Link copied to clipboard
fun PolygonAnnotationOptions()

Types

Companion
Link copied to clipboard

Static variables and methods.

object Companion

Functions

build
Link copied to clipboard

Build an annotation

open override fun build(id: Long, annotationManager: AnnotationManager<Polygon, PolygonAnnotation, *, *, *, *, *>): PolygonAnnotation
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getData
Link copied to clipboard

Get the arbitrary json data of the annotation.

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

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

fun getDraggable(): Boolean
getGeometry
Link copied to clipboard

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

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

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

fun getPoints(): List<List<Point>>
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String
withData
Link copied to clipboard

Set the arbitrary json data of the annotation.

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

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

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

Set fill-color to initialise the polygonAnnotation with.

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.

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

Set fill-opacity to initialise the polygonAnnotation with.

The opacity of the entire fill layer. In contrast to the {@link PropertyFactory#fillColor}, this value will also affect the 1px stroke around the fill, if the stroke is used.

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

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

The outline color of the fill. Matches the value of {@link PropertyFactory#fillColor} if unspecified.

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

Set fill-pattern to initialise the polygonAnnotation with.

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.

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

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

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

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

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

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

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

fun withPoints(points: List<List<Point>>): PolygonAnnotationOptions

Properties

fillColor
Link copied to clipboard

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.

var fillColor: String?
fillOpacity
Link copied to clipboard

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.

var fillOpacity: Double?
fillOutlineColor
Link copied to clipboard

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

var fillOutlineColor: String?
fillPattern
Link copied to clipboard

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.

var fillPattern: String?
fillSortKey
Link copied to clipboard

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

var fillSortKey: Double?