Change my location button direction and icon in the Jetpack Compose

Viewed 288

I have default MyLocation button on the Jetpack Compose's map but I want to move the Botton in the bottom and right and change the button icon but I don't know how can I do this in the Jetpack Compose.

My map view screen:

AndroidView(
    factory = { mapView }
) {
    mapView.getMapAsync { map ->
        map.apply {
            if (permissionsState){
                isMyLocationEnabled = true
            }
            uiSettings.isMyLocationButtonEnabled = true
            navigatorViewModel.apply {
                scope.launch {
                    lastSelectedLocation.collect {
                        val position = LatLng(
                            it.lat,
                            it.lng
                        )
                        moveCamera(
                            CameraUpdateFactory.newLatLngZoom(
                                position,
                                Constants.ZOOM_CAMERA
                            )
                        )
                    }
                }
                scope.launch {
                    setOnCameraIdleListener {
                        val cameraPosition = map.cameraPosition
                        setLocation(
                            LocationModel(
                                lat = cameraPosition.target.latitude,
                                lng = cameraPosition.target.longitude
                            )
                        )
                    }
                }
            }
        }
    }
}

0 Answers
Related