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

项目:Android-Wear-Projects    文件:StreetView.java   
@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_street_view);

    SupportStreetViewPanoramaFragment streetViewPanoramaFragment =
            (SupportStreetViewPanoramaFragment)
                    getSupportFragmentManager().findFragmentById(R.id.streetviewpanorama);

    streetViewPanoramaFragment.getStreetViewPanoramaAsync(
            new OnStreetViewPanoramaReadyCallback() {
                @Override
                public void onStreetViewPanoramaReady(StreetViewPanorama panorama) {
                    // Only set the panorama to SYDNEY on startup (when no panoramas have been
                    // loaded which is when the savedInstanceState is null).
                    if (savedInstanceState == null) {
                        panorama.setPosition(SYDNEY);
                    }
                }
            });
}
项目:android-OurStreets    文件:StreetViewFragment.java   
private void setUpStreetViewPanoramaIfNeeded(final LatLng location) {
    mMapFragment.getStreetViewPanoramaAsync(new OnStreetViewPanoramaReadyCallback() {
        @Override
        public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
            if (streetViewPanorama != null) {
                streetViewPanorama.setPosition(location);
                streetViewPanorama.setUserNavigationEnabled(true);
                streetViewPanorama.setPanningGesturesEnabled(true);
                streetViewPanorama.setZoomGesturesEnabled(true);

                StreetViewPanoramaCamera galleryOrientation = StreetViewPanoramaCamera.
                        builder(streetViewPanorama.getPanoramaCamera())
                        .bearing(mDetail.getBearing())
                        .tilt(mDetail.getTilt())
                        .build();
                streetViewPanorama.animateTo(galleryOrientation, TimeUnit.SECONDS.toMillis(1));
            }
        }
    });
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaLongClickOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanoramaOrientation> subscriber) {
  MainThreadSubscription.verifyMainThread();

  StreetViewPanorama.OnStreetViewPanoramaLongClickListener listener =
      new StreetViewPanorama.OnStreetViewPanoramaLongClickListener() {
        @Override public void onStreetViewPanoramaLongClick(
            StreetViewPanoramaOrientation streetViewPanoramaOrientation) {
          if (!subscriber.isUnsubscribed()) {
            subscriber.onNext(streetViewPanoramaOrientation);
          }
        }
      };

  streetViewPanorama.setOnStreetViewPanoramaLongClickListener(listener);

  subscriber.add(new MainThreadSubscription() {
    @Override protected void onUnsubscribe() {
      streetViewPanorama.setOnStreetViewPanoramaLongClickListener(null);
    }
  });
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaClickOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanoramaOrientation> subscriber) {
  MainThreadSubscription.verifyMainThread();

  StreetViewPanorama.OnStreetViewPanoramaClickListener listener =
      new StreetViewPanorama.OnStreetViewPanoramaClickListener() {
        @Override public void onStreetViewPanoramaClick(
            StreetViewPanoramaOrientation streetViewPanoramaOrientation) {
          if (!subscriber.isUnsubscribed()) {
            subscriber.onNext(streetViewPanoramaOrientation);
          }
        }
      };

  streetViewPanorama.setOnStreetViewPanoramaClickListener(listener);

  subscriber.add(new MainThreadSubscription() {
    @Override protected void onUnsubscribe() {
      streetViewPanorama.setOnStreetViewPanoramaClickListener(null);
    }
  });
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaCameraChangeOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanoramaCamera> subscriber) {
  MainThreadSubscription.verifyMainThread();

  StreetViewPanorama.OnStreetViewPanoramaCameraChangeListener listener =
      new StreetViewPanorama.OnStreetViewPanoramaCameraChangeListener() {
        @Override public void onStreetViewPanoramaCameraChange(
            StreetViewPanoramaCamera streetViewPanoramaCamera) {
          if (!subscriber.isUnsubscribed()) {
            subscriber.onNext(streetViewPanoramaCamera);
          }
        }
      };

  streetViewPanorama.setOnStreetViewPanoramaCameraChangeListener(listener);

  subscriber.add(new MainThreadSubscription() {
    @Override protected void onUnsubscribe() {
      streetViewPanorama.setOnStreetViewPanoramaCameraChangeListener(null);
    }
  });
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaChangeOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanoramaLocation> subscriber) {
  MainThreadSubscription.verifyMainThread();

  StreetViewPanorama.OnStreetViewPanoramaChangeListener listener =
      new StreetViewPanorama.OnStreetViewPanoramaChangeListener() {
        @Override public void onStreetViewPanoramaChange(
            StreetViewPanoramaLocation streetViewPanoramaLocation) {
          if (!subscriber.isUnsubscribed()) {
            subscriber.onNext(streetViewPanoramaLocation);
          }
        }
      };

  streetViewPanorama.setOnStreetViewPanoramaChangeListener(listener);

  subscriber.add(new MainThreadSubscription() {
    @Override protected void onUnsubscribe() {
      streetViewPanorama.setOnStreetViewPanoramaChangeListener(null);
    }
  });
}
项目:react-native-streetview    文件:NSTStreetView.java   
@Override
public void onStreetViewPanoramaReady(StreetViewPanorama panorama) {

    this.panorama = panorama;
    this.panorama.setPanningGesturesEnabled(allGesturesEnabled);
    if (coordinate != null) {
        this.panorama.setPosition(coordinate);
    }
}
项目:android-OurStreets    文件:StreetViewFragment.java   
private void initMapFragment() {
    mMapFragment = SupportStreetViewPanoramaFragment.newInstance();
    mMapFragment.getStreetViewPanoramaAsync(new OnStreetViewPanoramaReadyCallback() {
        @Override
        public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
            setUpStreetViewPanoramaIfNeeded(mDetail.getPosition());
        }
    });
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaFragmentPanoramaReadyOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanorama> subscriber) {
  OnStreetViewPanoramaReadyCallback callback = new OnStreetViewPanoramaReadyCallback() {
    @Override public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
      if (!subscriber.isUnsubscribed()) {
        subscriber.onNext(streetViewPanorama);
      }
    }
  };

  fragment.getStreetViewPanoramaAsync(callback);
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaViewPanoramaReadyOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanorama> subscriber) {
  OnStreetViewPanoramaReadyCallback callback = new OnStreetViewPanoramaReadyCallback() {
    @Override public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
      if (!subscriber.isUnsubscribed()) {
        subscriber.onNext(streetViewPanorama);
      }
    }
  };

  view.getStreetViewPanoramaAsync(callback);
}
项目: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
 * streetViewPanoramaView}. Unsubscribe to free this reference.
 * </p>
 */
