Package-level declarations

Types

Link copied to clipboard
data class BuildingFootprint(val outline: List<LatLon>, val heightMeters: Double?, val minHeightMeters: Double = 0.0, val isPart: Boolean = false, val holes: List<List<LatLon>> = emptyList())

One building: its outline and how tall it is. Most buildings in OpenStreetMap carry no height.

Link copied to clipboard

Whether contour lines fall on round meters or round feet.

Link copied to clipboard
class TerrainBuildingSource(val attribution: String, val available: suspend () -> Boolean, val footprints: suspend (GeoBounds) -> List<BuildingFootprint>)

Where the terrain map gets its buildings.

Link copied to clipboard
data class TerrainImagery(val id: String, val label: String, val tileUrl: String, val maxZoom: Int, val attribution: String)

A raster basemap the terrain can wear: XYZ tiles in Web Mercator, the same sources the 2D map offers.

Link copied to clipboard
data class TerrainRoute(val forward: List<Long>, val back: List<Long>)

A trace route to draw: the nodes a request passed on its way out, the radio first, and the ones the answer passed on its way back.

Functions

Link copied to clipboard

On an XR headset, the device model stands in the room instead of in fallback's phone AR view.

Link copied to clipboard
fun SpatialShell(nodes: List<SpatialNodeSnapshot>, imagery: List<TerrainImagery>, buildings: TerrainBuildingSource?, route: TerrainRoute?, contourUnits: ContourUnits, buildDispatcher: CoroutineDispatcher, modifier: Modifier = Modifier, content: @Composable () -> Unit)

Hosts the app on Android XR. In Full Space the activity's window is the main panel, with an orbiter below it to go back; in Home Space it draws as usual with a button to enter Full Space. Off XR it is just content.

Link copied to clipboard
fun SpatialTerrainMap(nodes: List<SpatialNodeSnapshot>, imagery: List<TerrainImagery>, buildingSource: TerrainBuildingSource?, route: TerrainRoute?, contourUnits: ContourUnits, buildDispatcher: CoroutineDispatcher, modifier: Modifier = Modifier)

The mesh's ground as a round table beside the app panel: a CustomMesh heightfield on a turning wheel with compass letters, and a zoom slider in an orbiter. Draws nothing without 3D content, so it only shows in Full Space.