ApiKeyErrorOverlay

class ApiKeyErrorOverlay(context: Context, providerName: String, mapTypeName: String)(source)

Overlay displayed when a map type requires an API key that is not configured.

Shows a translucent gray overlay covering the map with an error message positioned at the view center (screen center). The message remains fixed at screen center regardless of map panning.

Touch events pass through this overlay, allowing users to pan and zoom the map even when the error is displayed.

Parameters

context

Android context for accessing resources

providerName

Human-readable name of the tile provider (e.g., "Thunderforest", "Tracestrack")

mapTypeName

Human-readable name of the map type (e.g., "Cycle Map", "Transport Map")

Constructors

Link copied to clipboard
constructor(context: Context, providerName: String, mapTypeName: String)

Functions

Link copied to clipboard
fun draw(canvas: Canvas, viewWidth: Int, viewHeight: Int)

Draws the error overlay on the canvas.

Link copied to clipboard

Returns true if this overlay should handle touch events.