image

Returns an image type for use in iconImage (see dev.sargunv.maplibrecompose.compose.layer.SymbolLayer), pattern entries (see dev.sargunv.maplibrecompose.compose.layer.BackgroundLayer, dev.sargunv.maplibrecompose.compose.layer.FillLayer, dev.sargunv.maplibrecompose.compose.layer.FillExtrusionLayer, dev.sargunv.maplibrecompose.compose.layer.LineLayer) and as a section in the format expression.

If set, the image argument will check that the requested image exists in the style and will return either the resolved image name or null, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the image argument.


Returns an image type for use in iconImage (see dev.sargunv.maplibrecompose.compose.layer.SymbolLayer), pattern entries (see dev.sargunv.maplibrecompose.compose.layer.BackgroundLayer, dev.sargunv.maplibrecompose.compose.layer.FillLayer, dev.sargunv.maplibrecompose.compose.layer.FillExtrusionLayer, dev.sargunv.maplibrecompose.compose.layer.LineLayer) and as a section in the format expression.

The image argument will check that the requested image exists in the style and will return either the resolved image name or null, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the image argument.


fun image(value: ImageBitmap, sdf: Boolean = false): Expression<ImageValue>(source)

Returns an image type for use in iconImage (see dev.sargunv.maplibrecompose.compose.layer.SymbolLayer), pattern entries (see dev.sargunv.maplibrecompose.compose.layer.BackgroundLayer, dev.sargunv.maplibrecompose.compose.layer.FillLayer, dev.sargunv.maplibrecompose.compose.layer.FillExtrusionLayer, dev.sargunv.maplibrecompose.compose.layer.LineLayer) and as a section in the format expression.

The ImageBitmap will be registered with the style when it's referenced by a layer, and unregistered from the style if it's no longer referenced by any layer. An ID referencing the bitmap will be generated automatically and inserted into the expression.


fun image(value: Painter, size: DpSize? = null, sdf: Boolean = false): Expression<ImageValue>(source)

Returns an image type for use in iconImage (see dev.sargunv.maplibrecompose.compose.layer.SymbolLayer), pattern entries (see dev.sargunv.maplibrecompose.compose.layer.BackgroundLayer, dev.sargunv.maplibrecompose.compose.layer.FillLayer, dev.sargunv.maplibrecompose.compose.layer.FillExtrusionLayer, dev.sargunv.maplibrecompose.compose.layer.LineLayer) and as a section in the format expression.

The Painter will be drawn to an ImageBitmap and registered with the style when it's referenced by a layer, and unregistered from the style if it's no longer referenced by any layer. An ID referencing the bitmap will be generated automatically and inserted into the expression.

The bitmap will be created with the provided size, or the intrinsic size of the painter if not provided, or 16x16 DP if the painter has no intrinsic size.