Skip to content

mapToolbarEnabled doesn't work with liteMode #58

Description

@polivmi1

mapToolbarEnabled cannot be disabled when using liteMode = true. It keeps showing on the map

val cameraPositionState: CameraPositionState = rememberCameraPositionState {
        position = CameraPosition.fromLatLngZoom(LatLng(latitude, longitude), 16f)
    }
    GoogleMap(
        modifier = Modifier.fillMaxSize(),
        cameraPositionState = cameraPositionState,
        googleMapOptionsFactory = {
            GoogleMapOptions().mapId("StaticMap")
                .mapToolbarEnabled(false)
                .liteMode(true)
        },
        properties = MapProperties(
            mapStyleOptions = MapStyleOptions.loadRawResourceStyle(
                LocalContext.current,
                R.raw.mapstyle_default
            )
        )
    ){
       Marker(
            position = cameraPositionState.position.target,
            anchor = Offset(0.5f, 0.875f)
        )

Metadata

Metadata

Assignees

Labels

releasedtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions