Created
April 9, 2017 15:45
-
-
Save rwoloszyn/6e12ba1e9190f1ede677dd88fffb0b51 to your computer and use it in GitHub Desktop.
Switch off UI in Google maps Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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