File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/src/main/java/com/android/unio/ui/map Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ import java.util.concurrent.TimeUnit
59
59
val EPFL_COORDINATES = LatLng (46.518831258 , 6.559331096 )
60
60
const val APPROXIMATE_CIRCLE_RADIUS = 30.0
61
61
const val APPROXIMATE_CIRCLE_OUTLINE_WIDTH = 2f
62
+ const val INITIAL_ZOOM_LEVEL = 15f
62
63
63
64
@OptIn(ExperimentalMaterial3Api ::class )
64
65
@Composable
@@ -121,13 +122,14 @@ fun MapScreen(
121
122
}
122
123
}
123
124
cameraPositionState.position =
124
- CameraPosition .fromLatLngZoom(userLocation ? : EPFL_COORDINATES , 10f )
125
+ CameraPosition .fromLatLngZoom(userLocation ? : EPFL_COORDINATES , INITIAL_ZOOM_LEVEL )
125
126
}
126
127
127
128
// Center map on the user's location initially if available
128
129
LaunchedEffect (userLocation) {
129
130
if (userLocation != null && ! initialCentered) {
130
- cameraPositionState.position = CameraPosition .fromLatLngZoom(userLocation!! , 15f )
131
+ cameraPositionState.position =
132
+ CameraPosition .fromLatLngZoom(userLocation!! , INITIAL_ZOOM_LEVEL )
131
133
initialCentered = true
132
134
}
133
135
}
You can’t perform that action at this time.
0 commit comments