データセット用データドリブン スタイル設定には、マップ ID が必要です。マップ ID がなかったり、渡されたマップ ID が無効だったりすると、データセット用データドリブン スタイル設定を読み込めません。トラブルシューティング用のステップとして、MapCapabilities を使用して、データセット用データドリブン スタイル設定がサポートされているかどうかを確認することが可能です。
Kotlin
valcapabilities:MapCapabilities=googleMap.getMapCapabilities()System.out.println("Data-driven Styling is available: "+capabilities.isDataDrivenStylingAvailable())
Java
MapCapabilitiescapabilities=googleMap.getMapCapabilities();System.out.println("Data-driven Styling is available: "+capabilities.isDataDrivenStylingAvailable());
[null,null,["最終更新日 2024-12-03 UTC。"],[[["To utilize data-driven styling for datasets, you'll need a Cloud project with billing enabled, the Maps SDK for Android, and the Maps Datasets API enabled."],["Ensure your app uses the upgraded map renderer (available since version 18.0.0 of the Maps SDK for Android) to support data-driven styling, rebuilding the app if necessary."],["You'll need to create a map ID associated with a new map style, then update your map initialization code to include this map ID."],["Before applying data-driven styling, it's crucial to check for map capabilities at runtime using `MapCapabilities` and provide fallback options for unsupported devices."],["Data-driven styling requires a valid map ID; if missing or invalid, the styling will fail to load."]]],[]]