Skip to content

Commit

Permalink
Bump com.google.maps.android:maps-compose from 5.0.4 to 6.0.0 (#2035)
Browse files Browse the repository at this point in the history
* Bump com.google.maps.android:maps-compose from 5.0.4 to 6.0.0

Bumps [com.google.maps.android:maps-compose](https://github.com/googlemaps/android-maps-compose) from 5.0.4 to 6.0.0.
- [Release notes](https://github.com/googlemaps/android-maps-compose/releases)
- [Changelog](https://github.com/googlemaps/android-maps-compose/blob/main/.releaserc)
- [Commits](googlemaps/android-maps-compose@v5.0.4...v6.0.0)

---
updated-dependencies:
- dependency-name: com.google.maps.android:maps-compose
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Use remember function for camera position state

* Use colour scheme

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maria Neumayer <[email protected]>
  • Loading branch information
dependabot[bot] and Maria Neumayer authored Jul 5, 2024
1 parent 04c71d3 commit eed4c08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions app/src/main/java/net/skyscanner/backpack/demo/compose/MapStory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ import androidx.compose.ui.res.stringArrayResource
import androidx.compose.ui.res.stringResource
import com.google.android.gms.maps.model.CameraPosition
import com.google.android.gms.maps.model.LatLng
import com.google.maps.android.compose.CameraPositionState
import com.google.maps.android.compose.ComposeMapColorScheme
import com.google.maps.android.compose.GoogleMap
import com.google.maps.android.compose.rememberCameraPositionState
import com.google.maps.android.compose.rememberMarkerState
import net.skyscanner.backpack.compose.icon.BpkIcon
import net.skyscanner.backpack.compose.map.BpkIconMapMarker
Expand Down Expand Up @@ -59,7 +60,11 @@ fun PriceMapMarkerStory(modifier: Modifier = Modifier) {
else -> BpkPriceMarkerStatus.Default
}

GoogleMap(modifier = modifier, cameraPositionState = CameraPositionState(position = MapPosition)) {
GoogleMap(
modifier = modifier,
cameraPositionState = rememberCameraPositionState { MapPosition },
mapColorScheme = ComposeMapColorScheme.FOLLOW_SYSTEM,
) {
MarkerPositions.forEachIndexed { index, latLng ->
BpkPriceMapMarker(
title = stringArrayResource(R.array.map_marker_prices)[index],
Expand All @@ -82,7 +87,11 @@ fun IconMapMarkerStory(modifier: Modifier = Modifier) {
focusedMarker -> BpkIconMarkerStatus.Focused
else -> BpkIconMarkerStatus.Default
}
GoogleMap(modifier = modifier, cameraPositionState = CameraPositionState(position = MapPosition)) {
GoogleMap(
modifier = modifier,
cameraPositionState = rememberCameraPositionState { MapPosition },
mapColorScheme = ComposeMapColorScheme.FOLLOW_SYSTEM,
) {
MarkerPositions.forEachIndexed { index, latLng ->
BpkIconMapMarker(
contentDescription = stringResource(if (index == 2) R.string.map_marker_icon_cafe else R.string.map_marker_icon_landmark),
Expand All @@ -99,7 +108,11 @@ fun IconMapMarkerStory(modifier: Modifier = Modifier) {
@MapMarkersComponent
@ComposeStory(kind = StoryKind.DemoOnly, name = "Pointer")
fun PointerMapMarkerStory(modifier: Modifier = Modifier) {
GoogleMap(modifier = modifier, cameraPositionState = CameraPositionState(position = MapPosition)) {
GoogleMap(
modifier = modifier,
cameraPositionState = rememberCameraPositionState { MapPosition },
mapColorScheme = ComposeMapColorScheme.FOLLOW_SYSTEM,
) {
MarkerPositions.forEachIndexed { index, latLng ->
BpkPointerMapMarker(
title = stringArrayResource(R.array.map_marker_prices)[index],
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test-compose = { group = "androidx.compose.ui", name = "ui-test-junit4" }

google-material = "com.google.android.material:material:1.12.0"
google-maps = "com.google.android.gms:play-services-maps:19.0.0"
google-mapsCompose = "com.google.maps.android:maps-compose:5.0.4"
google-mapsCompose = "com.google.maps.android:maps-compose:6.0.0"
google-kspApi = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
google-guava = "com.google.guava:guava:33.2.1-jre"

Expand Down

0 comments on commit eed4c08

Please sign in to comment.