@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); } }); }
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.IOnStreetViewPanoramaChangeListener"); return true; } paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IOnStreetViewPanoramaChangeListener"); if (paramParcel1.readInt() != 0) {} for (StreetViewPanoramaLocation localStreetViewPanoramaLocation = fkn.a(paramParcel1);; localStreetViewPanoramaLocation = null) { a(localStreetViewPanoramaLocation); paramParcel2.writeNoException(); return true; } }
public static StreetViewPanoramaLocation a(Parcel paramParcel) { int i = efj.a(paramParcel); LatLng localLatLng = null; StreetViewPanoramaLink[] arrayOfStreetViewPanoramaLink = null; int j = 0; String str = null; 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: arrayOfStreetViewPanoramaLink = (StreetViewPanoramaLink[])efj.b(paramParcel, k, StreetViewPanoramaLink.CREATOR); break; case 3: localLatLng = (LatLng)efj.a(paramParcel, k, LatLng.CREATOR); break; case 4: str = efj.e(paramParcel, k); } } if (paramParcel.dataPosition() != i) { throw new bm("Overread allowed size end=" + i, paramParcel); } return new StreetViewPanoramaLocation(j, arrayOfStreetViewPanoramaLink, localLatLng, str); }
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); } }
@Override public void onStreetViewPanoramaChange(StreetViewPanoramaLocation location) { if (mCurrentLocation != null) { mStreetViewPanorama.setPosition(mCurrentLocation); } }
@Override public void onStreetViewPanoramaChange(StreetViewPanoramaLocation location) { if (location != null) { marker.setPosition(location.position); } }
@Override public void onStreetViewPanoramaChange(StreetViewPanoramaLocation location) { if (location != null) { mPanoChangeTimesTextView.setText("Times panorama changed=" + ++mPanoChangeTimes); } }
/** * 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)); }
public abstract void a(StreetViewPanoramaLocation paramStreetViewPanoramaLocation);
public abstract StreetViewPanoramaLocation f();