Reputation: 1869
my question is quite easy, but I haven't found the answer yet. I need to remove these controls from the map:
They appear when I press on my marker. This is my code of setting up the map.
mMap = ((MapFragment) getChildFragmentManager().findFragmentById(R.id.map)).getMap();
mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
// Showing / hiding your current location
mMap.setMyLocationEnabled(false);
// Enable / Disable zooming controls
mMap.getUiSettings().setZoomControlsEnabled(false);
// Enable / Disable my location button
mMap.getUiSettings().setMyLocationButtonEnabled(false);
// Enable / Disable Compass icon
mMap.getUiSettings().setCompassEnabled(true);
// Enable / Disable Rotate gesture
mMap.getUiSettings().setRotateGesturesEnabled(true);
// Enable / Disable zooming functionality
mMap.getUiSettings().setZoomGesturesEnabled(true);
mMap.setPadding(0, 150, 0, 150);
Upvotes: 0
Views: 1153
Reputation: 1940
you could also set this in xml
<fragment xmlns:map="http://schemas.android.com/apk/res-auto"
android:name="com.google.android.gms.maps.SupportMapFragment"
...
map:uiMapToolbar="false"
...
/>
Upvotes: 0
Reputation: 3126
According to the documentation you can use the method setMapToolbarEnabled . So you need to add the following line:
mMap.getUiSettings().setMapToolbarEnabled(false);
Upvotes: 3