Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit f9ae501

Browse files
committed
Adds TODOs to the starter code indicating where the user should add code.
1 parent c1cb203 commit f9ae501

8 files changed

Lines changed: 57 additions & 10 deletions

File tree

solution/app/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ dependencies {
9494
implementation(kotlin("reflect"))
9595

9696
// Google Maps Compose library
97-
implementation("com.google.maps.android:maps-compose:4.4.0")
97+
val mapsComposeVersion = "4.4.1"
98+
implementation("com.google.maps.android:maps-compose:$mapsComposeVersion")
9899
// Google Maps Compose utility library
99-
implementation("com.google.maps.android:maps-compose-utils:4.4.0")
100+
implementation("com.google.maps.android:maps-compose-utils:$mapsComposeVersion")
100101
// Google Maps Compose widgets library
101-
implementation("com.google.maps.android:maps-compose-widgets:4.4.0")
102+
implementation("com.google.maps.android:maps-compose-widgets:$mapsComposeVersion")
102103
}
103104

104105
secrets {

starter/app/build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id("org.jetbrains.kotlin.android")
44
kotlin("kapt")
55
id("com.google.dagger.hilt.android")
6+
// TODO: Add the secrets plugin
67
}
78

89
android {
@@ -64,10 +65,10 @@ kapt {
6465

6566
dependencies {
6667

67-
implementation("androidx.core:core-ktx:1.12.0")
68+
implementation("androidx.core:core-ktx:1.13.0")
6869
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
69-
implementation("androidx.activity:activity-compose:1.8.2")
70-
implementation(platform("androidx.compose:compose-bom:2024.03.00"))
70+
implementation("androidx.activity:activity-compose:1.9.0")
71+
implementation(platform("androidx.compose:compose-bom:2024.04.01"))
7172
implementation("androidx.compose.ui:ui")
7273
implementation("androidx.compose.ui:ui-graphics")
7374
implementation("androidx.compose.ui:ui-tooling-preview")
@@ -80,7 +81,7 @@ dependencies {
8081

8182
androidTestImplementation("androidx.test.ext:junit:1.1.5")
8283
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
83-
androidTestImplementation(platform("androidx.compose:compose-bom:2024.03.00"))
84+
androidTestImplementation(platform("androidx.compose:compose-bom:2024.04.01"))
8485
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
8586

8687
debugImplementation("androidx.compose.ui:ui-tooling")
@@ -99,4 +100,6 @@ dependencies {
99100
implementation("com.google.maps.android:maps-ktx:5.0.0")
100101
// KTX for the Maps SDK for Android Utility Library
101102
implementation("com.google.maps.android:maps-utils-ktx:5.0.0")
102-
}
103+
}
104+
105+
// TODO: configure the secrets property

starter/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
android:supportsRtl="true"
1414
android:theme="@style/Theme.MountainMarkers"
1515
tools:targetApi="31">
16+
17+
<!-- TODO: Add meta-dat tag with MAPS_API_KEY -->
18+
1619
<activity
1720
android:name=".MainActivity"
1821
android:exported="true"

starter/app/src/main/java/com/example/mountainmarkers/MountainMap.kt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,30 @@ fun MountainMap(
3333
) {
3434
var isMapLoaded by remember { mutableStateOf(false) }
3535

36+
// TODO: Create cameraPositionState
37+
38+
// TODO: Create scope from rememberCoroutineScope
39+
// Add LaunchedEffect to zoom when the bounding box changes
40+
// Add LaunchedEffect to react to events from the ViewModel
41+
3642
Box(
3743
modifier = Modifier
3844
.fillMaxSize()
3945
.padding(paddingValues)
4046
) {
41-
// Add GoogleMap here
47+
// TODO: Add GoogleMap here
48+
49+
// TODO: Add cameraPositionState to GoogleMap
50+
51+
// TODO: Add GoogleMap content
52+
53+
// TODO: Add call to ColoradoPolygon. Inside the GoogleMap content, but outside of the when
54+
// statement
55+
56+
// TODO: Add code to add KmlLayer. Inside the GoogleMap content, but outside of the when
57+
// statement
58+
59+
// TODO: Add ScaleBar outside of of the GoogleMap content
4260

4361
if (!isMapLoaded) {
4462
AnimatedVisibility(
@@ -56,3 +74,7 @@ fun MountainMap(
5674
}
5775
}
5876
}
77+
78+
// TODO: Create zoomAll function
79+
80+
// TODO: Create ColoradoPolygon function

starter/app/src/main/java/com/example/mountainmarkers/presentation/AdvancedMarkersMapContent.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ import com.google.android.gms.maps.model.Marker
2222
/**
2323
* [GoogleMapComposable] which renders a [MountainList] as a set of [AdvancedMarker]s
2424
*/
25+
// TODO: Add @GoogleMapComposable annotation
2526
@Composable
2627
fun AdvancedMarkersMapContent(
2728
mountains: List<Mountain>,
2829
onMountainClick: (Marker) -> Boolean = { false },
2930
) {
31+
// TODO: Create custom [PinConfig]s for fourteeners and for other mountains
32+
33+
// TODO: Create AdvancedMarkers from each of the mountains
3034
}

starter/app/src/main/java/com/example/mountainmarkers/presentation/BasicMarkersMapContent.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ import com.google.android.gms.maps.model.Marker
2222
/**
2323
* [GoogleMapComposable] which renders a [MountainList] as a set of basic [Marker]s
2424
*/
25+
// TODO: Add @GoogleMapComposable annotation
2526
@Composable
2627
fun BasicMarkersMapContent(
2728
mountains: List<Mountain>,
2829
onMountainClick: (Marker) -> Boolean = { false }
2930
) {
31+
// TODO: Create custom icons for fourteeners and for other mountains
32+
33+
// TODO: Create Markers from each of the mountains
3034
}

starter/app/src/main/java/com/example/mountainmarkers/presentation/ClusteringMarkersMapContent.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@ import com.example.mountainmarkers.presentation.MountainsScreenViewState.Mountai
2020
import com.google.maps.android.clustering.Cluster
2121
import com.google.maps.android.clustering.ClusterItem
2222

23+
// TODO: Create data class MountainClusterItem which implements a [ClusterItem]
24+
25+
// TODO: Create data class IconColor
26+
2327
/**
2428
* [GoogleMapComposable] which renders a [MountainList] using the [Clustering] composable
2529
*/
30+
// TODO: Add @GoogleMapComposable annotation
2631
@Composable
2732
fun ClusteringMarkersMapContent(
2833
mountains: List<Mountain>,
2934
onClusterClick: (Cluster<out ClusterItem>) -> Boolean = { false },
3035
onMountainClick: (ClusterItem) -> Boolean = { false },
3136
) {
37+
// TODO: Create color schemes for fourteeners and non-fourteeners
38+
39+
// TODO: Create mountainClusterItems from each of the mountains
3240
}
41+
42+
// TODO: Create SingleMountain composable to render a customized icon for an individual mountain

starter/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ plugins {
77

88
buildscript {
99
dependencies {
10-
10+
// TODO: Add the secrets plugin to the buildscript dependencies
1111
}
1212
}

0 commit comments

Comments
 (0)