create Layer
suspend fun createLayer(shpUrl: String, displayName: String? = null, shapeConfiguration: (ShapefileRecord) -> ShapefileShapeConfiguration? = { ShapefileShapeConfiguration() }): RenderableLayer
Load a shapefile from a URL pointing at the .shp file. The factory will derive the .dbf and .prj sidecar URLs by replacing the extension and fetch all three concurrently-ish (sequentially, matching the reference). Sidecars that 404 or fail to download are tolerated and the layer is built without them.
Parameters
shp Url
URL of the .shp file. Must end in .shp (case-insensitive).
display Name
Optional layer display name.
shape Configuration
Optional per-record customization callback.
suspend fun createLayer(shpBytes: ByteArray, dbfBytes: ByteArray? = null, prjBytes: ByteArray? = null, cpgBytes: ByteArray? = null, displayName: String? = null, shapeConfiguration: (ShapefileRecord) -> ShapefileShapeConfiguration? = { ShapefileShapeConfiguration() }): RenderableLayer
Build a layer from already-loaded buffers. The DBF, PRJ, and CPG buffers are all optional; if absent, attributes default to empty maps, the shapefile is assumed to be geographic, and DBF text decoding falls back to Latin-1.