Use Maps SDK for Android v3.1.0 BETA Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
The Beta version of the Maps SDK for Android is deprecated and will be decommissioned; a future version will offer similar features.
Version 3.1.0 beta of the Maps SDK for Android introduces new features including maps customization, marker collision handling, and polyline customization.
Developers can customize polylines with multicolored segments, gradient colors, and repeating bitmap textures.
Users of the Google Maps Android API utility library need to update to a beta-compatible version.
Sample apps demonstrating the new features are available on GitHub.
Beta SDK deprecation notice: The Beta version of the SDK is deprecated and scheduled for decommissioning, and it's no longeravailable for new usage. The features described in this topic are currently accessed via the BetaSDK. A future version of the SDK will provide similar support for these features. See therelease notes for more information.Use theMaps V3 BETAMigration Tool to help with migrating from the deprecated Beta version to a supported version.
Version 3.1.0 beta of the Maps SDK for Android is a new implementation with thesame API surface as the previous version (all classes and methods remain thesame), and some new features for you to try:
- Maps customization
- Marker collision handling
- Polyline customization
This guide shows you how to use the new features.
Maps customization (beta)
cloud-based maps styling provides a variety of tools and featuresthat let you customize and manage how your maps are styled. Ratherthan styling your map in code using the Maps APIs and SDKs, you can manage andstyle your maps in the Google Cloud console. For more information, seeAndroid Map Customization Overview.
Marker collision handling (beta)
You can specify whether custom markers should override default basemap labelswhen there is a collision, and to indicate relative priority between custommarkers. For more information, seeMarker Collision Handling (Android).
Polyline Customization (beta)
There are now several new ways to customize the appearance of polylines:
- Multicolored polylines set polyline segments to different colors.
- Gradient polylines color a polyline using a gradient of two colors.
- Stamped polylines style a polyline using repeating bitmaps.
Create a multicolored polyline
You can use spans to individually color segments of a polyline, by creatingStyleSpan objects, and adding them toPolylineOptions using theaddSpan()oraddSpans() methods. By default, each item in the array will set the colorof the corresponding line segment.
Create a gradient polyline
You can define a gradient by specifying two 32-bit alpha-red-green-blue (ARGB)integers, to specify the beginning and ending colors of the stroke. Set thisproperty on the shape's options object by callingPolylineOptions.addSpan().
Create a stamped polyline
You can set the appearance of a polyline to a repeating bitmap texture. To dothis, create aStampStyle ofTextureStyle, then set this property on theshape's options object by callingPolylineOptions.addSpan().
Import the beta-compatible utility library
If you are using theGoogle Maps Android API utility library,you must also update your project dependencies to replace the existing versionwith the beta-compatible version using the following steps:
- Import the beta-compatible util library in your
build.gradlefile:implementation'com.google.maps.android:android-maps-utils-v3:1.3.1'
- Remove the following from your
build.gradleto remove non-beta-compatibleutility library:implementation'com.google.maps.android:android-maps-utils:1.3.1'
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-10 UTC.