@cyclomedia/streetsmart-api 23.14.4 → 23.14.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -47
- package/index.d.ts +529 -36
- package/package.json +10 -13
- package/src/types/MeshViewer.d.ts +81 -0
- package/src/types/ObliqueViewer.d.ts +180 -0
- package/src/types/PanoramaViewer.d.ts +340 -0
- package/src/types/PointCloudViewer.d.ts +159 -0
- package/src/types/shared.d.ts +355 -0
- package/dist/esm/index.js +0 -80
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/// <reference path="shared.d.ts" />
|
|
2
|
+
declare module '@cyclomedia/streetsmart-api' {
|
|
3
|
+
/**
|
|
4
|
+
* Represents a MeshViewerContainer React component instance.
|
|
5
|
+
*/
|
|
6
|
+
class MeshViewerContainer extends React.PureComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the ID of this viewer.
|
|
9
|
+
* @returns {string} The ID of this viewer.
|
|
10
|
+
*/
|
|
11
|
+
getId(): string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Returns whether the map is desaturated or not.
|
|
15
|
+
* @returns {boolean} Desaturation state of the map.
|
|
16
|
+
*/
|
|
17
|
+
getMapDesaturated(): boolean;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Returns the expanded state of the navbar.
|
|
21
|
+
* @returns {boolean} Expanded state of the navbar.
|
|
22
|
+
*/
|
|
23
|
+
getNavbarExpanded(): boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns the visibility state of the navbar.
|
|
27
|
+
* @returns {boolean} Visibility state of the navbar.
|
|
28
|
+
*/
|
|
29
|
+
getNavbarVisible(): boolean;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Returns the type of this viewer.
|
|
33
|
+
* @returns {ViewerType} The type of this viewer.
|
|
34
|
+
*/
|
|
35
|
+
getType(): ViewerType;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Toggles the expanded state of the navbar.
|
|
39
|
+
* @param {boolean} [expanded] - If available, sets expanded to this value.
|
|
40
|
+
*/
|
|
41
|
+
toggleNavbarExpanded(expanded?: boolean): void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Toggles the visibility of the navbar.
|
|
45
|
+
* @param {boolean} [visible] - If available, sets visibility to this value.
|
|
46
|
+
*/
|
|
47
|
+
toggleNavbarVisible(visible?: boolean): void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Sets the texture of the meshes either to gray-scale (desaturated=true) or color.
|
|
51
|
+
* @param {boolean} [desaturated=true] - If provided and true, sets the meshes to gray-scale; otherwise, sets them to color.
|
|
52
|
+
*/
|
|
53
|
+
setDesaturatedTexture(desaturated?: boolean): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Updates the height of the eye in LOS analysis.
|
|
57
|
+
* @param {number} eyeHeight - The new eye height.
|
|
58
|
+
*/
|
|
59
|
+
setLOSEyeHeight(eyeHeight: number): void;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sets the navigation state of the viewer.
|
|
63
|
+
* @param {boolean} enabled - Whether the viewer is able to interact with the RIA map or not.
|
|
64
|
+
*/
|
|
65
|
+
setNavigationState(enabled: boolean): void;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Sets the visibility of an overlay layer.
|
|
69
|
+
* @param {string} layerId - The ID of the overlay layer.
|
|
70
|
+
* @param {boolean} visibility - The new visibility state.
|
|
71
|
+
* @returns {Promise<void>} A Promise that resolves when the visibility is updated.
|
|
72
|
+
*/
|
|
73
|
+
setOverlayVisibility(layerId: string, visibility: boolean): Promise<void>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Sets the time for the viewer.
|
|
77
|
+
* @param {Date} [time] - The new time.
|
|
78
|
+
*/
|
|
79
|
+
setTime(time?: Date): void;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/// <reference path="shared.d.ts" />
|
|
2
|
+
declare module '@cyclomedia/streetsmart-api' {
|
|
3
|
+
type ObliqueViewerEventCallback<T extends ObliqueViewerEvents | SharedViewerEvents> = (
|
|
4
|
+
event: ViewerEvent<ObliqueViewerEventDetails[T]>,
|
|
5
|
+
) => void;
|
|
6
|
+
|
|
7
|
+
class ObliqueViewer extends React.PureComponent {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the type of this viewer.
|
|
10
|
+
* @returns {ViewerType} The type of this viewer.
|
|
11
|
+
*/
|
|
12
|
+
getType(): ViewerType;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Returns the ID of this viewer.
|
|
16
|
+
* @returns {string} The ID of this viewer.
|
|
17
|
+
*/
|
|
18
|
+
getId(): string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Sets the selected feature using the given properties.
|
|
22
|
+
* @param {Object} jsonProperties - The properties by which the feature should be determined.
|
|
23
|
+
* @param {?string} layerId - The layer Id to which the feature is added.
|
|
24
|
+
*/
|
|
25
|
+
setSelectedFeatureByProperties(jsonProperties: Record<string, any>, layerId: string | undefined): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Toggles the visibility of the navbar in the ObliqueViewer.
|
|
29
|
+
* @param {Boolean} [visible] - If available, sets visibility to this value.
|
|
30
|
+
*/
|
|
31
|
+
toggleNavbarVisible(visible?: boolean): void;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns the visibility state of the navbar.
|
|
35
|
+
* @returns {Boolean} The visibility state of the navbar.
|
|
36
|
+
*/
|
|
37
|
+
getNavbarVisible(): boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Modify the state of navbar expanded in the ObliqueViewer.
|
|
41
|
+
* @param {Boolean} [expanded] - If available, sets expanded to this value.
|
|
42
|
+
*/
|
|
43
|
+
toggleNavbarExpanded(expanded?: boolean): void;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Returns the expanded state of the navbar.
|
|
47
|
+
* @returns {Boolean} The expanded state of the navbar.
|
|
48
|
+
*/
|
|
49
|
+
getNavbarExpanded(): boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Modify the state of sidebar expanded in the ObliqueViewer.
|
|
53
|
+
* @param {Boolean} [expanded] - If available, sets expanded to this value.
|
|
54
|
+
*/
|
|
55
|
+
toggleSidebarExpanded(expanded?: boolean): void;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns the expanded state of the sidebar.
|
|
59
|
+
* @returns {Boolean} The expanded state of the sidebar.
|
|
60
|
+
*/
|
|
61
|
+
getSidebarExpanded(): boolean;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Toggles the visibility of the sidebar in the ObliqueViewer.
|
|
65
|
+
* @param {Boolean} [visible] - If available, sets visibility to this value.
|
|
66
|
+
*/
|
|
67
|
+
toggleSidebarVisible(visible?: boolean): void;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Returns the visibility state of the sidebar.
|
|
71
|
+
* @returns {Boolean} The visibility state of the sidebar.
|
|
72
|
+
*/
|
|
73
|
+
getSidebarVisible(): boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Enables/disables the ability to toggle the sidebar in the ObliqueViewer.
|
|
77
|
+
* @param {Boolean} [enabled] - If available, sets visibility to this value.
|
|
78
|
+
*/
|
|
79
|
+
toggleSidebarEnabled(enabled?: boolean): void;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Returns the enabled state of the sidebar.
|
|
83
|
+
* @returns {Boolean} The enabled state of the sidebar.
|
|
84
|
+
*/
|
|
85
|
+
getSidebarEnabled(): boolean;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Toggle the visibility of a button.
|
|
89
|
+
* @param {ObliqueViewerUi} buttonId - The ID of the button.
|
|
90
|
+
* @param {Boolean} [enabled] - If available, sets enabled to this value.
|
|
91
|
+
*/
|
|
92
|
+
toggleButtonEnabled(buttonId: ObliqueViewerUi, enabled?: boolean): void;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Get the visibility of a button.
|
|
96
|
+
* @param {ObliqueViewerUi} buttonId - The ID of the button.
|
|
97
|
+
* @returns {Boolean} The visibility state of the button.
|
|
98
|
+
*/
|
|
99
|
+
getButtonEnabled(buttonId: ObliqueViewerUi): boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Enables or disables timetravel in the ObliqueViewer.
|
|
103
|
+
* @param {Boolean} [visible] - If available, value for enabling or disabling toggles time travel.
|
|
104
|
+
*/
|
|
105
|
+
toggleTimeTravelVisible(visible?: boolean): void;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Returns whether timetravel is enabled for the ObliqueViewer.
|
|
109
|
+
* @returns {Boolean} Whether timetravel is enabled.
|
|
110
|
+
*/
|
|
111
|
+
getTimeTravelVisible(): boolean;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Expands or hides the timetravel components.
|
|
115
|
+
* @param {Boolean} [expanded] - If available, value for expanding or hiding time travel.
|
|
116
|
+
*/
|
|
117
|
+
toggleTimeTravelExpanded(expanded?: boolean): void;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Returns whether the timetravel component is visible or hidden.
|
|
121
|
+
* @returns {Boolean} Whether the timetravel component is visible.
|
|
122
|
+
*/
|
|
123
|
+
getTimeTravelExpanded(): boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Toggles the visibility of the compass in the ObliqueViewer.
|
|
127
|
+
* @param {Boolean} [visible] - If available, sets visibility to this value.
|
|
128
|
+
*/
|
|
129
|
+
toggleCompass(visible?: boolean): void;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Set the brightness of the oblique viewer.
|
|
133
|
+
* @param {Number} [value] - Set brightness to a positive number, normally use a value between 50 and 150.
|
|
134
|
+
*/
|
|
135
|
+
setBrightness(value?: number): void;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Set the contrast of the oblique viewer.
|
|
139
|
+
* @param {Number} [value] - Set contrast to a positive number, normally use a value between 50 and 150.
|
|
140
|
+
*/
|
|
141
|
+
setContrast(value?: number): void;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Changes the viewing direction of the oblique viewer.
|
|
145
|
+
* @param {number} deltaDegrees - Change direction (-90, 90, 180).
|
|
146
|
+
*/
|
|
147
|
+
switchViewingDirection(deltaDegrees: number): void;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Zoom in in the Oblique image.
|
|
151
|
+
*/
|
|
152
|
+
zoomIn(): void;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Zoom out in the Oblique image.
|
|
156
|
+
*/
|
|
157
|
+
zoomOut(): void;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Downloads an image of the current oblique image.
|
|
161
|
+
*/
|
|
162
|
+
saveImage(): void;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Returns a base64 string representation of the current canvas.
|
|
166
|
+
* @returns {string|undefined} Base64 string representation of the current canvas.
|
|
167
|
+
*/
|
|
168
|
+
canvasToBase(): string | undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Toggle the visibility of an overlay.
|
|
172
|
+
* @param {Object} layer - The layer to toggle.
|
|
173
|
+
*/
|
|
174
|
+
toggleOverlay(layer: Layer): void;
|
|
175
|
+
|
|
176
|
+
on<T extends ObliqueViewerEvents | SharedViewerEvents>(type: T, callback: ObliqueViewerEventCallback<T>): this;
|
|
177
|
+
|
|
178
|
+
off<T extends ObliqueViewerEvents | SharedViewerEvents>(type: T, callback: ObliqueViewerEventCallback<T>): this;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
/// <reference path="shared.d.ts" />
|
|
2
|
+
declare module '@cyclomedia/streetsmart-api' {
|
|
3
|
+
type RGBA = [r: number, g: number, b: number, alpha: number];
|
|
4
|
+
type Coordinate = [x: number, y: number, z: number];
|
|
5
|
+
|
|
6
|
+
type PanoramaViewerEventCallback<T extends PanoramaViewerEvents | SharedViewerEvents> = (
|
|
7
|
+
event: ViewerEvent<PanoramaViewerEventDetails[T]>,
|
|
8
|
+
) => void;
|
|
9
|
+
|
|
10
|
+
class PanoramaViewer extends React.Component {
|
|
11
|
+
/**
|
|
12
|
+
* Sets cube program of a recording to defaults.
|
|
13
|
+
*/
|
|
14
|
+
resetCubeProgram: () => void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Set the brightness of the panorama viewer.
|
|
18
|
+
* @param {number} [value] - set brightness to a positive number, normally use a value between 50 and 150.
|
|
19
|
+
*/
|
|
20
|
+
setBrightness: (value?: number) => void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Set the contrast of the panorama viewer.
|
|
24
|
+
* @param {number} [value] - set contrast to a positive number, normally use a value between 50 and 150.
|
|
25
|
+
*/
|
|
26
|
+
setContrast: (value?: number) => void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns the type of this viewer.
|
|
30
|
+
* @returns {ViewerType} The type of this viewer.
|
|
31
|
+
*/
|
|
32
|
+
getType: () => ViewerType;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Returns the ID of this viewer.
|
|
36
|
+
* @returns {string} The ID of this viewer.
|
|
37
|
+
* @example
|
|
38
|
+
* // Request the ID of a viewer:
|
|
39
|
+
* StreetSmartApi.open('5D4KX5SM', {
|
|
40
|
+
* viewerType: [StreetSmartApi.ViewerType.PANORAMA],
|
|
41
|
+
* srs: 'EPSG:28992',
|
|
42
|
+
* panoramaViewer: { replace: false, },
|
|
43
|
+
* }).then(
|
|
44
|
+
* function(result) {
|
|
45
|
+
* console.log(StreetSmartApi.getViewers()[0].getId());
|
|
46
|
+
* });
|
|
47
|
+
*/
|
|
48
|
+
getId: () => string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Gets the viewer color.
|
|
52
|
+
* @returns {RGBA} - RGBA representation of the color.
|
|
53
|
+
*/
|
|
54
|
+
getViewerColor: () => RGBA;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns the orientation (yaw, pitch, hFov), in degrees, for this PanoramaViewer.
|
|
58
|
+
* @returns {{yaw: number, pitch: number, hFov: number}}
|
|
59
|
+
*/
|
|
60
|
+
getOrientation: () => { yaw: number; pitch: number; hFov: number };
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Sets the orientation (yaw, pitch, hFov), in degrees, of the PanoramaViewer to specific values all at once.
|
|
64
|
+
* @param {Object} orientation - Object that contains values to change.
|
|
65
|
+
* @param {number} [orientation.yaw] - Optional value of the yaw.
|
|
66
|
+
* @param {number} [orientation.pitch] - Optional value of the pitch.
|
|
67
|
+
* @param {number} [orientation.hFov] - Optional value of the hFov.
|
|
68
|
+
*/
|
|
69
|
+
setOrientation: (orientation?: { yaw?: number; pitch?: number; hFov?: number }) => void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Gets the current active recording of the PanoramaViewer.
|
|
73
|
+
* @returns {Recording}
|
|
74
|
+
*/
|
|
75
|
+
getRecording: () => Recording;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Returns whether the 3D cursor is visible.
|
|
79
|
+
* @returns {boolean}
|
|
80
|
+
*/
|
|
81
|
+
get3DCursorVisible: () => boolean;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns whether recordings are visible.
|
|
85
|
+
* @returns {boolean}
|
|
86
|
+
*/
|
|
87
|
+
getRecordingsVisible: () => boolean;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Returns the visibility state of the navbar.
|
|
91
|
+
* @returns {boolean}
|
|
92
|
+
*/
|
|
93
|
+
getNavbarVisible: () => boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Returns the expanded state of the navbar.
|
|
97
|
+
* @returns {boolean}
|
|
98
|
+
*/
|
|
99
|
+
getNavbarExpanded: () => boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns the visibility state of the sidebar.
|
|
103
|
+
* @returns {boolean}
|
|
104
|
+
*/
|
|
105
|
+
getSidebarVisible: () => boolean;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Returns the enabled state of the sidebar.
|
|
109
|
+
* @returns {boolean}
|
|
110
|
+
*/
|
|
111
|
+
getSidebarEnabled: () => boolean;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Returns the expanded state of the sidebar.
|
|
115
|
+
* @returns {boolean}
|
|
116
|
+
*/
|
|
117
|
+
getSidebarExpanded: () => boolean;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Get the visibility of a button.
|
|
121
|
+
* @param {string} buttonId
|
|
122
|
+
* @returns {boolean}
|
|
123
|
+
*/
|
|
124
|
+
getButtonEnabled: (buttonId: string) => boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Returns whether timetravel is enabled for the PanoramaViewer.
|
|
128
|
+
* @returns {boolean}
|
|
129
|
+
*/
|
|
130
|
+
getTimeTravelVisible: () => boolean;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Returns whether the timetravel component is visible or hidden.
|
|
134
|
+
* @returns {boolean}
|
|
135
|
+
*/
|
|
136
|
+
getTimeTravelExpanded: () => boolean;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Sets the selected feature using the given properties.
|
|
140
|
+
* The selected feature can only be selected if the feature is in sight on the panorama viewer.
|
|
141
|
+
* @param {Object} jsonProperties - The properties by which the feature should be determined.
|
|
142
|
+
* @param {?string} layerId - The layer Id to which the feature is added.
|
|
143
|
+
* @param {string} additionalLayerId - The additional layer Id.
|
|
144
|
+
* @example
|
|
145
|
+
* // Having StreetSmartApi initialized:
|
|
146
|
+
* let viewer = streetSmartApi.addPanoramaViewer(viewerDomElement);
|
|
147
|
+
* var properties = {"MyAttribute1": "MyValue1", "MyAttribute2": "MyValue2"};
|
|
148
|
+
* viewer.setSelectedFeatureByProperties(properties, layerId, additionalLayerId);
|
|
149
|
+
*/
|
|
150
|
+
setSelectedFeatureByProperties: (jsonProperties: any, layerId: string, additionalLayerId: string) => void;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Selected feature style and interaction.
|
|
154
|
+
* @param {Object} feature - The feature object.
|
|
155
|
+
*/
|
|
156
|
+
setFeatureStyle: (feature?: Object) => void;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Opens an image by imageId.
|
|
160
|
+
* @param {string} imageId - ID of the image that needs to be opened. E.g. "5D38RPNF".
|
|
161
|
+
* @param {string} [srs] - Optional, coordinate system in which the panorama will be opened. E.g. "EPSG:28992".
|
|
162
|
+
* @returns {Promise<Recording|Error>} Returns a new promise for the result that may be used to chain additional functions.
|
|
163
|
+
*/
|
|
164
|
+
openByImageId: (imageId: string, srs?: string) => Promise<Recording | Error>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Opens an image by coordinates and accompanying coordinate system.
|
|
168
|
+
* @param {Coordinate} coordinate - Coordinate of location to open a panorama.
|
|
169
|
+
* @param {string} [srs] - If provided, will use to convert coordinate to viewer srs.
|
|
170
|
+
* @returns {Promise<Recording|Error>} Returns a new promise for the result that may be used to chain additional functions.
|
|
171
|
+
*/
|
|
172
|
+
openByCoordinate: (coordinate: Coordinate, srs?: string) => Promise<Recording | Error>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Opens a panorama closest to the given address.
|
|
176
|
+
* @param {string} query - Address you want to search.
|
|
177
|
+
* @param {string} [srs] - Optional, coordinate system in which the panorama will be opened. E.g. "EPSG:28992".
|
|
178
|
+
* @returns {Promise<Recording|Error>} Returns a new promise for the result that may be used to chain additional functions.
|
|
179
|
+
* @example
|
|
180
|
+
* // Having StreetSmartApi initialized:
|
|
181
|
+
* let viewer = streetSmartApi.addPanoramaViewer(viewerDomElement);
|
|
182
|
+
* // Now open the address
|
|
183
|
+
* viewer.openByAddress("Van Voordenpark 1B, Zaltbommel", "EPSG:29882").catch(function(err){ console.log(err.message)});
|
|
184
|
+
*/
|
|
185
|
+
openByAddress: (query: string, srs?: string) => Promise<Recording | Error>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Expands or hides the timetravel components.
|
|
189
|
+
* @param {boolean} [expanded] - If available, value for expanding or hiding time travel.
|
|
190
|
+
*/
|
|
191
|
+
toggleTimeTravelExpanded: (expanded?: boolean) => void;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Enables or disables timetravel in the PanoramaViewer.
|
|
195
|
+
* @param {boolean} [visible] - If available, value for enabling or disabling toggles time travel.
|
|
196
|
+
*/
|
|
197
|
+
toggleTimeTravelVisible: (visible?: boolean) => void;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Sets `turboLoaderActive` in the Panoramaviewer Redux state.
|
|
201
|
+
* If `active` param is true, no overlay http requests will be made in the panoramaviewer or in the mapviewer.
|
|
202
|
+
* @param {boolean} active
|
|
203
|
+
*/
|
|
204
|
+
setSuppressLoading: (active: boolean) => void;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Toggle the visibility of a button.
|
|
208
|
+
* @param {string} buttonId
|
|
209
|
+
* @param {boolean} [enabled] - If available, set enabled to this value.
|
|
210
|
+
*/
|
|
211
|
+
toggleButtonEnabled: (buttonId: string, enabled?: boolean) => void;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Modify the state of navbar expanded in the PanoramaViewer.
|
|
215
|
+
* @param {boolean} [expanded] - If available, sets expanded to this value.
|
|
216
|
+
*/
|
|
217
|
+
toggleNavbarExpanded: (expanded?: boolean) => void;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Toggles the visibility of the navbar in the PanoramaViewer.
|
|
221
|
+
* @param {boolean} [visible] - If available, sets visibility to this value.
|
|
222
|
+
*/
|
|
223
|
+
toggleNavbarVisible: (visible?: boolean) => void;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Modify the state of sidebar expanded in the PanoramaViewer.
|
|
227
|
+
* @param {boolean} [expanded] - If available, sets expanded to this value.
|
|
228
|
+
*/
|
|
229
|
+
toggleSidebarExpanded: (expanded?: boolean) => void;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Toggles the visibility of the sidebar in the PanoramaViewer.
|
|
233
|
+
* @param {boolean} [visible] - If available, sets visibility to this value.
|
|
234
|
+
*/
|
|
235
|
+
toggleSidebarVisible: (visible?: boolean) => void;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Enables/disables the ability to toggle the sidebar in the PanoramaViewer.
|
|
239
|
+
* @param {boolean} [enabled] - If available, sets visibility to this value.
|
|
240
|
+
*/
|
|
241
|
+
toggleSidebarEnabled: (enabled?: boolean) => void;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Toggle the visibility of an overlay.
|
|
245
|
+
* @param {Layer} layer
|
|
246
|
+
*/
|
|
247
|
+
toggleOverlay: (layer: Layer) => void;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Toggles the visibility of the 3D cursor in the PanoramaViewer.
|
|
251
|
+
* @param {boolean} [visible] - If available, sets visibility to this value.
|
|
252
|
+
*/
|
|
253
|
+
toggle3DCursor: (visible?: boolean) => void;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Toggles the visibility of the compass in the PanoramaViewer.
|
|
257
|
+
* @param {boolean} [visible]
|
|
258
|
+
*/
|
|
259
|
+
toggleCompass(visible?: boolean): void;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Toggles the visibility of the Attribute information panel, deciding if it should be shown on clicking on a feature.
|
|
263
|
+
* @param {boolean} [visible]
|
|
264
|
+
*/
|
|
265
|
+
showAttributePanelOnFeatureClick(visible?: boolean): void;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Toggles the visibility of the recording features in the PanoramaViewer.
|
|
269
|
+
* @param {boolean} [visible]
|
|
270
|
+
*/
|
|
271
|
+
toggleRecordingsVisible(visible?: boolean): void;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Toggles the visibility of the Address features in the PanoramaViewer.
|
|
275
|
+
* @param {boolean} [visible]
|
|
276
|
+
*/
|
|
277
|
+
toggleAddressesVisible(visible?: boolean): void;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Sets the orientation of the PanoramaViewer to look at a certain coordinate.
|
|
281
|
+
* @param {Coordinate} coordinate
|
|
282
|
+
* @param {string} [srs]
|
|
283
|
+
*/
|
|
284
|
+
lookAtCoordinate(coordinate: Coordinate, srs?: string): void;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Rotates the panorama horizontally by a certain amount, as if the camera is turning to the left.
|
|
288
|
+
* @param {number} deltaYaw
|
|
289
|
+
*/
|
|
290
|
+
rotateLeft(deltaYaw: number): void;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Rotates the panorama horizontally by a certain amount, as if the camera is turning to the right.
|
|
294
|
+
* @param {number} deltaYaw
|
|
295
|
+
*/
|
|
296
|
+
rotateRight(deltaYaw: number): void;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Rotates the panorama vertically by a certain amount, as if the camera is turning to the sky.
|
|
300
|
+
* @param {number} deltaPitch
|
|
301
|
+
*/
|
|
302
|
+
rotateUp(deltaPitch: number): void;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Rotates the panorama vertically by a certain amount, as if the camera is turning to the ground.
|
|
306
|
+
* @param {number} deltaPitch
|
|
307
|
+
*/
|
|
308
|
+
rotateDown(deltaPitch: number): void;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Returns a base64 string representation of the current canvas.
|
|
312
|
+
* @returns {string | undefined}
|
|
313
|
+
*/
|
|
314
|
+
canvasToBase: () => string | undefined;
|
|
315
|
+
|
|
316
|
+
// Triggers a download request with the image of the current panorama
|
|
317
|
+
saveImage: VoidFunction;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Set the elevation slider level.
|
|
321
|
+
* @param {number} elevationLevel
|
|
322
|
+
*/
|
|
323
|
+
setElevationSliderLevel(elevationLevel: number): void;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Toggle viewers from linked to unlinked and vice versa.
|
|
327
|
+
*/
|
|
328
|
+
toggleLinkedViewers: () => void;
|
|
329
|
+
|
|
330
|
+
on<T extends PanoramaViewerEvents | SharedViewerEvents>(
|
|
331
|
+
type: T,
|
|
332
|
+
callback: PanoramaViewerEventCallback<T>,
|
|
333
|
+
): this;
|
|
334
|
+
|
|
335
|
+
off<T extends PanoramaViewerEvents | SharedViewerEvents>(
|
|
336
|
+
type: T,
|
|
337
|
+
callback: PanoramaViewerEventCallback<T>,
|
|
338
|
+
): this;
|
|
339
|
+
}
|
|
340
|
+
}
|