SitePlannerHost

fun SitePlannerHost(initialParams: SitePlannerParams, estimate: suspend (SitePlannerParams) -> String, onDismiss: () -> Unit, onImport: (name: String, geoJson: String, latitude: Double, longitude: Double) -> Unit, onRequestCurrentLocation: suspend () -> Pair<Double, Double>?? = null, onUseNodeLocation: () -> Pair<Double, Double>? = null, onUseMapCenter: () -> Pair<Double, Double>? = null)(source)

The Site Planner flow every map host shares: the SitePlannerSheet form, then estimate behind a progress dialog, then onImport with the estimate's GeoJSON and the transmitter position so the host can add a map layer and move the camera to it.

Canceling the progress dialog stops the estimate and returns to the form with the same values. A failed estimate returns there too, with an error note. The location shortcuts re-seed the coordinates from the device (onRequestCurrentLocation), the node (onUseNodeLocation), or the map (onUseMapCenter) when a host offers them.