We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When you configure your map composable you can only
mapViewportState = MapViewportState().apply { setCameraOptions { zoom(9.5) center(state.polygonCenter.getCenter().let { Point.fromLngLat(it.long, it.lat) }) } }
Therefore, you need to then add something like that
MapEffect(state.polygonCenter) { val padding = 32.dp.value.toDouble() it.camera.flyTo(it.mapboxMap.cameraForCoordinates(path, EdgeInsets(padding, padding, padding, padding))) }
The idea would be to be able to do something like
mapViewportState = MapViewportState().apply { val padding = 32.dp.value.toDouble() setCameraOptions(cameraForCoordinates(path, EdgeInsets(padding, padding, padding, padding))) }
And therefore no to have to add a MapEffect to recenter the camera
The text was updated successfully, but these errors were encountered:
@CoreFloDev Thanks for the suggestion! It looks reasonable to be part of the MapViewportState API, we will consider adding it in upcoming releases.
Sorry, something went wrong.
pengdev
No branches or pull requests
New Feature
When you configure your map composable you can only
Therefore, you need to then add something like that
The idea would be to be able to do something like
And therefore no to have to add a MapEffect to recenter the camera
The text was updated successfully, but these errors were encountered: