2015-02-07 98 views
6

我開始了一個新的項目與Android Studio的谷歌地圖模板,並添加一個標記到地圖。谷歌地圖刪除標記路由上下文菜單

LatLng location = new LatLng(lat, lng); 
Marker marker = mMap.addMarker(new MarkerOptions() 
      .position(location) 
      .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker))); 

當我點擊該標記有自帶的右下角有一個谷歌地圖的圖標有點菜單:

the menu on the bottom right

我怎樣才能擺脫這件事?我找不到任何我甚至不知道如何稱呼但我真的需要擺脫它。

+4

該死的......我只是沒有看到它:mMap.getUiSettings()setMapToolbarEnabled(假)。 – Informatic0re 2015-02-07 02:23:18

回答

6

你需要調用UiSettings

像這樣setMapToolbarEnabled方法:

@Override 
public void onMapReady(GoogleMap googleMap) { 
    googleMap.getUiSettings().setMapToolbarEnabled(false); 

    // Do other staff 
}