![]() ![]() ![]() In the MainActivity.java file, you will need to import the Google Maps SDK. Implementation ':play-services-maps:17.0.0'Īdd a Google Maps API key inside the application section of the google_maps_api.xml file: Īdd a map fragment to the main activity: ![]() To display a map using the Google Maps SDK for Android, the following steps would be done:Įnsure Google Play services is installed.Īdd a dependency for the Google Maps service to the module's Wait for the map to be ready before trying to access and program it.In particular, you must override the following methods: Override all the life-cycle methods from the Activity containing the map view to the corresponding methods in the map class.Add some XML to an Activity to specify where the map should be rendered and how it should be laid out.Get an API or subscription key to access either platform.Loading a map in an Android app using Google or Azure Maps consists of similar steps. For more information on authentication in Azure Maps, see manage authentication in Azure Maps. Obtain a primary subscription key, also known as the primary key or the subscription key.If you don't have an Azure subscription, create a free account before you begin. Create an Azure Maps account by signing into the Azure portal.All examples are provided in Java however, you can use Kotlin with the Azure Maps Android SDK.įor more information on developing with the Android SDK by Azure Maps, see the How-to guides for the Azure Maps Android SDK.
0 Comments
Leave a Reply. |