@CheckResult @NonNull
public static Observable<StreetViewPanorama> streetViewPanoramaReady(
    @NonNull StreetViewPanoramaView streetViewPanoramaView) {
  checkNotNull(streetViewPanoramaView, "streetViewPanoramaView == null");
  return Observable.create(
      new StreetViewPanoramaViewPanoramaReadyOnSubscribe(streetViewPanoramaView));
}
项目: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 SupportStreetViewPanoramaFragment fragment) {
  checkNotNull(fragment, "fragment == null");
  return Observable.create(
      new StreetViewPanoramaSupportFragmentPanoramaReadyOnSubscribe(fragment));
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaSupportFragmentPanoramaReadyOnSubscribe.java   
@Override public void call(final Subscriber<? super StreetViewPanorama> subscriber) {
  OnStreetViewPanoramaReadyCallback callback = new OnStreetViewPanoramaReadyCallback() {
    @Override public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
      if (!subscriber.isUnsubscribed()) {
        subscriber.onNext(streetViewPanorama);
      }
    }
  };

  fragment.getStreetViewPanoramaAsync(callback);
}
项目:grado_informatica_npi    文件:MapsActivity.java   
@Override
public void onStreetViewPanoramaReady(StreetViewPanorama panorama) {
    mStreetViewPanorama = panorama;
    mStreetViewPanorama.setOnStreetViewPanoramaChangeListener(this);
    mStreetViewPanorama.setStreetNamesEnabled(true);

    // Only need to set the position once as the streetview fragment will maintain
    // its state.
    if (mCurrentLocation != null) {
        mStreetViewPanorama.setPosition(mCurrentLocation);
    }
}
项目:tiempobus    文件:StreetViewActivity.java   
private void initSVFragment(final Bundle savedInstanceState) {

        mSvpFragment = ((SupportStreetViewPanoramaFragment) getSupportFragmentManager()
                .findFragmentById(R.id.streetviewpanorama));
        mSvpFragment.getStreetViewPanoramaAsync(new OnStreetViewPanoramaReadyCallback() {
            @Override
            public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
                setUpStreetViewPanoramaIfNeeded(savedInstanceState, coordenadas);
            }
        });

    }
