PointAnnotation

fun PointAnnotation(point: Point, iconImageBitmap: Bitmap? = null, iconAnchor: IconAnchor? = null, iconImage: String? = null, iconOffset: List<Double>? = null, iconRotate: Double? = null, iconSize: Double? = null, iconTextFit: IconTextFit? = null, iconTextFitPadding: List<Double>? = null, textAnchor: TextAnchor? = null, textField: String? = null, textJustify: TextJustify? = null, textLetterSpacing: Double? = null, textLineHeight: Double? = null, textMaxWidth: Double? = null, textOffset: List<Double>? = null, textRadialOffset: Double? = null, textRotate: Double? = null, textSize: Double? = null, textTransform: TextTransform? = null, iconColorInt: Int? = null, iconColorString: String? = null, iconEmissiveStrength: Double? = null, iconHaloBlur: Double? = null, iconHaloColorInt: Int? = null, iconHaloColorString: String? = null, iconHaloWidth: Double? = null, iconImageCrossFade: Double? = null, iconOpacity: Double? = null, textColorInt: Int? = null, textColorString: String? = null, textEmissiveStrength: Double? = null, textHaloBlur: Double? = null, textHaloColorInt: Int? = null, textHaloColorString: String? = null, textHaloWidth: Double? = null, textOpacity: Double? = null, onClick: (PointAnnotation) -> Boolean = { false })

Composable function to add a PointAnnotation to the Map.

Parameters

point

The Point of the pointAnnotation, which represents the location of the pointAnnotation on the map.

iconImageBitmap

The bitmap image for this Symbol. Not it will not take effect if iconImage has been set.

iconAnchor

Part of the icon placed closest to the anchor.

iconImage

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

iconOffset

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.

iconRotate

Rotates the icon clockwise. The unit of iconRotate is in degrees.

iconSize

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. The unit of iconSize is in factor of the original icon size.

iconTextFit

Scales the icon to fit around the associated text.

iconTextFitPadding

Size of the additional area added to dimensions determined by {@link Property.ICON_TEXT_FIT}, in clockwise order: top, right, bottom, left. The unit of iconTextFitPadding is in density-independent pixels.

textAnchor

Part of the text placed closest to the anchor.

textField

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. SDF images are not supported in formatted text and will be ignored.

textJustify

Text justification options.

textLetterSpacing

Text tracking amount. The unit of textLetterSpacing is in ems.

textLineHeight

Text leading value for multi-line text. The unit of textLineHeight is in ems.

textMaxWidth

The maximum line width for text wrapping. The unit of textMaxWidth is in ems.

textOffset

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. The unit of textOffset is in ems.

textRadialOffset

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. The unit of textRadialOffset is in ems.

textRotate

Rotates the text clockwise. The unit of textRotate is in degrees.

textSize

Font size. The unit of textSize is in density-independent pixels.

textTransform

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

iconColorInt

The color of the icon. This can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/. The property is set as Color Int.

iconColorString

The color of the icon. This can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/. The property is set as Color String.

iconEmissiveStrength

Controls the intensity of light emitted on the source features. The unit of iconEmissiveStrength is in intensity.

iconHaloBlur

Fade out the halo towards the outside. The unit of iconHaloBlur is in density-independent pixels.

iconHaloColorInt

The color of the icon's halo. Icon halos can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/. The property is set as Color Int.

iconHaloColorString

The color of the icon's halo. Icon halos can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/. The property is set as Color String.

iconHaloWidth

Distance of halo to the icon outline. The unit of iconHaloWidth is in density-independent pixels.

iconImageCrossFade

Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together.

iconOpacity

The opacity at which the icon will be drawn.

textColorInt

The color with which the text will be drawn. The property is set as Color Int.

textColorString

The color with which the text will be drawn. The property is set as Color String.

textEmissiveStrength

Controls the intensity of light emitted on the source features. The unit of textEmissiveStrength is in intensity.

textHaloBlur

The halo's fadeout distance towards the outside. The unit of textHaloBlur is in density-independent pixels.

textHaloColorInt

The color of the text's halo, which helps it stand out from backgrounds. The property is set as Color Int.

textHaloColorString

The color of the text's halo, which helps it stand out from backgrounds. The property is set as Color String.

textHaloWidth

Distance of halo to the font outline. Max text halo width is 1/4 of the font-size. The unit of textHaloWidth is in density-independent pixels.

textOpacity

The opacity at which the text will be drawn.

onClick

Callback to be invoked when the PointAnnotation is clicked. The clicked PointAnnotation will be passed as parameter.