Icon

@Serializable
data class Icon @JvmOverloads constructor(val url: String, val scaledSize: Size? = null, val anchor: Point? = null)

Data structure for Icons to be used with StoresOverlay or Markers.

Supported image format: PNG, JPG, SVG.

Construct via one of the Icon.Companion factories (fromResource, fromAsset, fromFile, fromPath, fromBitmap, defaultMarker) for engine-agnostic decode, or pass an HTTP(S) URL to the primary constructor for the legacy remote-fetch path.

Constructors

Link copied to clipboard
constructor(image: Bitmap, scaledSize: Size? = null, anchor: Point? = null)
constructor(url: String, scaledSize: Size? = null, anchor: Point? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val anchor: Point? = null

Anchor point for the icon, expressed in pixels from the icon's top-left corner. The anchor point is the pixel that lines up with the marker's geographic position.

Link copied to clipboard
val scaledSize: Size? = null

Size to display the icon in pixel

Link copied to clipboard
val url: String

URL to the icon. HTTP(S) for remote icons, or an opaque cache-key string minted by an Icon.Companion factory for locally-decoded bitmaps.