Places UI Kit: A ready-to-use library that provides room for customization and low-code development. Try it out, and share yourinput on your UI Kit experience.

Service

StreetViewServiceclass

google.maps.StreetViewServiceclass

AStreetViewService object performs searches for Street View data.

Access by callingconst {StreetViewService} = await google.maps.importLibrary("streetView").
SeeLibraries in the Maps JavaScript API.

Constructor

StreetViewService
StreetViewService()
Parameters:  None
Creates aStreetViewService, which provides an interface to the data stored in the Street View service.

Methods

getPanorama
getPanorama(request[, callback])
Parameters: 
Return Value: Promise<StreetViewResponse>
Retrieves theStreetViewPanoramaData for a panorama that matches the supplied Street View query request. TheStreetViewPanoramaData is passed to the provided callback.

StreetViewStatusconstants

google.maps.StreetViewStatusconstants

The status returned by theStreetViewService on completion of a Street View request. These can be specified by value, or by using the constant's name. For example,'OK' orgoogle.maps.StreetViewStatus.OK.

Access by callingconst {StreetViewStatus} = await google.maps.importLibrary("streetView").
SeeLibraries in the Maps JavaScript API.

Constants

OKThe request was successful.
UNKNOWN_ERRORThe request could not be successfully processed, yet the exact reason for failure is unknown.
ZERO_RESULTSThere are no panoramas found that match the search criteria.

StreetViewLocationRequestinterface

google.maps.StreetViewLocationRequestinterface

A Street View request to be sent withgetPanorama.StreetViewLocationRequest lets you search for a Street View panoroma at a specified location.

Properties

locationoptional
Type: LatLng|LatLngLiteraloptional
Specifies the location where to search for a Street View panorama.
preferenceoptional
Type: StreetViewPreferenceoptional
Sets a preference for which panorama should be found within the radius: the one nearest to the provided location, or the best one within the radius.
radiusoptional
Type: numberoptional
Default:50
Sets a radius in meters in which to search for a panorama.
sourceoptional

Deprecated: Usesources instead.

Type: StreetViewSourceoptional
Specifies the source of panoramas to search. This allows a restriction to search for just outdoor panoramas for example.
sourcesoptional
Type: Iterable<StreetViewSource>optional
Specifies the sources of panoramas to search. This allows a restriction to search for just outdoor panoramas for example. Setting multiple sources will be evaluated as the intersection of those sources.

StreetViewPanoRequestinterface

google.maps.StreetViewPanoRequestinterface

AStreetViewPanoRequest is used with thegetPanorama to find a panorama with a specified ID.

Properties

panooptional
Type: stringoptional
Specifies the pano ID to search for.

StreetViewResponseinterface

google.maps.StreetViewResponseinterface

The response resolved for a Promise fromStreetViewService.getPanorama.

Properties

data
The representation of a panorama.

StreetViewLocationinterface

google.maps.StreetViewLocationinterface

A representation of a location in the Street View panorama.

Properties

pano
Type: string
A unique identifier for the panorama. This is stable within a session but unstable across sessions.
descriptionoptional
Type: stringoptional
A localized string describing the location.
latLngoptional
Type: LatLngoptional
The latlng of the panorama.
shortDescriptionoptional
Type: stringoptional
Short description of the location.

StreetViewPreferenceconstants

google.maps.StreetViewPreferenceconstants

Options that bias a search result towards returning a Street View panorama that is nearest to the request location, or a panorama that is considered most likely to be what the user wants to see. Specify these by value, or by using the constant's name. For example,'best' orgoogle.maps.StreetViewPreference.BEST.

Access by callingconst {StreetViewPreference} = await google.maps.importLibrary("streetView").
SeeLibraries in the Maps JavaScript API.

Constants

BESTReturn the Street View panorama that is considered most likely to be what the user wants to see. The best result is determined by algorithms based on user research and parameters such as recognised points of interest, image quality, and distance from the given location.
NEARESTReturn the Street View panorama that is the shortest distance from the provided location. This works well only within a limited radius. The recommended radius is 1km or less.

StreetViewSourceconstants

google.maps.StreetViewSourceconstants

Identifiers to limit Street View searches to selected sources. These values are specified as strings. For example,'outdoor'.

Access by callingconst {StreetViewSource} = await google.maps.importLibrary("streetView").
SeeLibraries in the Maps JavaScript API.

Constants

DEFAULTUses the default sources of Street View, searches will not be limited to specific sources.
GOOGLELimits Street View searches to official Google collections.
OUTDOORLimits Street View searches to outdoor collections. Indoor collections are not included in search results. Note also that the search only returns panoramas where it's possible to determine whether they're indoors or outdoors. For example, PhotoSpheres are not returned because it's unknown whether they are indoors or outdoors.

StreetViewPanoramaDatainterface

google.maps.StreetViewPanoramaDatainterface

The representation of a panorama returned from the provider defined usingregisterPanoProvider.

Properties

tiles
Specifies the custom tiles for this panorama.
copyrightoptional
Type: stringoptional
Specifies the copyright text for this panorama.
imageDateoptional
Type: stringoptional
Specifies the year and month in which the imagery in this panorama was acquired. The date string is in the form YYYY-MM.
linksoptional
Type: Array<StreetViewLink>optional
Specifies the navigational links to adjacent panoramas.
locationoptional
Type: StreetViewLocationoptional
Specifies the location meta-data for this panorama.

StreetViewLinkinterface

google.maps.StreetViewLinkinterface

A collection of references to adjacent Street View panos.

Properties

descriptionoptional
Type: stringoptional
A localized string describing the link.
headingoptional
Type: numberoptional
The heading of the link.
panooptional
Type: stringoptional
A unique identifier for the panorama. This id is stable within a session but unstable across sessions.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-06 UTC.