Google マップでは、ポリラインまたはポリゴンを定義する緯度と経度の座標は、エンコードされた文字列として保存されます。詳しくは、ポリラインのエンコードに関する説明をご覧ください。Directions API などの Google API からのレスポンスで、このエンコードされた文字列を受け取ることがあります。
Maps SDK for Android ユーティリティ ライブラリの PolyUtil を使って、一連の緯度と経度の座標(「LatLngs」)をエンコードされたパス文字列にエンコードし、エンコードされたパス文字列を一連の LatLngs にデコードできます。これにより、Google Maps API ウェブサービスとの相互運用性が保証されます。
[null,null,["最終更新日 2024-12-03 UTC。"],[[["The Maps SDK for Android Utility Library is an open-source library offering advanced features for enhancing Google Maps in Android applications."],["It provides utilities for importing GeoJSON and KML data, adding heatmaps, clustering markers, managing multiple map layers, and working with polylines."],["The library includes features for customizing markers with bubble icons and performing spherical geometry calculations for distances, areas, and headings."],["Developers can quickly set up the library by following the provided setup guide and access detailed documentation for each utility."],["A demo app is included in the GitHub repository showcasing the usage of the various classes and functionalities within the library."]]],["The Maps SDK for Android Utility Library offers tools for enhancing map functionality. Key actions include importing GeoJSON and KML data, adding heatmaps, managing marker clusters, and customizing markers with bubble icons. It supports adding multiple layers, and it also allows users to encode/decode polylines and utilize spherical geometry for distance, area, and heading calculations. Additionally, users can check if a location is supported in street view. All utilities are open-source, and can be viewed with the provided demo app.\n"]]