Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Switch off UI in Google maps Android
//Done in a MapFragment
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
UiSettings mapUiSettings = mMap.getUiSettings();
mapUiSettings.setCompassEnabled(false);
mapUiSettings.setZoomControlsEnabled(false);
mapUiSettings.setMapToolbarEnabled(false);
}
//The same done in MapView.java during init
void someInitMethod(){
GoogleMapOptions options = new GoogleMapOptions()
.liteMode(true)
.mapToolbarEnabled(false);
mMapView = new MapView(mContext, options);
mMapView.onCreate(null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment