Options
All
  • Public
  • Public/Protected
  • All
Menu

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 <div> or bound to a Map.

Access by calling const {StreetViewPanorama} = await google.maps.importLibrary("streetView"). See https://developers.google.com/maps/documentation/javascript/libraries.

Hierarchy

Index

Constructors

Properties

controls: MVCArray<HTMLElement>[]

Additional controls to attach to the panorama. To add a control to the panorama, add the control's <div> to the MVCArray corresponding to the google.maps.ControlPosition where it should be rendered.

Methods

  • Adds the given listener function to the given event name. Returns an identifier for this listener that can be used with google.maps.event.removeListener.

    Parameters

    • eventName: string
    • handler: Function

    Returns MapsEventListener

  • bindTo(key: string, target: MVCObject, targetKey?: null | string, noNotify?: boolean): void
  • Binds a View to a Model.

    Parameters

    • key: string
    • target: MVCObject
    • Optional targetKey: null | string
    • Optional noNotify: boolean

    Returns void

  • focus(): void
  • Sets focus on this StreetViewPanorama. You may wish to consider using this method along with a visible_changed event to make sure that StreetViewPanorama is visible before setting focus on it. A StreetViewPanorama that is not visible cannot be focused.

    Returns void

  • get(key: string): any
  • Gets a value.

    Parameters

    • key: string

    Returns any

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

    Returns null | (null | StreetViewLink)[]

  • getMotionTracking(): 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.

    Returns boolean

  • getPano(): string
  • Returns the current panorama ID for the Street View panorama. This id is stable within the browser's current session only.

    Returns string

  • 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.

    Returns StreetViewPov

  • Returns the current LatLng position for the Street View panorama.

    Returns null | LatLng

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

    Returns StreetViewPov

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

    Returns StreetViewStatus

  • getVisible(): boolean
  • Returns true if the panorama is visible. It does not specify whether Street View imagery is available at the specified position.

    Returns boolean

  • getZoom(): 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.

    Returns number

  • notify(key: string): void
  • Notify all observers of a change on this property. This notifies both objects that are bound to the object's property as well as the object that it is bound to.

    Parameters

    • key: string

    Returns void

  • set(key: string, value: unknown): void
  • Sets a value.

    Parameters

    • key: string
    • value: unknown

    Returns void

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

    Parameters

    Returns void

  • setMotionTracking(motionTracking: boolean): void
  • 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.

    Parameters

    • motionTracking: boolean

    Returns void

  • setPano(pano: string): void
  • Sets the current panorama ID for the Street View panorama.

    Parameters

    • pano: string

    Returns void

  • Sets the current LatLng position for the Street View panorama.

    Parameters

    Returns void

  • Sets the point of view for the Street View panorama.

    Parameters

    Returns void

  • setValues(values?: null | object): void
  • Sets a collection of key-value pairs.

    Parameters

    • Optional values: null | object

    Returns void

  • setVisible(flag: boolean): void
  • 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 <div>.

    Parameters

    • flag: boolean

    Returns void

  • setZoom(zoom: number): void
  • 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.

    Parameters

    • zoom: number

    Returns void

  • unbind(key: string): void
  • Removes a binding. Unbinding will set the unbound property to the current value. The object will not be notified, as the value has not changed.

    Parameters

    • key: string

    Returns void

  • unbindAll(): void

Generated using TypeDoc