Floor Filter
Displays a control for the user to pick which level of a floor aware GeoModel to display.
The simplest workflow is for the app to instantiate a FloorFilter using an instance of the FloorFilterState to ideally display it within the GeoView. The Modifier properties of Box,Column or Row could be used to position the FloorFilter inside of a Composable Map.
Workflow example:
val mapViewModel = viewModel<MapViewModel>(factory = MapViewModelFactory(floorAwareWebMap))
ComposableMap(
modifier = Modifier.fillMaxSize(),
mapInterface = mapViewModel
) {
Box(
modifier = Modifier.fillMaxSize().padding(horizontal = 20.dp, vertical = 40.dp),
contentAlignment = Alignment.BottomStart
) {
FloorFilter(floorFilterState = mapViewModel.floorFilterState)
}
}
Content copied to clipboard
Optionally, the default UI settings of the FloorFilter may be overridden by modifying UIProperties defined in the FloorFilterState. The UIProperties enable the customization of the colors, visibility, typography, and more.
Workflow example:
// in the MapViewModel
private val uiProperties = UIProperties().apply {
selectedForegroundColor = Color.Red
typography = MaterialTheme.typography
maxDisplayLevels = 2
closeButtonPosition = ButtonPosition.Bottom
}
// create the floor filter state
val floorFilterState = FloorFilterState(geoModel, coroutineScope, uiProperties)
// pass the floor filter state in the compose layout
FloorFilter(floorFilterState = mapViewModel.floorFilterState)
Content copied to clipboard
Since
200.2.0