Closed YusufbekIbragimov closed 4 months ago
My code example:
@Composable private fun MapContent( modifier: Modifier, cameraPosition: CameraPositionState, uiState: BranchesUiState, onAction: OnAction ) { val context = LocalContext.current GoogleMap( modifier = modifier, cameraPositionState = cameraPosition, properties = MapProperties(isMyLocationEnabled = uiState.isShowUserLocation), contentPadding = PaddingValues( top = 90.dp + WindowInsets.navigationBars.asPaddingValues().calculateTopPadding(), bottom = 180.dp + WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() ), uiSettings = MapUiSettings( myLocationButtonEnabled = true, zoomControlsEnabled = false, ) ) { uiState.branches.forEach { branch -> Marker( state = MarkerState(LatLng(branch.latitude, branch.longitude)), icon = BitmapDescriptorFactory.fromBitmap( getBitmapFromVectorDrawable( context, branch.type.getIconResId(branch.isOpen) ) ), onClick = { onAction(UiAction.BranchClicked(branch)) true } ) } } }
Thanks!
Environment details
My code example:
Thanks!