Code example for UiSettings

Methods: setCompassEnabled, setTiltGesturesEnabled

0
	        setUpMapIfNeeded(); 
	        mMap.setMapType(MAP_TYPE_TERRAIN);
	        mMap.setMyLocationEnabled(true);
	        mUiSettings=mMap.getUiSettings();
	        //设置地图显示指南针 
	        mUiSettings.setCompassEnabled(true);
	        //倾斜手势操作 
	        mUiSettings.setTiltGesturesEnabled(true);
	    } 
	 private void setUpMapIfNeeded() { 
	        if (mMap == null) {
	            mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapGoogle))
	                    .getMap();
	        } 
	    } 
}