Skip to content

Commit

Permalink
Adds TODOs to the starter code indicating where the user should add c…
Browse files Browse the repository at this point in the history
…ode.
  • Loading branch information
dkhawk committed Apr 26, 2024
1 parent c1cb203 commit f9ae501
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 10 deletions.
7 changes: 4 additions & 3 deletions solution/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ dependencies {
implementation(kotlin("reflect"))

// Google Maps Compose library
implementation("com.google.maps.android:maps-compose:4.4.0")
val mapsComposeVersion = "4.4.1"
implementation("com.google.maps.android:maps-compose:$mapsComposeVersion")
// Google Maps Compose utility library
implementation("com.google.maps.android:maps-compose-utils:4.4.0")
implementation("com.google.maps.android:maps-compose-utils:$mapsComposeVersion")
// Google Maps Compose widgets library
implementation("com.google.maps.android:maps-compose-widgets:4.4.0")
implementation("com.google.maps.android:maps-compose-widgets:$mapsComposeVersion")
}

secrets {
Expand Down
13 changes: 8 additions & 5 deletions starter/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id("org.jetbrains.kotlin.android")
kotlin("kapt")
id("com.google.dagger.hilt.android")
// TODO: Add the secrets plugin
}

android {
Expand Down Expand Up @@ -64,10 +65,10 @@ kapt {

dependencies {

implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-ktx:1.13.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("androidx.activity:activity-compose:1.8.2")
implementation(platform("androidx.compose:compose-bom:2024.03.00"))
implementation("androidx.activity:activity-compose:1.9.0")
implementation(platform("androidx.compose:compose-bom:2024.04.01"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
Expand All @@ -80,7 +81,7 @@ dependencies {

androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2024.03.00"))
androidTestImplementation(platform("androidx.compose:compose-bom:2024.04.01"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")

debugImplementation("androidx.compose.ui:ui-tooling")
Expand All @@ -99,4 +100,6 @@ dependencies {
implementation("com.google.maps.android:maps-ktx:5.0.0")
// KTX for the Maps SDK for Android Utility Library
implementation("com.google.maps.android:maps-utils-ktx:5.0.0")
}
}

// TODO: configure the secrets property
3 changes: 3 additions & 0 deletions starter/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.MountainMarkers"
tools:targetApi="31">

<!-- TODO: Add meta-dat tag with MAPS_API_KEY -->

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,30 @@ fun MountainMap(
) {
var isMapLoaded by remember { mutableStateOf(false) }

// TODO: Create cameraPositionState

// TODO: Create scope from rememberCoroutineScope
// Add LaunchedEffect to zoom when the bounding box changes
// Add LaunchedEffect to react to events from the ViewModel

Box(
modifier = Modifier
.fillMaxSize()
.padding(paddingValues)
) {
// Add GoogleMap here
// TODO: Add GoogleMap here

// TODO: Add cameraPositionState to GoogleMap

// TODO: Add GoogleMap content

// TODO: Add call to ColoradoPolygon. Inside the GoogleMap content, but outside of the when
// statement

// TODO: Add code to add KmlLayer. Inside the GoogleMap content, but outside of the when
// statement

// TODO: Add ScaleBar outside of of the GoogleMap content

if (!isMapLoaded) {
AnimatedVisibility(
Expand All @@ -56,3 +74,7 @@ fun MountainMap(
}
}
}

// TODO: Create zoomAll function

// TODO: Create ColoradoPolygon function
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ import com.google.android.gms.maps.model.Marker
/**
* [GoogleMapComposable] which renders a [MountainList] as a set of [AdvancedMarker]s
*/
// TODO: Add @GoogleMapComposable annotation
@Composable
fun AdvancedMarkersMapContent(
mountains: List<Mountain>,
onMountainClick: (Marker) -> Boolean = { false },
) {
// TODO: Create custom [PinConfig]s for fourteeners and for other mountains

// TODO: Create AdvancedMarkers from each of the mountains
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ import com.google.android.gms.maps.model.Marker
/**
* [GoogleMapComposable] which renders a [MountainList] as a set of basic [Marker]s
*/
// TODO: Add @GoogleMapComposable annotation
@Composable
fun BasicMarkersMapContent(
mountains: List<Mountain>,
onMountainClick: (Marker) -> Boolean = { false }
) {
// TODO: Create custom icons for fourteeners and for other mountains

// TODO: Create Markers from each of the mountains
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ import com.example.mountainmarkers.presentation.MountainsScreenViewState.Mountai
import com.google.maps.android.clustering.Cluster
import com.google.maps.android.clustering.ClusterItem

// TODO: Create data class MountainClusterItem which implements a [ClusterItem]

// TODO: Create data class IconColor

/**
* [GoogleMapComposable] which renders a [MountainList] using the [Clustering] composable
*/
// TODO: Add @GoogleMapComposable annotation
@Composable
fun ClusteringMarkersMapContent(
mountains: List<Mountain>,
onClusterClick: (Cluster<out ClusterItem>) -> Boolean = { false },
onMountainClick: (ClusterItem) -> Boolean = { false },
) {
// TODO: Create color schemes for fourteeners and non-fourteeners

// TODO: Create mountainClusterItems from each of the mountains
}

// TODO: Create SingleMountain composable to render a customized icon for an individual mountain
2 changes: 1 addition & 1 deletion starter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ plugins {

buildscript {
dependencies {

// TODO: Add the secrets plugin to the buildscript dependencies
}
}

0 comments on commit f9ae501

Please sign in to comment.