Skip to content

Commit

Permalink
Finished merge from main
Browse files Browse the repository at this point in the history
Adapted tests
Finally solved all issues
  • Loading branch information
IB-12 committed Apr 12, 2024
1 parent 35963b1 commit 55c3cae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 38 deletions.
29 changes: 0 additions & 29 deletions app/src/androidTest/java/ch/epfl/cs311/wanderwave/ui/MapTest.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import com.google.accompanist.permissions.isGranted
import com.google.accompanist.permissions.rememberMultiplePermissionsState
import com.google.android.gms.maps.CameraUpdateFactory
import com.google.android.gms.maps.GoogleMap
import com.google.android.gms.maps.MapView
import com.google.android.gms.maps.model.CameraPosition
import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.MapStyleOptions
import com.google.android.gms.maps.model.MarkerOptions
import com.google.maps.android.compose.CameraPositionState
import com.google.maps.android.compose.GoogleMap
import com.google.maps.android.compose.MapProperties
Expand Down Expand Up @@ -108,9 +106,7 @@ fun WanderwaveGoogleMap(

@Composable
fun MapContent(viewModel: MapViewModel) {
val epfl = LatLng(46.518831258, 6.559331096)
val beacons = viewModel.uiState.collectAsStateWithLifecycle().value.beacons
Marker(state = MarkerState(position = epfl), title = "Marker at EPFL")
val beacons: List<Beacon> = viewModel.uiState.collectAsStateWithLifecycle().value.beacons
DisplayBeacons(beacons = beacons)
}

Expand Down Expand Up @@ -154,9 +150,9 @@ fun moveCamera(
fun DisplayBeacons(beacons: List<Beacon>) {
// Create each beacon from the list
beacons.forEach() {
Marker(
state = MarkerState(position = it.location.toLatLng()),
title = it.id,
)
Marker(
state = MarkerState(position = it.location.toLatLng()),
title = it.id,
)
}
}

0 comments on commit 55c3cae

Please sign in to comment.