在我的 Android 应用程序中,当点击 map 上的标记时,我的 map 屏幕会显示方向和 Google map 。我在我的应用程序中使用以下内容。
XML:
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
在代码中:
GoogleMap googleMap = ((MapFragment) getFragmentManager().findFragmentById(
R.id.map)).getMap();
我已经用蓝色标记了方向和谷歌地图图标。请查看我的 map 屏幕的图像。
如何从 map fragment 中隐藏方向和 Google map 图标?
最佳答案
Google Map 为此提供了一个简单的 bool 方法:
gmap.getUiSettings().setMapToolbarEnabled(false);
你就完成了。
关于Android 谷歌地图版本 2 显示方向和谷歌地图图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29254999/