createSwatch

suspend fun createSwatch(layerId: Long): Result<BitmapDrawable>

Creates a swatch image with the template's thumbnail or symbology from the specified layer. In the absence of a thumbnail for this template, the symbology from the specified layer is used to determine a swatch image, provided this layer is loaded and is one of the SharedTemplate.layerIds.

Return

A Result containing a visual representation of this template.

Since

300.0.0

Parameters

layerId

An ID that identifies the layer for which a swatch image is requested.