@Override public void setMapToolbarEnabled(boolean enabled) { googleMap.getUiSettings().setMapToolbarEnabled(enabled); }
@Override @SuppressWarnings("MissingPermission") public void onMapReady(GoogleMap googleMap) { map = googleMap; map.getUiSettings().setMapToolbarEnabled(false); if (listener.hasLocationPermission()) { map.setMyLocationEnabled(true); map.getUiSettings().setMyLocationButtonEnabled(false); } map.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker marker) { if (marker.getTag() instanceof Place) { Place place = (Place) marker.getTag(); listener.onPlaceSelected(place); } } }); if (state == State.MAP) { displayPlaces(placesToDisplay); } }
@Override public void setMapToolbarEnabled(boolean enabled) { uiSettings.setMapToolbarEnabled(enabled); } }
mUiSettings.setMapToolbarEnabled(false);
@Override public void onMapReady(GoogleMap googleMap) { mGoogleMap = googleMap; MapsInitializer.initialize(getRootView().getContext()); mGoogleMap.setMyLocationEnabled(false); // Don't show my location mGoogleMap.setBuildingsEnabled(false); // Don't show 3D buildings mGoogleMap.getUiSettings().setMapToolbarEnabled(false); // No toolbar needed in a lite preview if (mLocation != null) { // location has already been bound - bind it to the map setLocation(mLocation); } }
@Override public void onMapReady(GoogleMap googleMap) { MapsInitializer.initialize(mContext); map = googleMap; isMapReady=true; map.getUiSettings().setMapToolbarEnabled(false); if (mapView.getViewTreeObserver().isAlive()) { mapView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @SuppressWarnings("deprecation") // We use the new method when supported @SuppressLint("NewApi") // We check which build version we are using. @Override public void onGlobalLayout() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { mapView.getViewTreeObserver().removeGlobalOnLayoutListener(this); } else { mapView.getViewTreeObserver().removeOnGlobalLayoutListener(this); } // showBoth(null); } }); } try{ setMapData(new LatLng(Double.parseDouble(addressModel.getLatitude()),Double.parseDouble(addressModel.getLongitude()))); }catch(Exception e){ e.printStackTrace(); } // mapInterface.mapIsReadyToSet(this,position); }
@Test public void testDelegateMethods() throws Exception { // Given UiSettings uiSettings = mock(UiSettings.class); UiSettingsAdapter adapter = new UiSettingsAdapter(uiSettings); // When adapter.setAllGesturesEnabled(true); adapter.setMapToolbarEnabled(true); adapter.setMyLocationButtonEnabled(true); // Then verify(uiSettings).setAllGesturesEnabled(eq(true)); verify(uiSettings).setMapToolbarEnabled(eq(true)); verify(uiSettings).setMyLocationButtonEnabled(true); }
.icon(BitmapDescriptorFactory.fromResource(R.drawable.jamorham_parakeet_marker))); mMap.getUiSettings().setMapToolbarEnabled(false); mMap.getUiSettings().setMyLocationButtonEnabled(true);
.icon(BitmapDescriptorFactory.fromResource(R.drawable.jamorham_parakeet_marker))); mMap.getUiSettings().setMapToolbarEnabled(false); mMap.getUiSettings().setMyLocationButtonEnabled(true);
map.getUiSettings().setMapToolbarEnabled(false); map.getUiSettings().setZoomControlsEnabled(false);