PickedMapFile

class PickedMapFile(val displayName: String, val extensionOrMime: String?, val read: suspend () -> ByteArray?)(source)

A file the user picked, handed to MapLayersManager by whatever picker the platform uses.

The indirection is what makes the layer store common. Android resolves a content:// through a ContentResolver and desktop opens a plain path; neither detail belongs in the store, so the caller does the resolving and passes the bytes behind read.

Constructors

Link copied to clipboard
constructor(displayName: String, extensionOrMime: String?, read: suspend () -> ByteArray?)

Properties

Link copied to clipboard

The name to show, and the base of the on-disk file name. Untrusted — see layerFileName.

Link copied to clipboard

File extension or MIME subtype, resolved to a LayerType by resolveLayerType.

Link copied to clipboard
val read: suspend () -> ByteArray?

Reads the picked file. Null if it could not be opened, which is reported and skipped rather than thrown.