项目:Google-Maps-BottomSheet    文件:MainActivity.java   
@Override
public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {
    streetViewPanorama.setPosition(SYDNEY);
    streetViewPanorama.setUserNavigationEnabled(false);
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaLongClickOnSubscribe.java   
StreetViewPanoramaLongClickOnSubscribe(StreetViewPanorama streetViewPanorama) {
  this.streetViewPanorama = streetViewPanorama;
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaClickOnSubscribe.java   
StreetViewPanoramaClickOnSubscribe(StreetViewPanorama streetViewPanorama) {
  this.streetViewPanorama = streetViewPanorama;
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaCameraChangeOnSubscribe.java   
StreetViewPanoramaCameraChangeOnSubscribe(StreetViewPanorama streetViewPanorama) {
  this.streetViewPanorama = streetViewPanorama;
}
项目:RxGoogleMapsBinding    文件:StreetViewPanoramaChangeOnSubscribe.java   
StreetViewPanoramaChangeOnSubscribe(StreetViewPanorama streetViewPanorama) {
  this.streetViewPanorama = streetViewPanorama;
}
项目:tiempobus    文件:StreetViewActivity.java   
/**
 * StreetView
 *
 * @param savedInstanceState
 */
private void setUpStreetViewPanoramaIfNeeded(final Bundle savedInstanceState, final LatLng coordenadas) {


    mSvpFragment.getStreetViewPanoramaAsync(new OnStreetViewPanoramaReadyCallback() {
        @Override
        public void onStreetViewPanoramaReady(StreetViewPanorama streetViewPanorama) {

            if (streetViewPanorama != null && savedInstanceState == null) {

                streetViewPanorama.setPosition(coordenadas);
                streetViewPanorama.setUserNavigationEnabled(true);
                streetViewPanorama.setPanningGesturesEnabled(true);
                streetViewPanorama.setZoomGesturesEnabled(true);

                Log.d("STREETVIEW", "coordenadas 2: " + coordenadas.latitude + " - " + coordenadas.longitude);


            }

        }
    });


}
项目: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));
}
项目:RxGoogleMapsBinding    文件:RxStreetViewPanorama.java   
/**
 * Create an observable which emits on {@code streetViewPanorama} camera position change events.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code
 * streetViewPanorama}. Unsubscribe to free this reference.
 * </p>
 */
@CheckResult @NonNull
public static Observable<StreetViewPanoramaCamera> streetViewPanoramaCameraChanges(
    @NonNull StreetViewPanorama streetViewPanorama) {
  checkNotNull(streetViewPanorama, "streetViewPanorama == null");
  return Observable.create(new StreetViewPanoramaCameraChangeOnSubscribe(streetViewPanorama));
}
项目:RxGoogleMapsBinding    文件:RxStreetViewPanorama.java   
/**
 * Create an observable which emits on {@code streetViewPanorama} panorama change events.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code
 * streetViewPanorama}. Unsubscribe to free this reference.
 * </p>
 */
@CheckResult @NonNull
public static Observable<StreetViewPanoramaLocation> streetViewPanoramaChanges(
    @NonNull StreetViewPanorama streetViewPanorama) {
  checkNotNull(streetViewPanorama, "streetViewPanorama == null");
  return Observable.create(new StreetViewPanoramaChangeOnSubscribe(streetViewPanorama));
}
项目:RxGoogleMapsBinding    文件:RxStreetViewPanorama.java   
/**
 * Create an observable which emits on {@code streetViewPanorama} click events.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code
 * streetViewPanorama}. Unsubscribe to free this reference.
 * </p>
 */
@CheckResult @NonNull
public static Observable<StreetViewPanoramaOrientation> streetViewPanoramaClicks(
    StreetViewPanorama streetViewPanorama) {
  checkNotNull(streetViewPanorama, "streetViewPanorama == null");
  return Observable.create(new StreetViewPanoramaClickOnSubscribe(streetViewPanorama));
}
项目:RxGoogleMapsBinding    文件:RxStreetViewPanorama.java   
/**
 * Create an observable which emits on {@code streetViewPanorama} long-click events.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code
 * streetViewPanorama}. Unsubscribe to free this reference.
 * </p>
 */
@CheckResult @NonNull
public static Observable<StreetViewPanoramaOrientation> streetViewPanoramaLongClicks(
    @NonNull StreetViewPanorama streetViewPanorama) {
  checkNotNull(streetViewPanorama, "streetViewPanorama == null");
  return Observable.create(new StreetViewPanoramaLongClickOnSubscribe(streetViewPanorama));
}