Skip to content

Latest commit

 

History

History
310 lines (157 loc) · 8.26 KB

StreetViewPanorama.md

File metadata and controls

310 lines (157 loc) · 8.26 KB

See html formatted version

StreetViewPanorama class

google.maps.StreetViewPanorama class

Displays the panorama for a given LatLng or panorama ID. A StreetViewPanorama object provides a Street View "viewer" which can be stand-alone within a separate

or bound to a Map.

This class extends MVCObject.

Constructor

undefined

StreetViewPanorama(container[, opts])

Parameters: 

Creates a panorama with the passed StreetViewPanoramaOptions.

Methods

undefined

getLinks()

Parameters:  None

Return Value:  Array<StreetViewLink>

Returns the set of navigation links for the Street View panorama.

undefined

getLocation()

Parameters:  None

Return Value:  StreetViewLocation

Returns the StreetViewLocation of the current panorama.

undefined

getMotionTracking()

Parameters:  None

Return Value:  boolean

Returns the state of motion tracker. If true when the user physically moves the device and the browser supports it, the Street View Panorama tracks the physical movements.

undefined

getPano()

Parameters:  None

Return Value:  string

Returns the current panorama ID for the Street View panorama. This id is stable within the browser's current session only.

undefined

getPhotographerPov()

Parameters:  None

Return Value:  StreetViewPov

Returns the heading and pitch of the photographer when this panorama was taken. For Street View panoramas on the road, this also reveals in which direction the car was travelling. This data is available after the pano_changed event.

undefined

getPosition()

Parameters:  None

Return Value:  LatLng

Returns the current LatLng position for the Street View panorama.

undefined

getPov()

Parameters:  None

Return Value:  StreetViewPov

Returns the current point of view for the Street View panorama.

undefined

getStatus()

Parameters:  None

Return Value:  StreetViewStatus

Returns the status of the panorama on completion of the setPosition() or setPano() request.

undefined

getVisible()

Parameters:  None

Return Value:  boolean

Returns true if the panorama is visible. It does not specify whether Street View imagery is available at the specified position.

undefined

getZoom()

Parameters:  None

Return Value:  number

Returns the zoom level of the panorama. Fully zoomed-out is level 0, where the field of view is 180 degrees. Zooming in increases the zoom level.

undefined

registerPanoProvider(provider[, opt_options])

Parameters: 

Return Value:  None

Set the custom panorama provider called on pano change to load custom panoramas.

undefined

setLinks(links)

Parameters: 

Return Value:  None

Sets the set of navigation links for the Street View panorama.

undefined

setMotionTracking(motionTracking)

Parameters: 

  • motionTracking:  boolean

Return Value:  None

Sets the state of motion tracker. If true when the user physically moves the device and the browser supports it, the Street View Panorama tracks the physical movements.

undefined

setOptions(options)

Parameters: 

Return Value:  None

Sets a collection of key-value pairs.

undefined

setPano(pano)

Parameters: 

  • pano:  string

Return Value:  None

Sets the current panorama ID for the Street View panorama.

undefined

setPosition(latLng)

Parameters: 

Return Value:  None

Sets the current LatLng position for the Street View panorama.

undefined

setPov(pov)

Parameters: 

Return Value:  None

Sets the point of view for the Street View panorama.

undefined

setVisible(flag)

Parameters: 

  • flag:  boolean

Return Value:  None

Sets to true to make the panorama visible. If set to false, the panorama will be hidden whether it is embedded in the map or in its own

.

undefined

setZoom(zoom)

Parameters: 

  • zoom:  number

Return Value:  None

Sets the zoom level of the panorama. Fully zoomed-out is level 0, where the field of view is 180 degrees. Zooming in increases the zoom level.

Properties

undefined

Type:  Array<MVCArray>

Additional controls to attach to the panorama. To add a control to the panorama, add the control's

to the MVCArray corresponding to the ControlPosition where it should be rendered.

Events

undefined

function(event)

Arguments: 

  • event:  Event

This event is fired when the close button is clicked.

undefined

function()

Arguments:  None

This event is fired when the panorama's pano id changes. The pano may change as the user navigates through the panorama or the position is manually set. Note that not all position changes trigger a pano_changed.

undefined

function()

Arguments:  None

This event is fired when the panorama's position changes. The position changes as the user navigates through the panorama or the position is set manually.

undefined

function()

Arguments:  None

This event is fired when the panorama's point-of-view changes. The point of view changes as the pitch, zoom, or heading changes.

undefined

function()

Arguments:  None

Developers should trigger this event on the panorama when its div changes size: google.maps.event.trigger(panorama, 'resize').

undefined

function()

Arguments:  None

This event is fired after every panorama lookup by id or location, via setPosition() or setPano().

undefined

function()

Arguments:  None

This event is fired when the panorama's visibility changes. The visibility is changed when the Pegman is dragged onto the map, the close button is clicked, or setVisible() is called.

undefined

function()

Arguments:  None

This event is fired when the panorama's zoom level changes.