// UI settings of map private void mapUiSetting(boolean flag) { uiSettings.setZoomControlsEnabled(flag); uiSettings.setCompassEnabled(flag); uiSettings.setMyLocationButtonEnabled(flag); uiSettings.setScrollGesturesEnabled(flag); uiSettings.setZoomGesturesEnabled(flag); uiSettings.setTiltGesturesEnabled(flag); uiSettings.setRotateGesturesEnabled(flag); }
private void setupMapUI() { GoogleMap mMap = getMap(); if (mMap != null) { mMap.setMyLocationEnabled(true); UiSettings mUiSettings = mMap.getUiSettings(); mUiSettings.setMyLocationButtonEnabled(true); mUiSettings.setCompassEnabled(true); mUiSettings.setTiltGesturesEnabled(false); } }
public void disableGestures() { UiSettings uiSettings = googleMap.getUiSettings(); uiSettings.setMyLocationButtonEnabled(false); uiSettings.setTiltGesturesEnabled(false); uiSettings.setZoomGesturesEnabled(false); uiSettings.setZoomControlsEnabled(false); uiSettings.setRotateGesturesEnabled(false); uiSettings.setMyLocationButtonEnabled(false); uiSettings.setScrollGesturesEnabled(false); uiSettings.setCompassEnabled(false); }
@Override public void onMapReady(GoogleMap googleMap) { // Enable MyLocation Button in the Map mGoogleMap = googleMap; mGoogleMap.setMyLocationEnabled(true); mGoogleMap.setBuildingsEnabled(true); mGoogleMap.setPadding(0, topPadding, 0, UIUtils.getActionBarSize(this)); // mGoogleMap.setOnMarkerClickListener(this); // mGoogleMap.setOnMapClickListener(this); UiSettings uiSettings = mGoogleMap.getUiSettings(); uiSettings.setCompassEnabled(false); uiSettings.setTiltGesturesEnabled(false); uiSettings.setZoomControlsEnabled(true); }