provideExitSignIcon

Generates an exit sign image based on an exit sign reference and the associated exit number, for example Signpost.exitIconReference and Signpost.exitNumber.

The reference parameter is used to construct an image for the exit sign. If the reference cannot be resolved to a valid image asset, a fallback image is generated.

Example Usage

// `exitIconReference` and `exitNumber` are taken from a `Signpost`.
val provider = RoadShieldIconProvider(context)
val image = provider.provideExitSignIcon(
reference = exitIconReference,
content = exitNumber,
).value().toAndroidBitmap()

Return

Result containing the generated bitmap or failure information.

Parameters

reference

The reference of the base exit sign image.

content

The exit number or identifier text (e.g., "42A", "Exit 15").