startDownload

fun startDownload(fileUrl: String, outputFilePath: String, extractSize: Double?, logicalBaseName: String? = null)

Parameters

outputFilePath

Where to publish the download. For a .pmtiles extract this should be a path unique to this download attempt (e.g. with a version/timestamp baked into the filename) - see logicalBaseName.

logicalBaseName

If set, outputFilePath's filename is expected to be of the form ".", e.g. "glasgow-gb.v1699999999999.pmtiles" for a logicalBaseName of "glasgow-gb". Once the download is published, any other file in the same directory whose name starts with "." is deleted - this is what actually retires a previous version of the same extract (see the comment above the rename below for why in-place replacement isn't safe for pmtiles extracts that MapLibre may have opened).