New pricing changes went into effect on July 16, 2018. For more information, check out the Guide for Existing Users.

Service

StreetViewService class

google.maps.StreetViewService class

A StreetViewService object performs searches for Street View data.

Constructor
StreetViewService
StreetViewService()
Parameters:  None
Creates a StreetViewService, which provides an interface to the data stored in the Street View service.
Methods
getPanorama
getPanorama(request, callback)
Return Value:  None
Retrieves the StreetViewPanoramaData for a panorama that matches the supplied Street View query request. The StreetViewPanoramaData is passed to the provided callback.

StreetViewStatus constants

google.maps.StreetViewStatus constants

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

Constants
OK The request was successful.
UNKNOWN_ERROR The request could not be successfully processed, yet the exact reason for failure is unknown.
ZERO_RESULTS There are no panoramas found that match the search criteria.

StreetViewLocationRequest interface

google.maps.StreetViewLocationRequest interface

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

Properties
location
Specifies the location where to search for a Street View panorama.
preference
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.
radius
Type:  number
Sets a radius in meters in which to search for a panorama. Defaults to 50 when not supplied.
source
Specifies the source of panoramas to search. This allows a restriction to search for just outdoor panoramas for example. If not specified it is set to DEFAULT.

StreetViewPanoRequest interface

google.maps.StreetViewPanoRequest interface

A StreetViewPanoRequest is used with the getPanorama to find a panorama with a specified ID.

Properties
pano
Type:  string
Specifies the pano ID to search for.

StreetViewLocation interface

google.maps.StreetViewLocation interface

A representation of a location in the Street View panorama.

Properties
description
Type:  string
A localized string describing the location.
latLng
Type:  LatLng
The latlng of the panorama.
pano
Type:  string
A unique identifier for the panorama. This is stable within a session but unstable across sessions.
shortDescription
Type:  string
Short description of the location.

StreetViewPreference constants

google.maps.StreetViewPreference constants

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' or google.maps.StreetViewPreference.BEST.

Constants
BEST Return 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.
NEAREST Return 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.

StreetViewSource constants

google.maps.StreetViewSource constants

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

Constants
DEFAULT Uses the default sources of Street View, searches will not be limited to specific sources.
OUTDOOR Limits 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.

StreetViewPanoramaData interface

google.maps.StreetViewPanoramaData interface

The representation of a panorama returned from the provider defined using registerPanoProvider.

Properties
copyright
Type:  string
Specifies the copyright text for this panorama.
imageDate
Type:  string
Specifies the year and month in which the imagery in this panorama was acquired. The date string is in the form YYYY-MM.
location
Specifies the location meta-data for this panorama.
tiles
Specifies the custom tiles for this panorama.

google.maps.StreetViewLink interface

A collection of references to adjacent Street View panos.

Properties
description
Type:  string
A localized string describing the link.
heading
Type:  number
The heading of the link.
pano
Type:  string
A unique identifier for the panorama. This id is stable within a session but unstable across sessions.

Оставить отзыв о...

Текущей странице
Maps JavaScript API
Нужна помощь? Обратитесь в службу поддержки.