Home > @magiclane/maps-sdk > Landmark > getImage

Landmark.getImage() method

Retrieves the primary (main) image for this landmark as raw bytes.

This image is typically used as the icon shown on the map. If no image exists the result is null. For higher-level access use img which returns an Img.

Signature:

getImage(size?: Size, format?: ImageFileFormat, allowResize?: boolean): Uint8Array | null;

Parameters

Parameter

Type

Description

size

Size

(Optional) Optional desired size for the returned image.

format

ImageFileFormat

(Optional) Optional ImageFileFormat preference.

allowResize

boolean

(Optional)

Returns:

Uint8Array | null

Raw image bytes, or null if not available.