The `getAvailableMaps` API fetches information for all maps that are available to be displayed. This is useful if you would like to give your users a variety of map styles to choose from. ```java import com.amplifyframework.core.Amplify; import com.amplifyframework.geo.models.MapStyle; ``` ```java Amplify.Geo.getAvailableMaps( result -> { for (final MapStyle style : result) { Log.i("MyAmplifyApp", style.toString()); } }, error -> Log.e("MyAmplifyApp", "Failed to get available maps.", error) ); ``` ```kotlin import com.amplifyframework.core.Amplify ``` ```kotlin Amplify.Geo.getAvailableMaps( { for (mapStyle in it) { Log.i("MyAmplifyApp", mapStyle.toString()) } }, { Log.e("MyAmplifyApp", "Failed to get available maps.", it) } ) ``` You can set a different style to your map using `setStyle` method from the adapter: With `MapLibreView`: ```java // where mapStyle is a reference to the selected style from Amplify.Geo.getAvailableMaps mapView.setStyle(mapStyle, style -> { Log.i("MyAmplifyApp", "Finished loading " + mapStyle.getStyle()); }); ``` With `AmplifyMapView`: ```java // where mapStyle is a reference to the selected style from Amplify.Geo.getAvailableMaps amplifyMapView.getMapView().setStyle(mapStyle, style -> { Log.i("MyAmplifyApp", "Finished loading " + mapStyle.getStyle()); }); ``` With `MapLibreView`: ```kotlin // where mapStyle is a reference to the selected style from Amplify.Geo.getAvailableMaps mapView.setStyle(mapStyle) { style -> Log.i("MyAmplifyApp", "Finished loading ${mapStyle.style}.") } ``` With `AmplifyMapView`: ```kotlin // where mapStyle is a reference to the selected style from Amplify.Geo.getAvailableMaps amplifyMapView.mapView.setStyle(mapStyle) { style -> Log.i("MyAmplifyApp", "Finished loading ${mapStyle.style}.") } ```