UNPKG

1.75 kBTypeScriptView Raw
1declare namespace google.maps {
2 class StreetViewService {
3 getPanorama(
4 request: StreetViewLocationRequest | StreetViewPanoRequest,
5 cb: (data: StreetViewPanoramaData | null, status: StreetViewStatus) => void,
6 ): void;
7 getPanoramaById(
8 pano: string,
9 callback: (streetViewPanoramaData: StreetViewPanoramaData, streetViewStatus: StreetViewStatus) => void,
10 ): void;
11 getPanoramaByLocation(
12 latlng: LatLng | LatLngLiteral,
13 radius: number,
14 callback: (streetViewPanoramaData: StreetViewPanoramaData, streetViewStatus: StreetViewStatus) => void,
15 ): void;
16 }
17
18 enum StreetViewStatus {
19 OK = 'OK',
20 UNKNOWN_ERROR = 'UNKNOWN_ERROR',
21 ZERO_RESULTS = 'ZERO_RESULTS',
22 }
23
24 interface StreetViewLocationRequest {
25 location: LatLng | LatLngLiteral;
26 preference?: StreetViewPreference;
27 radius?: number;
28 source?: StreetViewSource;
29 }
30
31 interface StreetViewPanoRequest {
32 pano: string;
33 }
34
35 interface StreetViewLocation {
36 description?: string;
37 latLng?: LatLng;
38 pano?: string;
39 shortDescription?: string;
40 }
41
42 enum StreetViewPreference {
43 BEST = 'best',
44 NEAREST = 'nearest',
45 }
46
47 enum StreetViewSource {
48 DEFAULT = 'default',
49 OUTDOOR = 'outdoor',
50 }
51
52 interface StreetViewPanoramaData {
53 copyright?: string;
54 imageDate?: string;
55 links?: StreetViewLink[];
56 location?: StreetViewLocation;
57 tiles?: StreetViewTileData;
58 }
59
60 interface StreetViewLink {
61 description?: string;
62 heading?: number;
63 pano?: string;
64 }
65}