PointAnnotationOptions

Builder class from which a pointAnnotation is created.

class PointAnnotationOptions : AnnotationOptions<Point, PointAnnotation>

Constructors

PointAnnotationOptions
Link copied to clipboard
fun PointAnnotationOptions()

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<Point, PointAnnotation, *, *, *, *, *>): PointAnnotation
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 pointAnnotation 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 pointAnnotation, which represents the location of the pointAnnotation on the map

fun getGeometry(): Point?
getPoint
Link copied to clipboard

Get the Point of the pointAnnotation, which represents the location of the pointAnnotation on the map

fun getPoint(): 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): PointAnnotationOptions
withDraggable
Link copied to clipboard

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

fun withDraggable(draggable: Boolean): PointAnnotationOptions
withGeometry
Link copied to clipboard

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

fun withGeometry(geometry: Point): PointAnnotationOptions
withIconAnchor
Link copied to clipboard

Set icon-anchor to initialise the pointAnnotation with.

Part of the icon placed closest to the anchor.

fun withIconAnchor(iconAnchor: IconAnchor): PointAnnotationOptions
withIconColor
Link copied to clipboard

Set icon-color to initialise the pointAnnotation with.

The color of the icon. This can only be used with sdf icons.

fun withIconColor(@ColorInt() iconColor: Int): PointAnnotationOptions
fun withIconColor(iconColor: String): PointAnnotationOptions
withIconHaloBlur
Link copied to clipboard

Set icon-halo-blur to initialise the pointAnnotation with.

Fade out the halo towards the outside.

fun withIconHaloBlur(iconHaloBlur: Double): PointAnnotationOptions
withIconHaloColor
Link copied to clipboard

Set icon-halo-color to initialise the pointAnnotation with.

The color of the icon's halo. Icon halos can only be used with SDF icons.

fun withIconHaloColor(@ColorInt() iconHaloColor: Int): PointAnnotationOptions
fun withIconHaloColor(iconHaloColor: String): PointAnnotationOptions
withIconHaloWidth
Link copied to clipboard

Set icon-halo-width to initialise the pointAnnotation with.

Distance of halo to the icon outline.

fun withIconHaloWidth(iconHaloWidth: Double): PointAnnotationOptions
withIconImage
Link copied to clipboard

Set bitmap icon-image to initialise the symbol.

Will not take effect if a String iconImage name has been set.

fun withIconImage(iconImageBitmap: Bitmap): PointAnnotationOptions

Set icon-image to initialise the pointAnnotation with.

Name of image in sprite to use for drawing an image background.

fun withIconImage(iconImage: String): PointAnnotationOptions
withIconOffset
Link copied to clipboard

