fix: add search bar padding for maps
This commit is contained in:
parent
a16487a9a7
commit
34923ce743
4 changed files with 7 additions and 5 deletions
|
|
@ -54,7 +54,7 @@ actual fun Maps(
|
|||
polylines: List<Polyline>,
|
||||
newCameraPosition: Pair<Point, Pair<Point, Point>?>?,
|
||||
cameraPositionUpdated: () -> Unit,
|
||||
extInsets: Int,
|
||||
extInsets: WindowInsets,
|
||||
) {
|
||||
var camPos = rememberCameraPositionState()
|
||||
val ctx = LocalContext.current
|
||||
|
|
@ -93,7 +93,7 @@ actual fun Maps(
|
|||
myLocationButtonEnabled = false,
|
||||
mapToolbarEnabled = false,
|
||||
),
|
||||
contentPadding = WindowInsets.safeDrawing.add(WindowInsets(bottom = extInsets)).asPaddingValues()
|
||||
contentPadding = WindowInsets.safeDrawing.add(extInsets).asPaddingValues()
|
||||
) {
|
||||
for (marker in markers) {
|
||||
Marker(
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ fun App() {
|
|||
modifier = Modifier.fillMaxSize(),
|
||||
newCameraPosition = newCameraPosition,
|
||||
cameraPositionUpdated = { newCameraPosition = null },
|
||||
extInsets = extInsets,
|
||||
extInsets = WindowInsets(top = with(LocalDensity.current) { 56.dp.roundToPx() }, bottom = extInsets),
|
||||
polylines = polylines,
|
||||
)
|
||||
Searcher(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package moe.lava.banksia.native.maps
|
||||
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -21,5 +22,5 @@ expect fun Maps(
|
|||
// <Centre: Point, Bounds?: <Northeast, Southwest>>
|
||||
newCameraPosition: Pair<Point, Pair<Point, Point>?>? = Pair(Point(-37.8136, 144.9631), null),
|
||||
cameraPositionUpdated: () -> Unit,
|
||||
extInsets: Int,
|
||||
extInsets: WindowInsets,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package moe.lava.banksia.native.maps
|
||||
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
|
|
@ -20,7 +21,7 @@ actual fun Maps(
|
|||
polylines: List<Polyline>,
|
||||
newCameraPosition: Pair<Point, Pair<Point, Point>?>?,
|
||||
cameraPositionUpdated: () -> Unit,
|
||||
extInsets: Int,
|
||||
extInsets: WindowInsets,
|
||||
) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue