[null,null,["最后更新时间 (UTC):2024-05-09。"],[[["\u003cp\u003eThe Beta version of the Maps SDK for Android is deprecated and will be decommissioned; a future version will offer similar features.\u003c/p\u003e\n"],["\u003cp\u003eVersion 3.1.0 beta of the Maps SDK for Android introduces new features including maps customization, marker collision handling, and polyline customization.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize polylines with multicolored segments, gradient colors, and repeating bitmap textures.\u003c/p\u003e\n"],["\u003cp\u003eUsers of the Google Maps Android API utility library need to update to a beta-compatible version.\u003c/p\u003e\n"],["\u003cp\u003eSample apps demonstrating the new features are available on GitHub.\u003c/p\u003e\n"]]],["The Beta SDK is deprecated; use the Migration Tool to transition to a supported version. Version 3.1.0 beta introduces new features: map customization via the Google Cloud console, marker collision handling to prioritize markers, and enhanced polyline customization. Polyline customization includes multicolored, gradient, and stamped polylines, achievable using `StyleSpan`, `PolylineOptions.addSpan()`, and `StampStyle`. The beta-compatible utility library is also to be imported by replacing existing dependencies. Sample apps are available on GitHub.\n"],null,["| **Beta SDK deprecation notice:**\n|\n| The Beta version of the SDK is deprecated and scheduled for decommissioning, and it's no longer\n| available for new usage. The features described in this topic are currently accessed via the Beta\n| SDK. A future version of the SDK will provide similar support for these features.\n|\n| See the [release notes](/maps/documentation/android-sdk/releases#2021-08-18) for more information.\n| Use the [Maps V3 BETA\n| Migration Tool](https://github.com/googlemaps/android-v3-migration) to help with migrating from the deprecated Beta version to a supported version.\n\n\u003cbr /\u003e\n\nVersion 3.1.0 beta of the Maps SDK for Android is a new implementation with the\nsame API surface as the previous version (all classes and methods remain the\nsame), and some new features for you to try:\n\n- Maps customization\n- Marker collision handling\n- Polyline customization\n\nThis guide shows you how to use the new features.\n\nMaps customization (beta)\n\ncloud-based maps styling provides a variety of tools and features\nthat let you customize and manage how your maps are styled. Rather\nthan styling your map in code using the Maps APIs and SDKs, you can manage and\nstyle your maps in the Google Cloud console. For more information, see\n[Android Map Customization Overview](/maps/documentation/android-sdk/maps-customization-overview).\n\nMarker collision handling (beta)\n\nYou can specify whether custom markers should override default basemap labels\nwhen there is a collision, and to indicate relative priority between custom\nmarkers. For more information, see [Marker Collision Handling (Android)](/maps/documentation/android-sdk/manage-marker-label-collisions).\n\nPolyline Customization (beta)\n\nThere are now several new ways to customize the appearance of polylines:\n\n- **Multicolored polylines** set polyline segments to different colors.\n- **Gradient polylines** color a polyline using a gradient of two colors.\n- **Stamped polylines** style a polyline using repeating bitmaps.\n\nCreate a multicolored polyline\n\nYou can use spans to individually color segments of a polyline, by creating\n`StyleSpan` objects, and adding them to `PolylineOptions` using the `addSpan()`\nor `addSpans()` methods. By default, each item in the array will set the color\nof the corresponding line segment.\n\nCreate a gradient polyline\n\nYou can define a gradient by specifying two 32-bit alpha-red-green-blue (ARGB)\nintegers, to specify the beginning and ending colors of the stroke. Set this\nproperty on the shape's options object by calling `PolylineOptions.addSpan()`.\n\nCreate a stamped polyline\n\nYou can set the appearance of a polyline to a repeating bitmap texture. To do\nthis, create a `StampStyle` of `TextureStyle`, then set this property on the\nshape's options object by calling `PolylineOptions.addSpan()`.\n\nImport the beta-compatible utility library\n\nIf you are using the\n[Google Maps Android API utility library](https://github.com/googlemaps/android-maps-utils),\nyou must also update your project dependencies to replace the existing version\nwith the beta-compatible version using the following steps:\n\n1. Import the beta-compatible util library in your `build.gradle` file: \n\n ```carbon\n implementation 'com.google.maps.android:android-maps-utils-v3:1.3.1'\n ```\n2. Remove the following from your `build.gradle` to remove non-beta-compatible utility library: \n\n ```carbon\n implementation 'com.google.maps.android:android-maps-utils:1.3.1'\n ```"]]