createLayer

suspend fun createLayer(serviceAddress: String, layerNames: List<String>, displayName: String? = null, serviceMetadata: String? = null): WmsImageLayer

Create a WMS tiled image layer (cache-agnostic).

Capabilities resolution is offline-first: serviceMetadata (caller-supplied XML) is used when present and it deserializes cleanly; only when it is missing, blank, or undecodable does the factory issue an online GetCapabilities request. The cache subsystem is not consulted here — see the canonical 2-step factory + ContentManager.attachCache pattern.

Parameters

serviceAddress

WMS service address

layerNames

Layer names to combine into the resulting image layer

displayName

Optional layer display name

serviceMetadata

Optional capabilities XML override (skips the online fetch)