Skip to Content
API ReferenceMapLzAnnotationConfiguration

LzAnnotationConfiguration

data class LzAnnotationConfiguration(val id: String, val coordinate: LatLng, val floorId: String? = null, val imageUrl: String? = null, val imageRef: String? = null, val imageBitmap: Bitmap? = null, val text: String? = null, val textColor: String? = null, val textFontSize: Float = 12.0f, val textPosition: TextPosition = TextPosition.TOP, val textHaloColor: String? = null, val textHaloWidth: Float = 1.0f, val textHaloBlur: Float = 0.0f, val textBackgroundColor: String? = null, val iconColor: String? = null, val iconSize: Float = 1.0f, val iconCornerRadius: Float = -1f, val borderColor: String? = null, val opacity: Float = 1.0f, val draggable: Boolean = false, val isFlat: Boolean = false, val rawBitmapSize: Boolean = false)

Comprehensive configuration for a map annotation (marker), providing iOS-parity customization options for icon styling, text rendering, and behavior.

This class mirrors the iOS SDK’s LZAnnotationConfiguration, enabling full control over marker appearance including icon tinting, corner radius, background color, text halo effects, and opacity.

Use LzAnnotationConfigurationBuilder for a fluent construction API.

See also

LzAnnotationConfigurationBuilder
LazarilloMap.addAnnotationWith

Constructors

LzAnnotationConfigurationconstructor(id: String , coordinate: LatLng, floorId: String ? = null, imageUrl: String ? = null, imageRef: String ? = null, imageBitmap: Bitmap ? = null, text: String ? = null, textColor: String ? = null, textFontSize: Float  = 12.0f, textPosition: TextPosition = TextPosition.TOP, textHaloColor: String ? = null, textHaloWidth: Float  = 1.0f, textHaloBlur: Float  = 0.0f, textBackgroundColor: String ? = null, iconColor: String ? = null, iconSize: Float  = 1.0f, iconCornerRadius: Float  = -1f, borderColor: String ? = null, opacity: Float  = 1.0f, draggable: Boolean  = false, isFlat: Boolean  = false, rawBitmapSize: Boolean  = false)

Types

NameSummary
Companionobject Companion

Properties

borderColor

val borderColor: String? = null

CSS-style hex color for a background drawn behind the icon.

coordinate

val coordinate: LatLng

Types: LatLng

Geographic coordinate where the annotation is placed.

draggable

val draggable: Boolean = false

Whether the annotation can be dragged by the user.

floorId

val floorId: String? = null

Indoor floor identifier. Null for outdoor or floor-independent annotations.

iconColor

val iconColor: String? = null

CSS-style hex color to tint the icon bitmap.

iconCornerRadius

val iconCornerRadius: Float

Corner radius for icon shape: -1=circle, 0=square, >0=rounded.

iconSize

val iconSize: Float = 1.0f

Scaling factor for the icon (1.0 = original size).

id

val id: String

Unique identifier for this annotation.

imageBitmap

val imageBitmap: Bitmap? = null

Pre-created bitmap to use as the marker icon.

imageRef

val imageRef: String? = null

Drawable resource name to use as the marker icon.

imageUrl

val imageUrl: String? = null

URL to load a remote image for the marker icon.

isFlat

val isFlat: Boolean = false

Whether the annotation lies flat on the map surface.

opacity

val opacity: Float = 1.0f

Opacity from 0.0 (transparent) to 1.0 (opaque).

rawBitmapSize

val rawBitmapSize: Boolean = false

When true, the imageBitmap is added to the map style at its original pixel size instead of being normalized to MapConstants.DEFAULT_ICON_SIZE. Use this for pre-rendered callout/tooltip bitmaps whose aspect ratio and resolution should be preserved exactly.

text

val text: String? = null

Text label displayed alongside the marker.

textBackgroundColor

val textBackgroundColor: String? = null

CSS-style hex color for a solid background behind the text label. Rendered using a large text halo with zero blur to simulate a filled background. When set, overrides textHaloColor and textHaloWidth.

textColor

val textColor: String? = null

CSS-style hex color for the text label (e.g., “#000000”).

textFontSize

val textFontSize: Float = 12.0f

Font size in pixels for the text label.

textHaloBlur

val textHaloBlur: Float = 0.0f

Blur radius in pixels for the text halo.

textHaloColor

val textHaloColor: String? = null

CSS-style hex color for the text halo (outline).

textHaloWidth

val textHaloWidth: Float = 1.0f

Width in pixels of the text halo.

textPosition

val textPosition: TextPosition

Types: TextPosition

Position of the text label relative to the icon.

Last updated on