The Maps SDK for Android adds Google Maps data, map displays, and map gesture responses to Android apps, including Wear OS apps. You can add markers, polygons, and overlays to show information about map locations and support user interaction, using Kotlin or Java.

## Maps SDK for Android: key facts

- **Product:** Maps SDK for Android
- **Also known as:** Google Maps Android API
- **Category:** Maps
- **Platform:** Android
- **Runs on:** Client (app or browser code)
- **Launch stage:** GA
- **Lifecycle:** Active
- **Overview:** [Maps SDK for Android overview](https://developers.google.com/maps/documentation/android-sdk/overview.md.txt)
- **Regional availability:** Global. See the Google Maps Platform coverage page; the usage and billing page links separate global and India pricing lists. ([coverage details](https://developers.google.com/maps/coverage.md.txt))

## Maps SDK for Android: when to use it

**Use Maps SDK for Android when:**

- You need an interactive 2D Google map in a native Android or Wear OS app.
- You need to add markers, info windows, polylines, polygons, ground overlays, or tile overlays to a map in an Android app.
- You need Street View panoramas, lite mode (bitmap) maps, or Cloud-based map styling with map IDs in an Android app.
- You build an Android map in Kotlin or Java, including Jetpack Compose through the Maps Compose library.
**Don't use Maps SDK for Android when:**

- You need turn-by-turn navigation in your Android map app. Use [Navigation SDK for Android](https://developers.google.com/maps/documentation/navigation/android-sdk/quick-reference.md.txt) instead.
- You need photorealistic 3D maps, 3D models, or camera path animations in an Android app. Use [Maps 3D SDK for Android](https://developers.google.com/maps/documentation/maps-3d/android-sdk/quick-reference.md.txt) instead.
- You need a map in a native iOS app. Use [Maps SDK for iOS](https://developers.google.com/maps/documentation/ios-sdk/quick-reference.md.txt) instead.

## Maps SDK for Android: setup

- **Service to enable:** `maps-android-backend.googleapis.com`
- **Authentication:** API key
- **Usage attribution:** Call `MapsApiSettings.addInternalUsageAttributionId(context, id)` to add a usage attribution ID to the initializer (supported only with `MapsInitializer.Renderer.LATEST`). To opt out, delete the call or pass an empty string.
- **Get started:** [Set up Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk/start.md.txt)
- **Reference:** [Maps SDK for Android reference](https://developers.google.com/maps/documentation/android-sdk/reference.md.txt)
- **Pricing:** [Maps SDK for Android usage and billing](https://developers.google.com/maps/documentation/android-sdk/usage-and-billing.md.txt)
- **Policies:** [Maps SDK for Android policies](https://developers.google.com/maps/documentation/android-sdk/policies.md.txt)
- **Release notes:** [Maps SDK for Android release notes](https://developers.google.com/maps/documentation/android-sdk/release-notes.md.txt)

**Official Maps SDK for Android packages:**

- maven: `com.google.android.gms:play-services-maps`

## Maps SDK for Android: related products

- **Often used with:** [Places SDK for Android](https://developers.google.com/maps/documentation/places/android-sdk/quick-reference.md.txt)

## Maps SDK for Android: common mistakes

- **Problem:** Since SDK v20.0.0, the SDK manifest no longer includes the `org.apache.http.legacy` library. Apps that load the legacy map renderer can crash with `java.lang.NoClassDefFoundError`. **Fix:** Add inside the tag of the app's `AndroidManifest.xml`. Devices with Google Play services 25.50.34 or later aren't affected. See [/maps/documentation/android-sdk/release-notes](https://developers.google.com/maps/documentation/android-sdk/release-notes.md.txt).
- **Problem:** Advanced Markers need the upgraded map renderer. If you add them to an existing app without rebuilding it, the app can still use the legacy renderer. **Fix:** Rebuild the app with SDK 18.2.0 or later so the upgraded renderer is the default. See [/maps/documentation/android-sdk/advanced-markers/start](https://developers.google.com/maps/documentation/android-sdk/advanced-markers/start.md.txt).
- **Problem:** Devices that don't meet the renderer requirements (Android 5.0/API 21 or later, Google Play services 21.39.14 or later, Play Store enabled) fall back to the legacy renderer, so features that need the new renderer, such as Cloud-based maps styling, aren't available on them. **Fix:** Call `MapsInitializer.initialize(context, MapsInitializer.Renderer.LATEST, callback)` and check the `MapsInitializer.Renderer` value passed to `OnMapsSdkInitializedCallback.onMapsSdkInitialized()`, or check `GoogleMap.getMapCapabilities()`. If the device uses `LEGACY`, don't rely on Cloud-based maps styling or Advanced Markers. See [/android/reference/com/google/android/gms/maps/OnMapsSdkInitializedCallback](https://developers.google.com/android/reference/com/google/android/gms/maps/OnMapsSdkInitializedCallback.md.txt).
- **Problem:** The SDK requires Google Play services on the device where the app runs. **Fix:** Optionally call the Google Play services availability check from your app. See [/maps/documentation/android-sdk/config](https://developers.google.com/maps/documentation/android-sdk/config.md.txt).

## Maps SDK for Android: legacy and deprecated features

- **Legacy map renderer:** Deprecated since 2024-03-04. **Replacement:** Upgraded (latest) map renderer, which is the default since SDK 18.2.0. **Symptom:** Cloud-based maps styling, advanced polyline customizations, and Advanced Markers aren't available on the legacy renderer. See the [migration guide](https://developers.google.com/maps/documentation/android-sdk/advanced-markers/start.md.txt#enable_the_new_map_renderer).

## What you can do with Maps SDK for Android

See the guides linked below for each task, or compare across products in the
[Capabilities Explorer](https://developers.google.com/maps/documentation/capabilities-explorer.md.txt).

### Maps SDK for Android: Data-driven styling for boundaries

- [Change the style of boundaries on a map.](https://developers.google.com/maps/documentation/android-sdk/dds-boundaries/style-polygon.md.txt)
- [Respond to user interactions with boundaries on a map.](https://developers.google.com/maps/documentation/android-sdk/dds-boundaries/handle-events.md.txt)
- [Add choropleth styling to a map.](https://developers.google.com/maps/documentation/android-sdk/dds-boundaries/choropleth-map.md.txt)

### Maps SDK for Android: Data-driven styling for datasets

- [Create a reusable, cross-platform geospatial dataset.](https://developers.google.com/maps/documentation/android-sdk/dds-datasets/create-dataset.md.txt)
- [Add a custom geospatial dataset to a map.](https://developers.google.com/maps/documentation/android-sdk/dds-datasets/add-dataset-to-map.md.txt)
- [Change the style of custom dataset features on a map.](https://developers.google.com/maps/documentation/android-sdk/dds-datasets/style-data-features.md.txt)
- [Respond to user interactions with custom dataset features on a map.](https://developers.google.com/maps/documentation/android-sdk/dds-datasets/make-data-features-clickable.md.txt)

### Maps SDK for Android: Datasets

- [Add a KML layer to a map.](https://developers.google.com/maps/documentation/android-sdk/utility/kml.md.txt) **Note:** In Maps JavaScript API, KmlLayer is deprecated (last supported in v3.65, decommissioned May 2027); migrate to Data-driven styling for boundaries or datasets, or load GeoJSON on the Data layer. KML layers remain supported on Android and iOS via the Maps SDK Utility Libraries.
- [Add GeoJSON data to a map.](https://developers.google.com/maps/documentation/android-sdk/utility/geojson.md.txt)
- [Add a heatmap layer to a map.](https://developers.google.com/maps/documentation/android-sdk/utility/heatmap.md.txt)

### Maps SDK for Android: Maps

- [Add a customizable, interactive map to a web page or mobile app.](https://developers.google.com/maps/documentation/android-sdk/map.md.txt#addmap) **Note:** For Android: Configure in `AndroidManifest.xml` backed by the Secrets Gradle Plugin or `manifestPlaceholders["MAPS_API_KEY"]` in `app/build.gradle.kts`. Never hardcode `YOUR_GOOGLE_MAPS_API_KEY` in `AndroidManifest.xml`, and never replace `GoogleMap` (or maps-compose `GoogleMap`) with an offline mock canvas or Leaflet WebView if `E/Google Maps Android API: Authorization failure` appears. Instruct the user to supply `MAPS_API_KEY` via Secrets and enable Maps SDK for Android (or Navigation SDK when using NavigationView / SupportNavigationFragment).
- [Create a reusable map identifier to store map configuration and styling settings.](https://developers.google.com/maps/documentation/android-sdk/map-ids/get-map-id.md.txt#create_map_ids)
- [Respond to user interactions and events on a map.](https://developers.google.com/maps/documentation/android-sdk/events.md.txt#map_click_long_click_events)
- [Customize the controls that appear on a map.](https://developers.google.com/maps/documentation/android-sdk/controls.md.txt#ui_controls)
- [Customize the gestures for controlling a map.](https://developers.google.com/maps/documentation/android-sdk/controls.md.txt#map_gestures)
- [Control zoom and pan on a map (camera).](https://developers.google.com/maps/documentation/android-sdk/views.md.txt)
- [Change the map type.](https://developers.google.com/maps/documentation/android-sdk/configure-map.md.txt#set_the_map_type)
- [Change the map color scheme.](https://developers.google.com/maps/documentation/android-sdk/configure-map.md.txt#map_color_scheme)
- [Add a traffic layer to a map.](https://developers.google.com/maps/documentation/android-sdk/configure-map.md.txt#set_up_the_traffic_layer)
- [Add a map to a Wear OS app.](https://developers.google.com/maps/documentation/android-sdk/wear.md.txt#build-your-first-maps-app-on-wear-os)

### Maps SDK for Android: Maps annotations

- [Add an info window to a map.](https://developers.google.com/maps/documentation/android-sdk/infowindows.md.txt#add_an_info_window)
- [Add a shape or line to a map.](https://developers.google.com/maps/documentation/android-sdk/shapes.md.txt#polylines)
- [Add an overlay image grounded to the surface of a map.](https://developers.google.com/maps/documentation/android-sdk/groundoverlay.md.txt#add_an_overlay)
- [Add a custom tile overlay to a map.](https://developers.google.com/maps/documentation/android-sdk/tileoverlay.md.txt#add)
- [Add a marker to a map.](https://developers.google.com/maps/documentation/android-sdk/advanced-markers/add-marker.md.txt) **Note:** Navigation SDK for Android does not support AdvancedMarkerOptions; when using Navigation SDK for Android, add markers with GoogleMap.addMarker(MarkerOptions).
- [Customize a marker on a map.](https://developers.google.com/maps/documentation/android-sdk/advanced-markers/add-marker.md.txt) **Note:** Navigation SDK for Android does not support AdvancedMarkerOptions; when using Navigation SDK for Android, customize markers with MarkerOptions.
- [Respond to user interactions with markers on a map.](https://developers.google.com/maps/documentation/android-sdk/marker.md.txt#handle_marker_events)
- [Determine whether a coordinate is inside a polygon or circular area on a map.](https://developers.google.com/maps/documentation/android-sdk/utility.md.txt) **Note:** On Android, use PolyUtil.containsLocation in the Maps SDK for Android Utility Library for polygons. For circular areas, check whether the spherical distance from the circle center is within the radius (for example, computeDistanceBetween in Maps JavaScript API, SphericalUtil.computeDistanceBetween on Android, or GMSGeometryDistance on iOS).
- [Calculate spherical distance, area, or heading between coordinates on a map.](https://developers.google.com/maps/documentation/android-sdk/utility.md.txt#spherical)

### Maps SDK for Android: Maps styling

- [Create a reusable, cross-platform map style.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/map-styles.md.txt)
- [Change the style of roads, polylines, and polygons on a map.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/taxonomy.md.txt)
- [Display or hide map features.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/viz.md.txt)
- [Change the style of icons and text labels on a map.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/taxonomy.md.txt)
- [Apply different map styles to different zoom levels.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/zoom-levels.md.txt)
- [Change the density of places on a map.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/poi-behavior-customization.md.txt) Experimental
- [Change the style of buildings on a map.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/building-style.md.txt) Experimental
- [Change the style of landmarks on a map.](https://developers.google.com/maps/documentation/android-sdk/cloud-customization/landmarks.md.txt) Experimental

### Maps SDK for Android: Street View

- [Add a configurable, interactive Google Street View to a web page or mobile app.](https://developers.google.com/maps/documentation/android-sdk/streetview.md.txt#add_a_street_view_panorama)
- [Respond to user interactions and events in a Google Street View.](https://developers.google.com/maps/documentation/android-sdk/streetview.md.txt)
- [Customize the gestures that are available for Google Street View.](https://developers.google.com/maps/documentation/android-sdk/streetview.md.txt)
- [Animate the camera movements for a Google Street View.](https://developers.google.com/maps/documentation/android-sdk/streetview.md.txt)