Skip to content

Commit

Permalink
Copy logic to the non-dynamic views
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed Nov 26, 2024
1 parent e92e910 commit 86eeb4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.maplibre.compose.camera.MapViewCamera
import com.maplibre.compose.camera.extensions.incrementZoom
import com.maplibre.compose.ramani.LocationRequestProperties
import com.maplibre.compose.ramani.MapLibreComposable
import com.maplibre.compose.rememberSaveableMapViewCamera
Expand Down Expand Up @@ -108,6 +109,8 @@ fun LandscapeNavigationView(
),
theme = theme,
config = config,
onClickZoomIn = { camera.value = camera.value.incrementZoom(1.0) },
onClickZoomOut = { camera.value = camera.value.incrementZoom(-1.0) },
views = views,
mapViewInsets = mapViewInsets,
onTapExit = onTapExit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.ui.tooling.preview.Devices
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.maplibre.compose.camera.MapViewCamera
import com.maplibre.compose.camera.extensions.incrementZoom
import com.maplibre.compose.ramani.LocationRequestProperties
import com.maplibre.compose.ramani.MapLibreComposable
import com.maplibre.compose.rememberSaveableMapViewCamera
Expand Down Expand Up @@ -119,6 +120,8 @@ fun PortraitNavigationView(
),
theme = theme,
config = config,
onClickZoomIn = { camera.value = camera.value.incrementZoom(1.0) },
onClickZoomOut = { camera.value = camera.value.incrementZoom(-1.0) },
views = views,
mapViewInsets = mapViewInsets,
onTapExit = onTapExit)
Expand Down

0 comments on commit 86eeb4c

Please sign in to comment.