Local.properties GOOGLE_MAPS_API_KEY=YOUR_KEY_HERE In that file, define a new key GOOGLE_MAPS_API_KEY with its value being the API key that you created.To provide this, open the file called local.properties in the root directory of your project (the same level where gradle.properties and adle are).The API key that you created in an earlier step needs to be provided to the app so that Maps SDK for Android can associate your key with your app. In this section, you will add Google Maps so that it loads when you launch the app. Upon getting the code, go ahead and open the project found inside the starter directory in Android Studio.Clone the repository if you have git installed.Īlternatively, you can click the following button to download the source code.You're welcomed to jump to the solution, but if you want to follow along with all the steps to build it yourself, keep reading. To get you started as quickly as possible, here's some starter code to help you follow along with this codelab. All requests to Google Maps Platform require an API key. You can follow the steps in this video or this documentation. Generate an API key in the Credentials page of Cloud Console.To do so, follow the steps in this video or this documentation. Enable the Google Maps Platform APIs and SDKs required for this codelab in the Google Cloud Marketplace.In the Cloud Console, click the project drop-down menu and select the project that you want to use for this codelab.If you do not already have a Google Cloud Platform account and a project with billing enabled, please see the Getting Started with Google Maps Platform guide to create a billing account and a project. An Android device or an Android emulator that runs the Google APIs platform based on Android 4.2.2 or higher (see Run apps on the Android Emulator for installation steps.)įor the following enablement step, you need to enable Maps SDK for Android.Google Play services installed in Android Studio.Control the viewpoint of the camera programmatically.Draw polylines and polygons on the map. ![]() Enable and use the Maps SDK for Android to add Google Maps to an Android app.Basic knowledge of Kotlin and Android development.This codelab teaches you how to integrate Maps SDK for Android with your app and use its core features by building an app that displays a map of bicycle shops in San Francisco, CA, USA.
0 Comments
Leave a Reply. |