Java 类com.google.android.gms.maps.StreetViewPanoramaFragment 实例源码

项目:AndroidDemoProjects    文件:MainActivity.java   
private void initStreetView( ) {
    StreetViewPanoramaFragment fragment = ( (StreetViewPanoramaFragment) getFragmentManager().findFragmentById( R.id.street_view_panorama_fragment ) );
    if( mPanorama == null ) {
        if( fragment != null ) {
            mPanorama = fragment.getStreetViewPanorama();
            if( mPanorama != null && mCurrentLocation != null ) {
                StreetViewPanoramaCamera.Builder builder = new StreetViewPanoramaCamera.Builder( mPanorama.getPanoramaCamera() );
                if( mBearing != builder.bearing )
                    builder.bearing = mBearing;
                if( mTilt != builder.tilt )
                    builder.tilt = mTilt;
                if( mZoom != builder.zoom )
                    builder.zoom = mZoom;
                mPanorama.animateTo(builder.build(), 0);
                mPanorama.setPosition( mCurrentLocation, 300 );
                mPanorama.setStreetNamesEnabled( true );
            }
        }
    }
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaFragmentPanoramaReadyOnSubscribe.java   
StreetViewPanoramaFragmentPanoramaReadyOnSubscribe(StreetViewPanoramaFragment fragment) {
  this.fragment = fragment;
}
项目:RxGoogleMapsBinding    文件:RxStreetViewPanorama.java   
/**
 * Create an observable which emits when {@link StreetViewPanorama} is ready to use.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code fragment}.
 * Unsubscribe to free this reference.
 * </p>
 */
@CheckResult @NonNull
public static Observable<StreetViewPanorama> streetViewPanoramaReady(
    @NonNull StreetViewPanoramaFragment fragment) {
  checkNotNull(fragment, "fragment == null");
  return Observable.create(new StreetViewPanoramaFragmentPanoramaReadyOnSubscribe(fragment));
}