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

项目: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    文件: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);
    }
  });
}
项目:FMTech    文件:fib.java   
public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
{
  switch (paramInt1)
  {
  default: 
    return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
  case 1598968902: 
    paramParcel2.writeString("com.google.android.gms.maps.internal.IOnStreetViewPanoramaCameraChangeListener");
    return true;
  }
  paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IOnStreetViewPanoramaCameraChangeListener");
  if (paramParcel1.readInt() != 0) {}
  for (StreetViewPanoramaCamera localStreetViewPanoramaCamera = fkl.a(paramParcel1);; localStreetViewPanoramaCamera = null)
  {
    a(localStreetViewPanoramaCamera);
    paramParcel2.writeNoException();
    return true;
  }
}
项目: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 );
            }
        }
    }
}
项目:FMTech    文件:StreetViewPanoramaOptions.java   
public StreetViewPanoramaOptions(int paramInt, StreetViewPanoramaCamera paramStreetViewPanoramaCamera, String paramString, LatLng paramLatLng, Integer paramInteger, byte paramByte1, byte paramByte2, byte paramByte3, byte paramByte4, byte paramByte5)
{
  this.a = paramInt;
  this.b = paramStreetViewPanoramaCamera;
  this.d = paramLatLng;
  this.e = paramInteger;
  this.c = paramString;
  this.f = efj.a(paramByte1);
  this.g = efj.a(paramByte2);
  this.h = efj.a(paramByte3);
  this.i = efj.a(paramByte4);
  this.j = efj.a(paramByte5);
}
项目:FMTech    文件:fkl.java   
public static StreetViewPanoramaCamera a(Parcel paramParcel)
{
  float f1 = 0.0F;
  int i = efj.a(paramParcel);
  float f2 = 0.0F;
  int j = 0;
  float f3 = 0.0F;
  while (paramParcel.dataPosition() < i)
  {
    int k = paramParcel.readInt();
    switch (0xFFFF & k)
    {
    default: 
      efj.b(paramParcel, k);
      break;
    case 1: 
      efj.a(paramParcel, k, 4);
      j = paramParcel.readInt();
      break;
    case 2: 
      efj.a(paramParcel, k, 4);
      f2 = paramParcel.readFloat();
      break;
    case 3: 
      efj.a(paramParcel, k, 4);
      f3 = paramParcel.readFloat();
      break;
    case 4: 
      efj.a(paramParcel, k, 4);
      f1 = paramParcel.readFloat();
    }
  }
  if (paramParcel.dataPosition() != i) {
    throw new bm("Overread allowed size end=" + i, paramParcel);
  }
  return new StreetViewPanoramaCamera(j, f2, f3, f1);
}
项目:HereAStory-Android    文件:StreetViewPanoramaEventsDemoActivity.java   
@Override
public void onStreetViewPanoramaClick(StreetViewPanoramaOrientation orientation) {
    Point point = svp.orientationToPoint(orientation);
    if (point != null) {
        mPanoClickTextView.setText(
            "Times clicked=" + ++mPanoClickTimes + " :" + point.toString());
        svp.animateTo(new StreetViewPanoramaCamera.Builder().orientation(orientation)
            .zoom(svp.getPanoramaCamera().zoom).build(), 1000);
    }
}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onZoomIn(View view) {
    if (!checkReady()) {
        return;
    }

    svp.animateTo(
        new StreetViewPanoramaCamera.Builder().zoom(svp.getPanoramaCamera().zoom + ZOOM_BY)
        .tilt(svp.getPanoramaCamera().tilt)
        .bearing(svp.getPanoramaCamera().bearing).build(), getDuration());
}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onZoomOut(View view) {
    if (!checkReady()) {
        return;
    }

    svp.animateTo(
        new StreetViewPanoramaCamera.Builder().zoom(svp.getPanoramaCamera().zoom - ZOOM_BY)
        .tilt(svp.getPanoramaCamera().tilt)
        .bearing(svp.getPanoramaCamera().bearing).build(), getDuration());
}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onPanLeft(View view) {
    if (!checkReady()) {
        return;
    }

    svp.animateTo(
        new StreetViewPanoramaCamera.Builder().zoom(svp.getPanoramaCamera().zoom)
        .tilt(svp.getPanoramaCamera().tilt)
        .bearing(svp.getPanoramaCamera().bearing - PAN_BY_DEG).build(), getDuration());
}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onPanRight(View view) {
    if (!checkReady()) {
        return;
    }

    svp.animateTo(
        new StreetViewPanoramaCamera.Builder().zoom(svp.getPanoramaCamera().zoom)
        .tilt(svp.getPanoramaCamera().tilt)
        .bearing(svp.getPanoramaCamera().bearing + PAN_BY_DEG).build(), getDuration());

}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onPanUp(View view) {
    if (!checkReady()) {
        return;
    }

    float currentTilt = svp.getPanoramaCamera().tilt;
    float newTilt = currentTilt + PAN_BY_DEG;

    newTilt = (newTilt > 90) ? 90 : newTilt;

    svp.animateTo(
        new StreetViewPanoramaCamera.Builder().zoom(svp.getPanoramaCamera().zoom)
        .tilt(newTilt)
        .bearing(svp.getPanoramaCamera().bearing).build(), getDuration());
}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onPanDown(View view) {
    if (!checkReady()) {
        return;
    }

    float currentTilt = svp.getPanoramaCamera().tilt;
    float newTilt = currentTilt - PAN_BY_DEG;

    newTilt = (newTilt < -90) ? -90 : newTilt;

    svp.animateTo(
        new StreetViewPanoramaCamera.Builder().zoom(svp.getPanoramaCamera().zoom)
        .tilt(newTilt)
        .bearing(svp.getPanoramaCamera().bearing).build(), getDuration());
}
项目:HereAStory-Android    文件:StreetViewPanoramaNavigationDemoActivity.java   
public void onMovePosition(View view) {
    StreetViewPanoramaLocation location = svp.getLocation();
    StreetViewPanoramaCamera camera = svp.getPanoramaCamera();
    if (location != null && location.links != null) {
        StreetViewPanoramaLink link = findClosestLinkToBearing(location.links, camera.bearing);
        svp.setPosition(link.panoId);
    }
}
项目:HereAStory-Android    文件:StreetViewPanoramaEventsDemoActivity.java   
@Override
public void onStreetViewPanoramaCameraChange(StreetViewPanoramaCamera camera) {
    mPanoCameraChangeTextView.setText("Times camera changed=" + ++mPanoCameraChangeTimes);
}
项目: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));
}
项目:FMTech    文件:fia.java   
public abstract void a(StreetViewPanoramaCamera paramStreetViewPanoramaCamera);
项目:FMTech    文件:ffs.java   
public abstract void a(StreetViewPanoramaCamera paramStreetViewPanoramaCamera, long paramLong);
项目:FMTech    文件:ffs.java   
public abstract StreetViewPanoramaCamera e();