From 71ca3302e355b93a11c19dd05e8bb5c4402671ea Mon Sep 17 00:00:00 2001 From: Angela Yu <5506675+wangela@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:09:22 -0700 Subject: [PATCH] chore: augment documentation with links --- README.md | 16 ++++++++-------- .../maps/android/compose/StreetViewActivity.kt | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e6e5367c..c44bdf7e 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ You no longer need to specify the Maps SDK for Android or its Utility Library as ```groovy dependencies { implementation 'com.google.maps.android:maps-compose:3.1.1' - + // Optionally, you can include the Compose utils library for Clustering, etc. implementation 'com.google.maps.android:maps-compose-utils:3.1.1' @@ -242,15 +242,15 @@ StreetView( ``` In order to test whether that Street View location is valid, we recommend using the -`fetchStreetViewData` utility from the Android Map Utils library. We showcase an example of this -in `StreetViewActivity`: +`fetchStreetViewData` utility from the [Maps SDK for Android Utility Library](https://github.com/googlemaps/android-maps-utils). We showcase an example of this +in [`StreetViewActivity`](https://github.com/googlemaps/android-maps-compose/blob/main/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt) of the demo app: ```kotlin streetViewResult = fetchStreetViewData(singapore, BuildConfig.MAPS_API_KEY) ``` -Please make sure that this API Key has Street View Static API activated. +Be sure to [enable Street View Static API](https://goo.gle/enable-sv-static-api) on the project associated with your API key. @@ -277,7 +277,7 @@ GoogleMap( ## Utility Library -This library also provides optional utilities in the `maps-compose-utils` library. +This library also provides optional utilities in the `maps-compose-utils` library from the [Maps SDK for Android Utility Library](https://github.com/googlemaps/android-maps-utils). ### Clustering @@ -315,8 +315,8 @@ The [ScaleBarActivity](app/src/main/java/com/google/maps/android/compose/ScaleBa Both versions of this widget leverage the `CameraPositionState` in `maps-compose` and therefore are very simple to configure with their defaults: ```kotlin -Box(Modifier.fillMaxSize()) { - +Box(Modifier.fillMaxSize()) { + GoogleMap( modifier = Modifier.fillMaxSize(), cameraPositionState = cameraPositionState @@ -339,7 +339,7 @@ Box(Modifier.fillMaxSize()) { .align(Alignment.TopStart), cameraPositionState = cameraPositionState ) -} +} ``` The colors of the text, line, and shadow are also all configurable (e.g., based on `isSystemInDarkTheme()` on a dark map). Similarly, the `DisappearingScaleBar` animations can be configured. diff --git a/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt b/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt index 89a0604d..f190b207 100644 --- a/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/StreetViewActivity.kt @@ -80,7 +80,8 @@ class StreetViewActivity : ComponentActivity() { } } launch { - // Make sure that this API Key has Street View Static API activated. + // Be sure to enable the Street View Static API on the project associated with + // this API key using the instructions at https://goo.gle/enable-sv-static-api streetViewResult = fetchStreetViewData(singapore, BuildConfig.MAPS_API_KEY) }