readLayerBytes

suspend fun readLayerBytes(layerItem: MapLayerItem): ByteArray?(source)

The layer's bytes: fetched for a network layer, read from storage otherwise.

Bytes rather than a stream because a stream has no common type here, and because both readers a layer feeds — the KML converter and the zip reader — want the whole document anyway.