I've a simple GoogleMap
in Compose:
GoogleMap(
modifier = Modifier.fillMaxSize(),
cameraPositionState = cameraPositionState,
uiSettings = MapUiSettings(
compassEnabled = false,
indoorLevelPickerEnabled = false,
mapToolbarEnabled = false,
myLocationButtonEnabled = false,
rotationGesturesEnabled = false,
tiltGesturesEnabled = false,
zoomControlsEnabled = false,
),
googleMapOptionsFactory = {
GoogleMapOptions()
.mapColorScheme(MapColorScheme.FOLLOW_SYSTEM)
.minZoomPreference(10f)
.maxZoomPreference(18f)
}
) {
//some markers
}
but setting minZoomPreference
and maxZoomPreference
doesn't seem to work, I can zoom in/out however I want.
Am I missing something here?
searching through Google Issue Tracker lead me to this issue which contains the solution:
GoogleMap(
properties = MapProperties(
maxZoomPreference = 18f,
minZoomPreference = 10f,
),
)