createLayer

suspend fun createLayer(serviceAddress: String, layerName: String, displayName: String? = null, serviceMetadata: String? = null): WmtsImageLayer

Create a WMTS 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.