StreetViewPanoramaOptions

public final classStreetViewPanoramaOptionsextendsObject
implementsParcelableParcelable

Defines configuration PanoramaOptions for aStreetViewPanorama. These options can be used when adding a panorama to your application programmatically. If you are using aStreetViewPanoramaFragment, you can pass these options in using the static factory method StreetViewPanoramaFragment.newInstance(StreetViewPanoramaOptions).If you are using aStreetViewPanoramaView, you can pass these options in using the constructor StreetViewPanoramaView.StreetViewPanoramaView(Context, StreetViewPanoramaOptions).

Inherited Constant Summary

Public Constructor Summary

StreetViewPanoramaOptions()
Creates a new StreetViewPanoramaOptions object.

Public Method Summary

Boolean
getPanningGesturesEnabled()
Returnstrueif users are initially able to pan via gestures on Street View panoramas.
String
getPanoramaId()
Returns the initial panorama ID for the Street View panorama, or nullif unspecified.
LatLng
getPosition()
Returns the initial position for the Street View panorama, ornull if unspecified.
Integer
getRadius()
Returns the initial radius used to search for a Street View panorama, or nullif unspecified.
StreetViewSource
getSource()
Returns the source filter used to search for a Street View panorama, or StreetViewSource.DEFAULTif unspecified.
Boolean
getStreetNamesEnabled()
Returnstrueif users are initially able to see street names on Street View panoramas.
StreetViewPanoramaCamera
getStreetViewPanoramaCamera()
Returns the initial camera for the Street View panorama, ornull if unspecified.
Boolean
getUseViewLifecycleInFragment()
Returns the useViewLifecycleInFragment option, ornullif unspecified.
Boolean
getUserNavigationEnabled()
Returnstrueif users are initially able to move to different Street View panoramas.
Boolean
getZoomGesturesEnabled()
Returnstrueif users are initially able to zoom via gestures on Street View panoramas.
StreetViewPanoramaOptions
panningGesturesEnabled(boolean enabled)
Toggles the ability for users to use pan around on panoramas using gestures.
StreetViewPanoramaOptions
panoramaCamera(StreetViewPanoramaCamera camera)
Specifies the initial camera for the Street View panorama.
StreetViewPanoramaOptions
panoramaId(StringpanoId)
Specifies the initial position for the Street View panorama based on a panorama id.
StreetViewPanoramaOptions
position(LatLng position)
Specifies the initial position for the Street View panorama based upon location.
StreetViewPanoramaOptions
position(LatLng position,Integerradius, StreetViewSource source)
Specifies the initial position for the Street View panorama based upon location, radius and source.
StreetViewPanoramaOptions
position(LatLng position,Integerradius)
Specifies the initial position for the Street View panorama based upon location and radius.
StreetViewPanoramaOptions
position(LatLng position,StreetViewSource source)
Specifies the initial position for the Street View panorama based upon location and source.
StreetViewPanoramaOptions
streetNamesEnabled(boolean enabled)
Toggles the ability for users to see street names on panoramas.
String
StreetViewPanoramaOptions
useViewLifecycleInFragment(boolean useViewLifecycleInFragment)
When using a StreetViewPanoramaFragment,this flag specifies whether the lifecycle of the Street View panorama should be tied to the fragment's view or the fragment itself.
StreetViewPanoramaOptions
userNavigationEnabled(boolean enabled)
Toggles the ability for users to move between panoramas.
void
writeToParcel(Parcelout, int flags)
StreetViewPanoramaOptions
zoomGesturesEnabled(boolean enabled)
Toggles the ability for users to zoom on panoramas using gestures.

Inherited Method Summary

Public Constructors

publicStreetViewPanoramaOptions()

Creates a new StreetViewPanoramaOptions object.

Public Methods

publicBooleangetPanningGesturesEnabled()

Returnstrueif users are initially able to pan via gestures on Street View panoramas.

publicStringgetPanoramaId()

Returns the initial panorama ID for the Street View panorama, ornull if unspecified.