Set icon-offset to initialise the pointAnnotation with.

Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of {@link PropertyFactory#iconSize} to obtain the final offset in density-independent pixels. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.

fun withIconOffset(iconOffset: List<Double>): PointAnnotationOptions
withIconOpacity
Link copied to clipboard

Set icon-opacity to initialise the pointAnnotation with.

The opacity at which the icon will be drawn.

fun withIconOpacity(iconOpacity: Double): PointAnnotationOptions
withIconRotate
Link copied to clipboard

Set icon-rotate to initialise the pointAnnotation with.

Rotates the icon clockwise.

fun withIconRotate(iconRotate: Double): PointAnnotationOptions
withIconSize
Link copied to clipboard

Set icon-size to initialise the pointAnnotation with.

Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by {@link PropertyFactory#iconSize}. 1 is the original size; 3 triples the size of the image.

fun withIconSize(iconSize: Double): PointAnnotationOptions
withPoint
Link copied to clipboard

Set the Point of the pointAnnotation, which represents the location of the pointAnnotation on the map

fun withPoint(point: Point): PointAnnotationOptions
withSymbolSortKey
Link copied to clipboard

Set symbol-sort-key to initialise the pointAnnotation with.

Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When {@link PropertyFactory#iconAllowOverlap} or {@link PropertyFactory#textAllowOverlap} is false, features with a lower sort key will have priority during placement. When {@link PropertyFactory#iconAllowOverlap} or {@link PropertyFactory#textAllowOverlap} is set to true, features with a higher sort key will overlap over features with a lower sort key.

fun withSymbolSortKey(symbolSortKey: Double): PointAnnotationOptions
withTextAnchor
Link copied to clipboard

Set text-anchor to initialise the pointAnnotation with.

Part of the text placed closest to the anchor.

fun withTextAnchor(textAnchor: TextAnchor): PointAnnotationOptions
withTextColor
Link copied to clipboard

Set text-color to initialise the pointAnnotation with.

The color with which the text will be drawn.

fun withTextColor(@ColorInt() textColor: Int): PointAnnotationOptions
fun withTextColor(textColor: String): PointAnnotationOptions
withTextField
Link copied to clipboard

Set text-field to initialise the pointAnnotation with.

Value to use for a text label. If a plain string is provided, it will be treated as a formatted with default/inherited formatting options.

fun withTextField(textField: String): PointAnnotationOptions
withTextHaloBlur
Link copied to clipboard

Set text-halo-blur to initialise the pointAnnotation with.

The halo's fadeout distance towards the outside.

fun withTextHaloBlur(textHaloBlur: Double): PointAnnotationOptions
withTextHaloColor
Link copied to clipboard

Set text-halo-color to initialise the pointAnnotation with.

The color of the text's halo, which helps it stand out from backgrounds.

fun withTextHaloColor(@ColorInt() textHaloColor: Int): PointAnnotationOptions
fun withTextHaloColor(textHaloColor: String): PointAnnotationOptions
withTextHaloWidth
Link copied to clipboard

Set text-halo-width to initialise the pointAnnotation with.

Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.

fun withTextHaloWidth(textHaloWidth: Double): PointAnnotationOptions
withTextJustify
Link copied to clipboard

Set text-justify to initialise the pointAnnotation with.

Text justification options.

fun withTextJustify(textJustify: TextJustify): PointAnnotationOptions
withTextLetterSpacing
Link copied to clipboard

Set text-letter-spacing to initialise the pointAnnotation with.

Text tracking amount.

fun withTextLetterSpacing(textLetterSpacing: Double): PointAnnotationOptions
withTextMaxWidth
Link copied to clipboard

Set text-max-width to initialise the pointAnnotation with.

The maximum line width for text wrapping.

fun withTextMaxWidth(textMaxWidth: Double): PointAnnotationOptions
withTextOffset
Link copied to clipboard

Set text-offset to initialise the pointAnnotation with.

Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.

fun withTextOffset(textOffset: List<Double>): PointAnnotationOptions
withTextOpacity
Link copied to clipboard

Set text-opacity to initialise the pointAnnotation with.

The opacity at which the text will be drawn.

fun withTextOpacity(textOpacity: Double): PointAnnotationOptions
withTextRadialOffset
Link copied to clipboard

Set text-radial-offset to initialise the pointAnnotation with.

Radial offset of text, in the direction of the symbol's anchor. Useful in combination with {@link PropertyFactory#textVariableAnchor}, which defaults to using the two-dimensional {@link PropertyFactory#textOffset} if present.

fun withTextRadialOffset(textRadialOffset: Double): PointAnnotationOptions
withTextRotate
Link copied to clipboard

Set text-rotate to initialise the pointAnnotation with.

Rotates the text clockwise.

fun withTextRotate(textRotate: Double): PointAnnotationOptions
withTextSize
Link copied to clipboard

Set text-size to initialise the pointAnnotation with.

Font size.

fun withTextSize(textSize: Double): PointAnnotationOptions
withTextTransform
Link copied to clipboard

Set text-transform to initialise the pointAnnotation with.

Specifies how to capitalize text, similar to the CSS {@link PropertyFactory#textTransform} property.

fun withTextTransform(textTransform: TextTransform): PointAnnotationOptions

Properties

iconAnchor
Link copied to clipboard

Part of the icon placed closest to the anchor.

var iconAnchor: IconAnchor?
iconColor
Link copied to clipboard

The color of the icon. This can only be used with sdf icons.

var iconColor: String?
iconHaloBlur
Link copied to clipboard

Fade out the halo towards the outside.

var iconHaloBlur: Double?
iconHaloColor
Link copied to clipboard

The color of the icon's halo. Icon halos can only be used with SDF icons.

var iconHaloColor: String?
iconHaloWidth
Link copied to clipboard

Distance of halo to the icon outline.

var iconHaloWidth: Double?
iconImage
Link copied to clipboard

Name of image in sprite to use for drawing an image background.

var iconImage: String?
iconOffset
Link copied to clipboard

Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of icon-size to obtain the final offset in pixels. When combined with icon-rotate the offset will be as if the rotated direction was up.

var iconOffset: List<Double>?
iconOpacity
Link copied to clipboard

The opacity at which the icon will be drawn.

var iconOpacity: Double?
iconRotate
Link copied to clipboard

Rotates the icon clockwise.

var iconRotate: Double?
iconSize
Link copied to clipboard

Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by icon-size. 1 is the original size; 3 triples the size of the image.

var iconSize: Double?
symbolSortKey
Link copied to clipboard

Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When icon-allow-overlap or text-allow-overlap is false, features with a lower sort key will have priority during placement. When icon-allow-overlap or text-allow-overlap is set to true, features with a higher sort key will overlap over features with a lower sort key.

var symbolSortKey: Double?
textAnchor
Link copied to clipboard

Part of the text placed closest to the anchor.

var textAnchor: TextAnchor?
textColor
Link copied to clipboard

The color with which the text will be drawn.

var textColor: String?
textField
Link copied to clipboard

Value to use for a text label. If a plain string is provided, it will be treated as a formatted with default/inherited formatting options.

var textField: String?
textHaloBlur
Link copied to clipboard

The halo's fadeout distance towards the outside.

var textHaloBlur: Double?
textHaloColor
Link copied to clipboard

The color of the text's halo, which helps it stand out from backgrounds.

var textHaloColor: String?
textHaloWidth
Link copied to clipboard

Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.

var textHaloWidth: Double?
textJustify
Link copied to clipboard

Text justification options.

var textJustify: TextJustify?
textLetterSpacing
Link copied to clipboard

Text tracking amount.

var textLetterSpacing: Double?
textMaxWidth
Link copied to clipboard

The maximum line width for text wrapping.

var textMaxWidth: Double?
textOffset
Link copied to clipboard

Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.

var textOffset: List<Double>?
textOpacity
Link copied to clipboard

The opacity at which the text will be drawn.

var textOpacity: Double?
textRadialOffset
Link copied to clipboard

Radial offset of text, in the direction of the symbol's anchor. Useful in combination with text-variable-anchor, which defaults to using the two-dimensional text-offset if present.

var textRadialOffset: Double?
textRotate
Link copied to clipboard

Rotates the text clockwise.

var textRotate: Double?
textSize
Link copied to clipboard

Font size.

var textSize: Double?
textTransform
Link copied to clipboard

Specifies how to capitalize text, similar to the CSS text-transform property.

var textTransform: TextTransform?