createLayerFromZip

suspend fun ShapefileLayerFactory.createLayerFromZip(zipBytes: ByteArray, displayName: String? = null, shapeConfiguration: (ShapefileRecord) -> ShapefileShapeConfiguration? = { ShapefileShapeConfiguration() }): RenderableLayer

Loads a shapefile distributed as a ZIP archive (the canonical packaging on most data portals). The first .shp, .dbf, .prj, and .cpg entries found are routed through ShapefileLayerFactory.createLayer. Entries deeper in subdirectories are accepted too, but only the first match of each extension is used — ZIP archives occasionally bundle multiple shapefiles together, and picking one deterministically is better than guessing.

JVM and Android only. iOS and JS callers need to extract the archive on their side (Compression.framework and DecompressionStream respectively) and call ShapefileLayerFactory.createLayer with the resulting bytes directly.