publicLatLng getPosition()

Returns the initial position for the Street View panorama, ornullif unspecified.

publicIntegergetRadius()

Returns the initial radius used to search for a Street View panorama, or nullif unspecified.

publicStreetViewSource getSource()

Returns the source filter used to search for a Street View panorama, or StreetViewSource.DEFAULT if unspecified.

publicBooleangetStreetNamesEnabled()

Returnstrueif users are initially able to see street names on Street View panoramas.

publicStreetViewPanoramaCamera getStreetViewPanoramaCamera()

Returns the initial camera for the Street View panorama, ornullif unspecified.

publicBooleangetUseViewLifecycleInFragment()

Returns the useViewLifecycleInFragment option, ornullif unspecified.

publicBooleangetUserNavigationEnabled()

Returnstrueif users are initially able to move to different Street View panoramas.

publicBooleangetZoomGesturesEnabled()

Returnstrueif users are initially able to zoom via gestures on Street View panoramas.

publicStreetViewPanoramaOptions panningGesturesEnabled(boolean enabled)

Toggles the ability for users to use pan around on panoramas using gestures. See StreetViewPanorama.setPanningGesturesEnabled(boolean)for more details. The default istrue

publicStreetViewPanoramaOptions panoramaCamera(StreetViewPanoramaCamera camera)

Specifies the initial camera for the Street View panorama.

publicStreetViewPanoramaOptions panoramaId(StringpanoId)

Specifies the initial position for the Street View panorama based on a panorama id. The position set by the panoramaID takes precedence over a position set by a LatLng.

publicStreetViewPanoramaOptions position(LatLng position)

Specifies the initial position for the Street View panorama based upon location. The position set by the panoramaID, if set, takes precedence over a position set by a LatLng.

publicStreetViewPanoramaOptions position(LatLngposition, Integerradius, StreetViewSource source)

Specifies the initial position for the Street View panorama based upon location, radius and source. The position set by the panoramaID, if set, takes precedence over a position set by a LatLng.

publicStreetViewPanoramaOptions position(LatLngposition, Integer radius)

Specifies the initial position for the Street View panorama based upon location and radius. The position set by the panoramaID, if set, takes precedence over a position set by a LatLng.

publicStreetViewPanoramaOptions position(LatLngposition, StreetViewSource source)

Specifies the initial position for the Street View panorama based upon location and source. The position set by the panoramaID, if set, takes precedence over a position set by a LatLng.

publicStreetViewPanoramaOptions streetNamesEnabled(boolean enabled)

Toggles the ability for users to see street names on panoramas. See StreetViewPanorama.setStreetNamesEnabled(boolean)for more details. The default istrue

publicStringtoString()

publicStreetViewPanoramaOptions useViewLifecycleInFragment(boolean useViewLifecycleInFragment)

When using aStreetViewPanoramaFragment, this flag specifies whether the lifecycle of the Street View panorama should be tied to the fragment's view or the fragment itself. The default value isfalse, tying the lifecycle of the Street View panorama to the fragment.

Using the lifecycle of the fragment allows faster rendering of the Street View panorama when the fragment is detached and reattached, because the underlying GL context is preserved. This has the cost that detaching the fragment, but not destroying it, will not release memory used by the panorama.

Using the lifecycle of a fragment's view means that a Street View panorama is not reused when the fragment is detached and reattached. This will cause the map to re-render from scratch, which can take a few seconds. It also means that while a fragment is detached, and therefore has no view, allStreetViewPanorama methods will throwNullPointerException.

publicStreetViewPanoramaOptions userNavigationEnabled(boolean enabled)

Toggles the ability for users to move between panoramas. See StreetViewPanorama.setUserNavigationEnabled(boolean)for more details. The default istrue

public voidwriteToParcel(Parcelout, int flags)

publicStreetViewPanoramaOptions zoomGesturesEnabled(boolean enabled)

Toggles the ability for users to zoom on panoramas using gestures. See StreetViewPanorama.setZoomGesturesEnabled(boolean)for more details. The default istrue