【发布时间】:2017-10-02 10:09:05
【问题描述】:
MapToolbar 连同一个标记显示在地图上,当单击工具栏时,它会重定向到谷歌地图。我想禁用此功能。
map_view.xml
<com.google.android.gms.maps.MapView
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/summary_mv_map"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
map:liteMode="true"/>
我尝试了什么:添加了mapView.getUiSettings().setMapToolbarEnabled(false),但无法解析 getUiSettings().setMapToolbarEnabled()。
注意:不要删除标记strong>
【问题讨论】:
-
试试这个:
googleMap.getUiSettings().setMapToolbarEnabled(false);更多信息请参考this。 -
已尝试,但此代码适用于 GoogleMap 而不是 MapView
-
mapView.getMap()返回 GoogleMap。 -
无法解析 mapView.getMap()
标签: android google-maps android-mapview