@panoramax/web-viewer 3.1.1 → 3.2.0-develop-df9e865f
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/CHANGELOG.md +26 -1
- package/build/index.css +2 -2
- package/build/index.css.map +1 -1
- package/build/index.js +6 -6
- package/build/index.js.map +1 -1
- package/docs/02_Usage.md +267 -224
- package/docs/03_URL_settings.md +10 -1
- package/docs/05_Compatibility.md +1 -0
- package/package.json +4 -3
- package/src/Viewer.js +51 -3
- package/src/components/CoreView.css +6 -0
- package/src/components/CoreView.js +25 -10
- package/src/components/Map.js +41 -2
- package/src/components/Photo.css +5 -0
- package/src/translations/de.json +28 -11
- package/src/translations/en.json +22 -11
- package/src/translations/es.json +23 -11
- package/src/translations/fr.json +22 -11
- package/src/translations/hu.json +117 -73
- package/src/translations/nl.json +73 -1
- package/src/translations/zh_Hant.json +53 -9
- package/src/utils/API.js +20 -3
- package/src/utils/Exif.js +5 -10
- package/src/utils/Map.js +56 -10
- package/src/utils/Utils.js +68 -24
- package/src/utils/Widgets.js +64 -2
- package/src/viewer/URLHash.js +18 -3
- package/src/viewer/Widgets.css +139 -0
- package/src/viewer/Widgets.js +207 -42
- package/tests/Viewer.test.js +1 -0
- package/tests/__snapshots__/Editor.test.js.snap +1 -5
- package/tests/components/__snapshots__/Photo.test.js.snap +2 -10
- package/tests/utils/Exif.test.js +10 -10
- package/tests/utils/Map.test.js +8 -0
- package/tests/utils/__snapshots__/API.test.js.snap +5 -0
- package/tests/utils/__snapshots__/Widgets.test.js.snap +1 -1
- package/tests/viewer/__snapshots__/Widgets.test.js.snap +39 -29
package/docs/02_Usage.md
CHANGED
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
* [Editor][4]
|
|
9
9
|
* [StandaloneMap][5]
|
|
10
10
|
* [autoDetectLocale][6]
|
|
11
|
-
* [
|
|
12
|
-
* [
|
|
13
|
-
* [
|
|
11
|
+
* [getGrade][7]
|
|
12
|
+
* [getCookie][8]
|
|
13
|
+
* [getUserAccount][9]
|
|
14
|
+
* [showGrade][10]
|
|
15
|
+
* [showQualityScore][11]
|
|
16
|
+
* [Viewer][12]
|
|
14
17
|
|
|
15
18
|
## CoreView
|
|
16
19
|
|
|
@@ -22,25 +25,25 @@ It is used to prepare API, internationalization, options checks... for Viewer, S
|
|
|
22
25
|
|
|
23
26
|
### Parameters
|
|
24
27
|
|
|
25
|
-
* `container` **([string][
|
|
26
|
-
* `endpoint` **[string][
|
|
27
|
-
* `options` **[object][
|
|
28
|
+
* `container` **([string][13] | [Element][14])** The DOM element to create viewer into
|
|
29
|
+
* `endpoint` **[string][13]** URL to API to use (must be a [STAC API][15])
|
|
30
|
+
* `options` **[object][16]?** View options. (optional, default `{}`)
|
|
28
31
|
|
|
29
|
-
* `options.selectedSequence` **[string][
|
|
30
|
-
* `options.selectedPicture` **[string][
|
|
31
|
-
* `options.fetchOptions` **[object][
|
|
32
|
-
* `options.users` **([string][
|
|
33
|
-
* `options.style` **([string][
|
|
32
|
+
* `options.selectedSequence` **[string][13]?** The ID of sequence to highlight on load (defaults to none)
|
|
33
|
+
* `options.selectedPicture` **[string][13]?** The ID of picture to highlight on load (defaults to none)
|
|
34
|
+
* `options.fetchOptions` **[object][16]** Set custom options for fetch calls made against API ([same syntax as fetch options parameter][17]) (optional, default `null`)
|
|
35
|
+
* `options.users` **([string][13] | [Array][18]<[string][13]>)?** List of user IDs to default use for display. Defaults to all users.
|
|
36
|
+
* `options.style` **([string][13] | [object][16])?** The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification][19], or a URL string pointing to one. Defaults to OSMFR vector tiles.
|
|
34
37
|
|
|
35
38
|
### Properties
|
|
36
39
|
|
|
37
|
-
* `_t` **[object][
|
|
38
|
-
* `_selectedSeqId` **[string][
|
|
39
|
-
* `_selectedPicId` **[string][
|
|
40
|
+
* `_t` **[object][16]** The translations labels
|
|
41
|
+
* `_selectedSeqId` **[string][13]** The selected sequence ID
|
|
42
|
+
* `_selectedPicId` **[string][13]** The selected picture ID
|
|
40
43
|
* `_api` **API** The API handler
|
|
41
44
|
* `_loader` **Loader** The initial loader message
|
|
42
|
-
* `_options` **[object][
|
|
43
|
-
* `container` **[Element][
|
|
45
|
+
* `_options` **[object][16]** The stored options
|
|
46
|
+
* `container` **[Element][14]** The DOM container
|
|
44
47
|
|
|
45
48
|
### getClassName
|
|
46
49
|
|
|
@@ -59,13 +62,13 @@ This is useful for Single Page Applications (SPA), to remove various event liste
|
|
|
59
62
|
|
|
60
63
|
Is the view running in a small container (small embed or smartphone)
|
|
61
64
|
|
|
62
|
-
Returns **[boolean][
|
|
65
|
+
Returns **[boolean][20]** True if container is small
|
|
63
66
|
|
|
64
67
|
### isHeightSmall
|
|
65
68
|
|
|
66
69
|
Is the view running in a small-height container (small embed or smartphone)
|
|
67
70
|
|
|
68
|
-
Returns **[boolean][
|
|
71
|
+
Returns **[boolean][20]** True if container height is small
|
|
69
72
|
|
|
70
73
|
### select
|
|
71
74
|
|
|
@@ -74,24 +77,24 @@ Calling the method without parameters unselects.
|
|
|
74
77
|
|
|
75
78
|
#### Parameters
|
|
76
79
|
|
|
77
|
-
* `seqId` **[string][
|
|
78
|
-
* `picId` **[string][
|
|
79
|
-
* `force` **[boolean][
|
|
80
|
+
* `seqId` **[string][13]?** The sequence UUID (optional, default `null`)
|
|
81
|
+
* `picId` **[string][13]?** The picture UUID (optional, default `null`)
|
|
82
|
+
* `force` **[boolean][20]** Force select even if already selected (optional, default `false`)
|
|
80
83
|
|
|
81
84
|
### select
|
|
82
85
|
|
|
83
86
|
Event for sequence/picture selection
|
|
84
87
|
|
|
85
|
-
Type: [object][
|
|
88
|
+
Type: [object][16]
|
|
86
89
|
|
|
87
90
|
#### Properties
|
|
88
91
|
|
|
89
|
-
* `detail` **[object][
|
|
92
|
+
* `detail` **[object][16]** Event information
|
|
90
93
|
|
|
91
|
-
* `detail.seqId` **[string][
|
|
92
|
-
* `detail.picId` **[string][
|
|
93
|
-
* `detail.prevSeqId` **[string][
|
|
94
|
-
* `detail.prevPicId` **[string][
|
|
94
|
+
* `detail.seqId` **[string][13]** The selected sequence ID
|
|
95
|
+
* `detail.picId` **[string][13]** The selected picture ID (or null if not a precise picture clicked)
|
|
96
|
+
* `detail.prevSeqId` **[string][13]?** The previously selected sequence ID (or null if none)
|
|
97
|
+
* `detail.prevPicId` **[string][13]?** The previously selected picture ID (or null if none)
|
|
95
98
|
|
|
96
99
|
### ready
|
|
97
100
|
|
|
@@ -101,174 +104,174 @@ Event for viewer being ready to use (API loaded)
|
|
|
101
104
|
|
|
102
105
|
Event for viewer failing to initially load
|
|
103
106
|
|
|
104
|
-
Type: [object][
|
|
107
|
+
Type: [object][16]
|
|
105
108
|
|
|
106
109
|
#### Properties
|
|
107
110
|
|
|
108
|
-
* `detail` **[object][
|
|
111
|
+
* `detail` **[object][16]** Event information
|
|
109
112
|
|
|
110
|
-
* `detail.error` **[string][
|
|
113
|
+
* `detail.error` **[string][13]** The user-friendly error message to display
|
|
111
114
|
|
|
112
115
|
### map:background-changed
|
|
113
116
|
|
|
114
117
|
Event for map background changes
|
|
115
118
|
|
|
116
|
-
Type: [object][
|
|
119
|
+
Type: [object][16]
|
|
117
120
|
|
|
118
121
|
#### Properties
|
|
119
122
|
|
|
120
|
-
* `detail` **[object][
|
|
123
|
+
* `detail` **[object][16]** Event information
|
|
121
124
|
|
|
122
|
-
* `detail.background` **[string][
|
|
125
|
+
* `detail.background` **[string][13]?** The new selected background (aerial, streets)
|
|
123
126
|
|
|
124
127
|
### map:users-changed
|
|
125
128
|
|
|
126
129
|
Event for visible users changes
|
|
127
130
|
|
|
128
|
-
Type: [object][
|
|
131
|
+
Type: [object][16]
|
|
129
132
|
|
|
130
133
|
#### Properties
|
|
131
134
|
|
|
132
|
-
* `detail` **[object][
|
|
135
|
+
* `detail` **[object][16]** Event information
|
|
133
136
|
|
|
134
|
-
* `detail.usersIds` **[Array][
|
|
137
|
+
* `detail.usersIds` **[Array][18]<[string][13]>?** The list of newly selected users
|
|
135
138
|
|
|
136
139
|
### map:sequence-hover
|
|
137
140
|
|
|
138
141
|
Event when a sequence on map is hovered (not selected)
|
|
139
142
|
|
|
140
|
-
Type: [object][
|
|
143
|
+
Type: [object][16]
|
|
141
144
|
|
|
142
145
|
#### Properties
|
|
143
146
|
|
|
144
|
-
* `detail` **[object][
|
|
147
|
+
* `detail` **[object][16]** Event information
|
|
145
148
|
|
|
146
|
-
* `detail.seqId` **[string][
|
|
149
|
+
* `detail.seqId` **[string][13]** The hovered sequence ID
|
|
147
150
|
|
|
148
151
|
### map:sequence-click
|
|
149
152
|
|
|
150
153
|
Event when a sequence on map is clicked
|
|
151
154
|
|
|
152
|
-
Type: [object][
|
|
155
|
+
Type: [object][16]
|
|
153
156
|
|
|
154
157
|
#### Properties
|
|
155
158
|
|
|
156
|
-
* `detail` **[object][
|
|
159
|
+
* `detail` **[object][16]** Event information
|
|
157
160
|
|
|
158
|
-
* `detail.seqId` **[string][
|
|
161
|
+
* `detail.seqId` **[string][13]** The clicked sequence ID
|
|
159
162
|
* `detail.coordinates` **maplibregl.LngLat** The coordinates of user click
|
|
160
163
|
|
|
161
164
|
### map:picture-click
|
|
162
165
|
|
|
163
166
|
Event when a picture on map is clicked
|
|
164
167
|
|
|
165
|
-
Type: [object][
|
|
168
|
+
Type: [object][16]
|
|
166
169
|
|
|
167
170
|
#### Properties
|
|
168
171
|
|
|
169
|
-
* `detail` **[object][
|
|
172
|
+
* `detail` **[object][16]** Event information
|
|
170
173
|
|
|
171
|
-
* `detail.picId` **[string][
|
|
172
|
-
* `detail.seqId` **[string][
|
|
173
|
-
* `detail.feature` **[object][
|
|
174
|
+
* `detail.picId` **[string][13]** The clicked picture ID
|
|
175
|
+
* `detail.seqId` **[string][13]** The clicked picture's sequence ID
|
|
176
|
+
* `detail.feature` **[object][16]** The GeoJSON feature of the picture
|
|
174
177
|
|
|
175
178
|
### psv:picture-loading
|
|
176
179
|
|
|
177
180
|
Event for picture starting to load
|
|
178
181
|
|
|
179
|
-
Type: [object][
|
|
182
|
+
Type: [object][16]
|
|
180
183
|
|
|
181
184
|
#### Properties
|
|
182
185
|
|
|
183
|
-
* `detail` **[object][
|
|
186
|
+
* `detail` **[object][16]** Event information
|
|
184
187
|
|
|
185
|
-
* `detail.picId` **[string][
|
|
186
|
-
* `detail.lon` **[number][
|
|
187
|
-
* `detail.lat` **[number][
|
|
188
|
-
* `detail.x` **[number][
|
|
189
|
-
* `detail.y` **[number][
|
|
190
|
-
* `detail.z` **[number][
|
|
188
|
+
* `detail.picId` **[string][13]** The picture unique identifier
|
|
189
|
+
* `detail.lon` **[number][21]** Longitude (WGS84)
|
|
190
|
+
* `detail.lat` **[number][21]** Latitude (WGS84)
|
|
191
|
+
* `detail.x` **[number][21]** New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West)
|
|
192
|
+
* `detail.y` **[number][21]** New y position (in degrees)
|
|
193
|
+
* `detail.z` **[number][21]** New z position (0-100)
|
|
191
194
|
|
|
192
195
|
### psv:picture-preview-started
|
|
193
196
|
|
|
194
197
|
Event for picture preview
|
|
195
198
|
|
|
196
|
-
Type: [object][
|
|
199
|
+
Type: [object][16]
|
|
197
200
|
|
|
198
201
|
#### Properties
|
|
199
202
|
|
|
200
|
-
* `detail` **[object][
|
|
203
|
+
* `detail` **[object][16]** Event information
|
|
201
204
|
|
|
202
|
-
* `detail.picId` **[string][
|
|
203
|
-
* `detail.coordinates` **[Array][
|
|
204
|
-
* `detail.direction` **[number][
|
|
205
|
+
* `detail.picId` **[string][13]** The picture ID
|
|
206
|
+
* `detail.coordinates` **[Array][18]<[number][21]>** \[x,y] coordinates
|
|
207
|
+
* `detail.direction` **[number][21]** The theorical picture orientation
|
|
205
208
|
|
|
206
209
|
### psv:picture-preview-stopped
|
|
207
210
|
|
|
208
211
|
Event for end of picture preview
|
|
209
212
|
|
|
210
|
-
Type: [object][
|
|
213
|
+
Type: [object][16]
|
|
211
214
|
|
|
212
215
|
#### Properties
|
|
213
216
|
|
|
214
|
-
* `detail` **[object][
|
|
217
|
+
* `detail` **[object][16]** Event information
|
|
215
218
|
|
|
216
|
-
* `detail.picId` **[string][
|
|
219
|
+
* `detail.picId` **[string][13]** The picture ID
|
|
217
220
|
|
|
218
221
|
### psv:view-rotated
|
|
219
222
|
|
|
220
223
|
Event for viewer rotation
|
|
221
224
|
|
|
222
|
-
Type: [object][
|
|
225
|
+
Type: [object][16]
|
|
223
226
|
|
|
224
227
|
#### Properties
|
|
225
228
|
|
|
226
|
-
* `detail` **[object][
|
|
229
|
+
* `detail` **[object][16]** Event information
|
|
227
230
|
|
|
228
|
-
* `detail.x` **[number][
|
|
229
|
-
* `detail.y` **[number][
|
|
230
|
-
* `detail.z` **[number][
|
|
231
|
+
* `detail.x` **[number][21]** New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West)
|
|
232
|
+
* `detail.y` **[number][21]** New y position (in degrees)
|
|
233
|
+
* `detail.z` **[number][21]** New Z position (between 0 and 100)
|
|
231
234
|
|
|
232
235
|
### psv:picture-loaded
|
|
233
236
|
|
|
234
237
|
Event for picture load (low-resolution image is loaded)
|
|
235
238
|
|
|
236
|
-
Type: [object][
|
|
239
|
+
Type: [object][16]
|
|
237
240
|
|
|
238
241
|
#### Properties
|
|
239
242
|
|
|
240
|
-
* `detail` **[object][
|
|
243
|
+
* `detail` **[object][16]** Event information
|
|
241
244
|
|
|
242
|
-
* `detail.picId` **[string][
|
|
243
|
-
* `detail.lon` **[number][
|
|
244
|
-
* `detail.lat` **[number][
|
|
245
|
-
* `detail.x` **[number][
|
|
246
|
-
* `detail.y` **[number][
|
|
247
|
-
* `detail.z` **[number][
|
|
245
|
+
* `detail.picId` **[string][13]** The picture unique identifier
|
|
246
|
+
* `detail.lon` **[number][21]** Longitude (WGS84)
|
|
247
|
+
* `detail.lat` **[number][21]** Latitude (WGS84)
|
|
248
|
+
* `detail.x` **[number][21]** New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West)
|
|
249
|
+
* `detail.y` **[number][21]** New y position (in degrees)
|
|
250
|
+
* `detail.z` **[number][21]** New z position (0-100)
|
|
248
251
|
|
|
249
252
|
### psv:picture-tiles-loaded
|
|
250
253
|
|
|
251
254
|
Event launched when all visible tiles of a picture are loaded
|
|
252
255
|
|
|
253
|
-
Type: [object][
|
|
256
|
+
Type: [object][16]
|
|
254
257
|
|
|
255
258
|
#### Properties
|
|
256
259
|
|
|
257
|
-
* `detail` **[object][
|
|
260
|
+
* `detail` **[object][16]** Event information
|
|
258
261
|
|
|
259
|
-
* `detail.picId` **[string][
|
|
262
|
+
* `detail.picId` **[string][13]** The picture unique identifier
|
|
260
263
|
|
|
261
264
|
### psv:transition-duration-changed
|
|
262
265
|
|
|
263
266
|
Event for transition duration change
|
|
264
267
|
|
|
265
|
-
Type: [object][
|
|
268
|
+
Type: [object][16]
|
|
266
269
|
|
|
267
270
|
#### Properties
|
|
268
271
|
|
|
269
|
-
* `detail` **[object][
|
|
272
|
+
* `detail` **[object][16]** Event information
|
|
270
273
|
|
|
271
|
-
* `detail.duration` **[string][
|
|
274
|
+
* `detail.duration` **[string][13]** New duration (in milliseconds)
|
|
272
275
|
|
|
273
276
|
## Map
|
|
274
277
|
|
|
@@ -276,19 +279,19 @@ Type: [object][13]
|
|
|
276
279
|
|
|
277
280
|
Map is the component showing pictures and sequences geolocation.
|
|
278
281
|
|
|
279
|
-
Note that all functions of [MapLibre GL JS class Map][
|
|
282
|
+
Note that all functions of [MapLibre GL JS class Map][22] are also available.
|
|
280
283
|
|
|
281
284
|
### Parameters
|
|
282
285
|
|
|
283
286
|
* `parent` **[CoreView][1]** The parent view
|
|
284
|
-
* `container` **[Element][
|
|
285
|
-
* `options` **[object][
|
|
287
|
+
* `container` **[Element][14]** The DOM element to create into
|
|
288
|
+
* `options` **[object][16]?** The map options (any of [MapLibre GL settings][23] or any supplementary option defined here) (optional, default `{}`)
|
|
286
289
|
|
|
287
|
-
* `options.raster` **[object][
|
|
288
|
-
* `options.background` **[string][
|
|
289
|
-
* `options.geocoder` **[object][
|
|
290
|
+
* `options.raster` **[object][16]?** The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition][24].
|
|
291
|
+
* `options.background` **[string][13]?** Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street.
|
|
292
|
+
* `options.geocoder` **[object][16]?** Optional geocoder settings
|
|
290
293
|
|
|
291
|
-
* `options.geocoder.engine` **[string][
|
|
294
|
+
* `options.geocoder.engine` **[string][13]?** Set the geocoder engine to use (nominatim, ban)
|
|
292
295
|
|
|
293
296
|
### destroy
|
|
294
297
|
|
|
@@ -302,13 +305,13 @@ Force refresh of vector tiles data
|
|
|
302
305
|
|
|
303
306
|
Check if map offers aerial imagery as well as streets rendering.
|
|
304
307
|
|
|
305
|
-
Returns **[boolean][
|
|
308
|
+
Returns **[boolean][20]** True if aerial imagery is available for display
|
|
306
309
|
|
|
307
310
|
### getBackground
|
|
308
311
|
|
|
309
312
|
Get the currently selected map background
|
|
310
313
|
|
|
311
|
-
Returns **[string][
|
|
314
|
+
Returns **[string][13]** aerial or streets
|
|
312
315
|
|
|
313
316
|
### setBackground
|
|
314
317
|
|
|
@@ -316,13 +319,13 @@ Change the shown background in map.
|
|
|
316
319
|
|
|
317
320
|
#### Parameters
|
|
318
321
|
|
|
319
|
-
* `bg` **[string][
|
|
322
|
+
* `bg` **[string][13]** The new background to display (aerial or streets)
|
|
320
323
|
|
|
321
324
|
### getVisibleUsers
|
|
322
325
|
|
|
323
326
|
Get the currently visible users
|
|
324
327
|
|
|
325
|
-
Returns **[Array][
|
|
328
|
+
Returns **[Array][18]<[string][13]>** List of visible users
|
|
326
329
|
|
|
327
330
|
### setVisibleUsers
|
|
328
331
|
|
|
@@ -330,7 +333,7 @@ Make given user layers visible on map, and hide all others (if any)
|
|
|
330
333
|
|
|
331
334
|
#### Parameters
|
|
332
335
|
|
|
333
|
-
* `visibleIds` **([string][
|
|
336
|
+
* `visibleIds` **([string][13] | [Array][18]<[string][13]>)** The user layers IDs to display (optional, default `[]`)
|
|
334
337
|
|
|
335
338
|
### filterUserLayersContent
|
|
336
339
|
|
|
@@ -338,8 +341,8 @@ Filter the visible data content in all visible map layers
|
|
|
338
341
|
|
|
339
342
|
#### Parameters
|
|
340
343
|
|
|
341
|
-
* `dataType` **[string][
|
|
342
|
-
* `filter` **[object][
|
|
344
|
+
* `dataType` **[string][13]** sequences or pictures
|
|
345
|
+
* `filter` **[object][16]** The MapLibre GL filter rule to apply
|
|
343
346
|
|
|
344
347
|
### displayPictureMarker
|
|
345
348
|
|
|
@@ -347,9 +350,9 @@ Shows on map a picture position and heading.
|
|
|
347
350
|
|
|
348
351
|
#### Parameters
|
|
349
352
|
|
|
350
|
-
* `lon` **[number][
|
|
351
|
-
* `lat` **[number][
|
|
352
|
-
* `heading` **[number][
|
|
353
|
+
* `lon` **[number][21]** The longitude
|
|
354
|
+
* `lat` **[number][21]** The latitude
|
|
355
|
+
* `heading` **[number][21]** The heading
|
|
353
356
|
|
|
354
357
|
### reloadLayersStyles
|
|
355
358
|
|
|
@@ -363,22 +366,22 @@ This is useful after a map theme change.
|
|
|
363
366
|
Photo is the component showing a single picture.
|
|
364
367
|
It uses Photo Sphere Viewer as a basis, and pre-configure dialog with STAC API.
|
|
365
368
|
|
|
366
|
-
Note that all functions of [PhotoSphereViewer Viewer class][
|
|
369
|
+
Note that all functions of [PhotoSphereViewer Viewer class][25] are available as well.
|
|
367
370
|
|
|
368
371
|
### Parameters
|
|
369
372
|
|
|
370
373
|
* `parent` **[CoreView][1]** The parent view
|
|
371
|
-
* `container` **[Element][
|
|
372
|
-
* `options` **[object][
|
|
374
|
+
* `container` **[Element][14]** The DOM element to create into
|
|
375
|
+
* `options` **[object][16]?** The viewer options. Can be any of [Photo Sphere Viewer options][26] (optional, default `{}`)
|
|
373
376
|
|
|
374
|
-
* `options.transitionDuration` **[number][
|
|
375
|
-
* `options.shouldGoFast` **[function][
|
|
377
|
+
* `options.transitionDuration` **[number][21]?** The number of milliseconds the transition animation should be.
|
|
378
|
+
* `options.shouldGoFast` **[function][27]?** Function returning a boolean to indicate if we may skip loading HD images.
|
|
376
379
|
|
|
377
380
|
### getPictureMetadata
|
|
378
381
|
|
|
379
382
|
Access currently shown picture metadata
|
|
380
383
|
|
|
381
|
-
Returns **[object][
|
|
384
|
+
Returns **[object][16]** Picture metadata
|
|
382
385
|
|
|
383
386
|
### goToNextPicture
|
|
384
387
|
|
|
@@ -394,22 +397,22 @@ Displays in viewer a picture near to given coordinates
|
|
|
394
397
|
|
|
395
398
|
#### Parameters
|
|
396
399
|
|
|
397
|
-
* `lat` **[number][
|
|
398
|
-
* `lon` **[number][
|
|
400
|
+
* `lat` **[number][21]** Latitude (WGS84)
|
|
401
|
+
* `lon` **[number][21]** Longitude (WGS84)
|
|
399
402
|
|
|
400
|
-
Returns **[Promise][
|
|
403
|
+
Returns **[Promise][28]** Resolves on picture ID if picture found, otherwise rejects
|
|
401
404
|
|
|
402
405
|
### getXY
|
|
403
406
|
|
|
404
407
|
Get 2D position of sphere currently shown to user
|
|
405
408
|
|
|
406
|
-
Returns **[object][
|
|
409
|
+
Returns **[object][16]** Position in format { x: heading in degrees (0° = North, 90° = East, 180° = South, 270° = West), y: top/bottom position in degrees (-90° = bottom, 0° = front, 90° = top) }
|
|
407
410
|
|
|
408
411
|
### getXYZ
|
|
409
412
|
|
|
410
413
|
Get 3D position of sphere currently shown to user
|
|
411
414
|
|
|
412
|
-
Returns **[object][
|
|
415
|
+
Returns **[object][16]** Position in format { x: heading in degrees (0° = North, 90° = East, 180° = South, 270° = West), y: top/bottom position in degrees (-90° = bottom, 0° = front, 90° = top), z: zoom (0 = wide, 100 = zoomed in) }
|
|
413
416
|
|
|
414
417
|
### getPictureOriginalHeading
|
|
415
418
|
|
|
@@ -435,9 +438,9 @@ Change the shown position in picture
|
|
|
435
438
|
|
|
436
439
|
#### Parameters
|
|
437
440
|
|
|
438
|
-
* `x` **[number][
|
|
439
|
-
* `y` **[number][
|
|
440
|
-
* `z` **[number][
|
|
441
|
+
* `x` **[number][21]** X position (in degrees)
|
|
442
|
+
* `y` **[number][21]** Y position (in degrees)
|
|
443
|
+
* `z` **[number][21]** Z position (0-100)
|
|
441
444
|
|
|
442
445
|
### setHigherContrast
|
|
443
446
|
|
|
@@ -445,13 +448,13 @@ Enable or disable higher contrast on picture
|
|
|
445
448
|
|
|
446
449
|
#### Parameters
|
|
447
450
|
|
|
448
|
-
* `enable` **[boolean][
|
|
451
|
+
* `enable` **[boolean][20]** True to enable higher contrast
|
|
449
452
|
|
|
450
453
|
### getTransitionDuration
|
|
451
454
|
|
|
452
455
|
Get the duration of stay on a picture during a sequence play.
|
|
453
456
|
|
|
454
|
-
Returns **[number][
|
|
457
|
+
Returns **[number][21]** The duration (in milliseconds)
|
|
455
458
|
|
|
456
459
|
### setTransitionDuration
|
|
457
460
|
|
|
@@ -459,7 +462,7 @@ Changes the duration of stay on a picture during a sequence play.
|
|
|
459
462
|
|
|
460
463
|
#### Parameters
|
|
461
464
|
|
|
462
|
-
* `value` **[number][
|
|
465
|
+
* `value` **[number][21]** The new duration (in milliseconds, between 100 and 3000)
|
|
463
466
|
|
|
464
467
|
### showErrorOverlay
|
|
465
468
|
|
|
@@ -467,9 +470,9 @@ Display an error message to user on screen
|
|
|
467
470
|
|
|
468
471
|
#### Parameters
|
|
469
472
|
|
|
470
|
-
* `e` **[object][
|
|
473
|
+
* `e` **[object][16]** The initial error
|
|
471
474
|
* `label` **str** The main error label to display
|
|
472
|
-
* `dissmisable` **[boolean][
|
|
475
|
+
* `dissmisable` **[boolean][20]** Is error dissmisable
|
|
473
476
|
|
|
474
477
|
## Editor
|
|
475
478
|
|
|
@@ -478,20 +481,20 @@ Display an error message to user on screen
|
|
|
478
481
|
Editor allows to focus on a single sequence, and preview what you edits would look like.
|
|
479
482
|
It shows both picture and map.
|
|
480
483
|
|
|
481
|
-
Note that you can use any of the [CoreView][
|
|
484
|
+
Note that you can use any of the [CoreView][29] class functions as well.
|
|
482
485
|
|
|
483
486
|
### Parameters
|
|
484
487
|
|
|
485
|
-
* `container` **([string][
|
|
486
|
-
* `endpoint` **[string][
|
|
487
|
-
* `options` **[object][
|
|
488
|
+
* `container` **([string][13] | [Element][14])** The DOM element to create viewer into
|
|
489
|
+
* `endpoint` **[string][13]** URL to API to use (must be a [STAC API][15])
|
|
490
|
+
* `options` **[object][16]?** View options. (optional, default `{}`)
|
|
488
491
|
|
|
489
|
-
* `options.selectedSequence` **[string][
|
|
490
|
-
* `options.selectedPicture` **[string][
|
|
491
|
-
* `options.fetchOptions` **[object][
|
|
492
|
-
* `options.raster` **[object][
|
|
493
|
-
* `options.background` **[string][
|
|
494
|
-
* `options.style` **([string][
|
|
492
|
+
* `options.selectedSequence` **[string][13]** The ID of sequence to highlight on load. Must be always defined.
|
|
493
|
+
* `options.selectedPicture` **[string][13]?** The ID of picture to highlight on load (defaults to none)
|
|
494
|
+
* `options.fetchOptions` **[object][16]** Set custom options for fetch calls made against API ([same syntax as fetch options parameter][17]) (optional, default `null`)
|
|
495
|
+
* `options.raster` **[object][16]?** The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition][24].
|
|
496
|
+
* `options.background` **[string][13]?** Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street.
|
|
497
|
+
* `options.style` **([string][13] | [object][16])?** The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification][19], or a URL string pointing to one.
|
|
495
498
|
|
|
496
499
|
### Properties
|
|
497
500
|
|
|
@@ -505,7 +508,7 @@ This doesn't change anything on API-side, it's just a preview.
|
|
|
505
508
|
|
|
506
509
|
#### Parameters
|
|
507
510
|
|
|
508
|
-
* `relHeading` **[number][
|
|
511
|
+
* `relHeading` **[number][21]?** The new relative heading compared to sequence path. In degrees, between -180 and 180 (0 = front, -90 = left, 90 = right). Set to null to remove preview.
|
|
509
512
|
|
|
510
513
|
## StandaloneMap
|
|
511
514
|
|
|
@@ -514,24 +517,24 @@ This doesn't change anything on API-side, it's just a preview.
|
|
|
514
517
|
The standalone map viewer allows to see STAC pictures data as a map.
|
|
515
518
|
It only embeds a map (no 360° pictures viewer) with a minimal picture preview (thumbnail).
|
|
516
519
|
|
|
517
|
-
Note that you can use any of the [CoreView][
|
|
520
|
+
Note that you can use any of the [CoreView][29] class functions as well.
|
|
518
521
|
|
|
519
522
|
### Parameters
|
|
520
523
|
|
|
521
|
-
* `container` **([string][
|
|
522
|
-
* `endpoint` **[string][
|
|
523
|
-
* `options` **[object][
|
|
524
|
+
* `container` **([string][13] | [Element][14])** The DOM element to create viewer into
|
|
525
|
+
* `endpoint` **[string][13]** URL to API to use (must be a [STAC API][15])
|
|
526
|
+
* `options` **[object][16]?** Map options. Various settings can be passed, either the ones defined here, or any of [MapLibre GL settings][23]. (optional, default `{}`)
|
|
524
527
|
|
|
525
|
-
* `options.selectedSequence` **[string][
|
|
526
|
-
* `options.selectedPicture` **[string][
|
|
527
|
-
* `options.fetchOptions` **[object][
|
|
528
|
-
* `options.minZoom` **[number][
|
|
529
|
-
* `options.maxZoom` **[number][
|
|
530
|
-
* `options.style` **([string][
|
|
528
|
+
* `options.selectedSequence` **[string][13]?** The ID of sequence to highlight on load (defaults to none)
|
|
529
|
+
* `options.selectedPicture` **[string][13]?** The ID of picture to highlight on load (defaults to none)
|
|
530
|
+
* `options.fetchOptions` **[object][16]** Set custom options for fetch calls made against API ([same syntax as fetch options parameter][17]) (optional, default `null`)
|
|
531
|
+
* `options.minZoom` **[number][21]** The minimum zoom level of the map (0-24). (optional, default `0`)
|
|
532
|
+
* `options.maxZoom` **[number][21]** The maximum zoom level of the map (0-24). (optional, default `24`)
|
|
533
|
+
* `options.style` **([string][13] | [object][16])?** The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification][19], or a URL string pointing to one.
|
|
531
534
|
* `options.center` **external:maplibre-gl.LngLatLike** The initial geographical centerpoint of the map. If `center` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `[0, 0]` Note: MapLibre GL uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON. (optional, default `[0,0]`)
|
|
532
|
-
* `options.zoom` **[number][
|
|
535
|
+
* `options.zoom` **[number][21]** The initial zoom level of the map. If `zoom` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`. (optional, default `0`)
|
|
533
536
|
* `options.bounds` **external:maplibre-gl.LngLatBoundsLike?** The initial bounds of the map. If `bounds` is specified, it overrides `center` and `zoom` constructor options.
|
|
534
|
-
* `options.users` **[Array][
|
|
537
|
+
* `options.users` **[Array][18]<[string][13]>?** The IDs of users whom data should appear on map (defaults to all)
|
|
535
538
|
|
|
536
539
|
### Properties
|
|
537
540
|
|
|
@@ -549,11 +552,22 @@ Find best matching language regarding of list of supported languages and browser
|
|
|
549
552
|
|
|
550
553
|
### Parameters
|
|
551
554
|
|
|
552
|
-
* `supportedTranslations` **[Array][
|
|
555
|
+
* `supportedTranslations` **[Array][18]\<str>** List of supported languages
|
|
553
556
|
* `fallback` **str** The fallback language
|
|
554
557
|
|
|
555
558
|
Returns **any** The best matching language
|
|
556
559
|
|
|
560
|
+
## getGrade
|
|
561
|
+
|
|
562
|
+
Find the grade associated to an input Quality Score definition.
|
|
563
|
+
|
|
564
|
+
### Parameters
|
|
565
|
+
|
|
566
|
+
* `ranges` **[Array][18]<[number][21]>** The QUALITYSCORE\_\*\_VALUES definition
|
|
567
|
+
* `value` **[number][21]** The picture value
|
|
568
|
+
|
|
569
|
+
Returns **[number][21]** The corresponding grade (1 to 5, or null if missing)
|
|
570
|
+
|
|
557
571
|
## getCookie
|
|
558
572
|
|
|
559
573
|
Get a cookie value
|
|
@@ -568,7 +582,28 @@ Returns **str** The cookie value, or null if not found
|
|
|
568
582
|
|
|
569
583
|
Checks if an user account exists
|
|
570
584
|
|
|
571
|
-
Returns **[object][
|
|
585
|
+
Returns **[object][16]** Object like {"id", "name"} or null if no authenticated account
|
|
586
|
+
|
|
587
|
+
## showGrade
|
|
588
|
+
|
|
589
|
+
Show a grade in a nice, user-friendly way
|
|
590
|
+
|
|
591
|
+
### Parameters
|
|
592
|
+
|
|
593
|
+
* `grade` **[number][21]** The obtained grade
|
|
594
|
+
* `t`  
|
|
595
|
+
|
|
596
|
+
Returns **[string][13]** Nice to display grade display
|
|
597
|
+
|
|
598
|
+
## showQualityScore
|
|
599
|
+
|
|
600
|
+
Displays a nice QualityScore
|
|
601
|
+
|
|
602
|
+
### Parameters
|
|
603
|
+
|
|
604
|
+
* `grade` **[number][21]** The 1 to 5 grade
|
|
605
|
+
|
|
606
|
+
Returns **[Element][14]** The HTML code for showing the grade
|
|
572
607
|
|
|
573
608
|
## Viewer
|
|
574
609
|
|
|
@@ -576,43 +611,43 @@ Returns **[object][13]** Object like {"id", "name"} or null if no authenticated
|
|
|
576
611
|
|
|
577
612
|
Viewer is the main component of Panoramax JS library, showing pictures and map.
|
|
578
613
|
|
|
579
|
-
Note that you can use any of the [CoreView][
|
|
614
|
+
Note that you can use any of the [CoreView][29] class functions as well.
|
|
580
615
|
|
|
581
616
|
### Parameters
|
|
582
617
|
|
|
583
|
-
* `container` **([string][
|
|
584
|
-
* `endpoint` **[string][
|
|
585
|
-
* `options` **[object][
|
|
618
|
+
* `container` **([string][13] | [Element][14])** The DOM element to create viewer into
|
|
619
|
+
* `endpoint` **[string][13]** URL to API to use (must be a [STAC API][15])
|
|
620
|
+
* `options` **[object][16]?** Viewer options (optional, default `{}`)
|
|
586
621
|
|
|
587
|
-
* `options.selectedPicture` **[string][
|
|
588
|
-
* `options.position` **[Array][
|
|
589
|
-
* `options.hash` **[boolean][
|
|
590
|
-
* `options.lang` **[string][
|
|
622
|
+
* `options.selectedPicture` **[string][13]?** Initial picture identifier to display
|
|
623
|
+
* `options.position` **[Array][18]<[number][21]>?** Initial position to go to (in \[lat, lon] format)
|
|
624
|
+
* `options.hash` **[boolean][20]** Enable URL hash settings (optional, default `true`)
|
|
625
|
+
* `options.lang` **[string][13]?** Override language to use (defaults to navigator language, or English if translation not available)
|
|
591
626
|
* `options.transition` **int** Duration of stay on a picture during sequence play (excludes loading time) (optional, default `250`)
|
|
592
|
-
* `options.fetchOptions` **[object][
|
|
593
|
-
* `options.users` **([string][
|
|
594
|
-
* `options.picturesNavigation` **[string][
|
|
595
|
-
* `options.map` **([boolean][
|
|
596
|
-
|
|
597
|
-
* `options.map.startWide` **[boolean][
|
|
598
|
-
* `options.map.minZoom` **[number][
|
|
599
|
-
* `options.map.maxZoom` **[number][
|
|
600
|
-
* `options.map.raster` **[object][
|
|
627
|
+
* `options.fetchOptions` **[object][16]** Set custom options for fetch calls made against API ([same syntax as fetch options parameter][17]) (optional, default `null`)
|
|
628
|
+
* `options.users` **([string][13] | [Array][18]<[string][13]>)?** The IDs of users whom data should appear on map (defaults to all). Only works with API having a "user-xyz" or "user-xyz-style" endpoint.
|
|
629
|
+
* `options.picturesNavigation` **[string][13]?** The allowed navigation between pictures ("any": no restriction (default), "seq": only pictures in same sequence, "pic": only selected picture)
|
|
630
|
+
* `options.map` **([boolean][20] | [object][16])** Enable contextual map for locating pictures. Setting to true or passing an object enables the map. Various settings can be passed, either the ones defined here, or any of [MapLibre GL settings][23] (optional, default `false`)
|
|
631
|
+
|
|
632
|
+
* `options.map.startWide` **[boolean][20]?** Show the map as main element at startup (defaults to false, viewer is wider at start)
|
|
633
|
+
* `options.map.minZoom` **[number][21]** The minimum zoom level of the map (0-24). (optional, default `0`)
|
|
634
|
+
* `options.map.maxZoom` **[number][21]** The maximum zoom level of the map (0-24). (optional, default `24`)
|
|
635
|
+
* `options.map.raster` **[object][16]?** The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition][24].
|
|
601
636
|
* `options.map.center` **external:maplibre-gl.LngLatLike** The initial geographical centerpoint of the map. If `center` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `[0, 0]` Note: MapLibre GL uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON. (optional, default `[0,0]`)
|
|
602
|
-
* `options.map.zoom` **[number][
|
|
637
|
+
* `options.map.zoom` **[number][21]** The initial zoom level of the map. If `zoom` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`. (optional, default `0`)
|
|
603
638
|
* `options.map.bounds` **external:maplibre-gl.LngLatBoundsLike?** The initial bounds of the map. If `bounds` is specified, it overrides `center` and `zoom` constructor options.
|
|
604
|
-
* `options.map.geocoder` **[object][
|
|
639
|
+
* `options.map.geocoder` **[object][16]?** Optional geocoder settings
|
|
605
640
|
|
|
606
|
-
* `options.map.geocoder.engine` **[string][
|
|
607
|
-
* `options.map.background` **[string][
|
|
608
|
-
* `options.map.theme` **[string][
|
|
609
|
-
* `options.style` **([string][
|
|
610
|
-
* `options.widgets` **[object][
|
|
641
|
+
* `options.map.geocoder.engine` **[string][13]?** Set the geocoder engine to use (nominatim, ban)
|
|
642
|
+
* `options.map.background` **[string][13]?** Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street.
|
|
643
|
+
* `options.map.theme` **[string][13]** The colouring scheme to use for pictures and sequences on map (default, age, type) (optional, default `default`)
|
|
644
|
+
* `options.style` **([string][13] | [object][16])?** The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification][19], or a URL string pointing to one.
|
|
645
|
+
* `options.widgets` **[object][16]?** Settings related to viewer buttons and widgets
|
|
611
646
|
|
|
612
|
-
* `options.widgets.editIdUrl` **[string][
|
|
613
|
-
* `options.widgets.customWidget` **([string][
|
|
614
|
-
* `options.widgets.mapAttribution` **[string][
|
|
615
|
-
* `options.widgets.iframeBaseURL` **[string][
|
|
647
|
+
* `options.widgets.editIdUrl` **[string][13]?** URL to the OpenStreetMap iD editor (defaults to OSM.org iD instance)
|
|
648
|
+
* `options.widgets.customWidget` **([string][13] | [Element][14])?** A user-defined widget to add (will be shown over "Share" button)
|
|
649
|
+
* `options.widgets.mapAttribution` **[string][13]?** Override the default map attribution (read from MapLibre style)
|
|
650
|
+
* `options.widgets.iframeBaseURL` **[string][13]?** Set a custom base URL for the "Share as iframe" menu (defaults to current page)
|
|
616
651
|
|
|
617
652
|
### Properties
|
|
618
653
|
|
|
@@ -635,8 +670,8 @@ Change full-page popup visibility and content
|
|
|
635
670
|
|
|
636
671
|
#### Parameters
|
|
637
672
|
|
|
638
|
-
* `visible` **[boolean][
|
|
639
|
-
* `content` **([string][
|
|
673
|
+
* `visible` **[boolean][20]** True to make it appear
|
|
674
|
+
* `content` **([string][13] | [Array][18]<[Element][14]>)?** The new popup content (optional, default `null`)
|
|
640
675
|
|
|
641
676
|
### playSequence
|
|
642
677
|
|
|
@@ -650,7 +685,7 @@ Stops playing current sequence
|
|
|
650
685
|
|
|
651
686
|
Is there any sequence being played right now ?
|
|
652
687
|
|
|
653
|
-
Returns **[boolean][
|
|
688
|
+
Returns **[boolean][20]** True if sequence is playing
|
|
654
689
|
|
|
655
690
|
### toggleSequencePlaying
|
|
656
691
|
|
|
@@ -682,13 +717,13 @@ Moves the view of main component slightly to the bottom.
|
|
|
682
717
|
|
|
683
718
|
Is the map shown as main element instead of viewer (wide map mode) ?
|
|
684
719
|
|
|
685
|
-
Returns **[boolean][
|
|
720
|
+
Returns **[boolean][20]** True if map is wider than viewer
|
|
686
721
|
|
|
687
722
|
### getPicturesNavigation
|
|
688
723
|
|
|
689
724
|
Get current pictures navigation mode.
|
|
690
725
|
|
|
691
|
-
Returns **[string][
|
|
726
|
+
Returns **[string][13]** The picture navigation mode ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture)
|
|
692
727
|
|
|
693
728
|
### setPicturesNavigation
|
|
694
729
|
|
|
@@ -696,17 +731,17 @@ Switch the allowed navigation between pictures.
|
|
|
696
731
|
|
|
697
732
|
#### Parameters
|
|
698
733
|
|
|
699
|
-
* `pn` **[string][
|
|
734
|
+
* `pn` **[string][13]** The picture navigation mode ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture)
|
|
700
735
|
|
|
701
736
|
### toggleJOSMLive
|
|
702
737
|
|
|
703
|
-
Enable or disable JOSM live editing using [Remote][
|
|
738
|
+
Enable or disable JOSM live editing using [Remote][30]
|
|
704
739
|
|
|
705
740
|
#### Parameters
|
|
706
741
|
|
|
707
|
-
* `enabled` **[boolean][
|
|
742
|
+
* `enabled` **[boolean][20]** Set to true to enable JOSM live
|
|
708
743
|
|
|
709
|
-
Returns **[Promise][
|
|
744
|
+
Returns **[Promise][28]** Resolves on JOSM live being enabled or disabled
|
|
710
745
|
|
|
711
746
|
### setFocus
|
|
712
747
|
|
|
@@ -714,8 +749,8 @@ Change the viewer focus (either on picture or map)
|
|
|
714
749
|
|
|
715
750
|
#### Parameters
|
|
716
751
|
|
|
717
|
-
* `focus` **[string][
|
|
718
|
-
* `skipEvent` **[boolean][
|
|
752
|
+
* `focus` **[string][13]** The object to focus on (map, pic)
|
|
753
|
+
* `skipEvent` **[boolean][20]** True to not send focus-changed event (optional, default `false`)
|
|
719
754
|
|
|
720
755
|
### toggleFocus
|
|
721
756
|
|
|
@@ -727,7 +762,7 @@ Change the visibility of reduced component (picture or map)
|
|
|
727
762
|
|
|
728
763
|
#### Parameters
|
|
729
764
|
|
|
730
|
-
* `visible` **[boolean][
|
|
765
|
+
* `visible` **[boolean][20]** True to make reduced component visible
|
|
731
766
|
|
|
732
767
|
### toggleUnfocusedVisible
|
|
733
768
|
|
|
@@ -739,14 +774,15 @@ Change the map filters
|
|
|
739
774
|
|
|
740
775
|
#### Parameters
|
|
741
776
|
|
|
742
|
-
* `filters` **[object][
|
|
777
|
+
* `filters` **[object][16]** Filtering values
|
|
743
778
|
|
|
744
|
-
* `filters.minDate` **[string][
|
|
745
|
-
* `filters.maxDate` **[string][
|
|
746
|
-
* `filters.type` **[string][
|
|
747
|
-
* `filters.camera` **[string][
|
|
748
|
-
* `filters.theme` **[string][
|
|
749
|
-
* `
|
|
779
|
+
* `filters.minDate` **[string][13]?** Start date for pictures (format YYYY-MM-DD)
|
|
780
|
+
* `filters.maxDate` **[string][13]?** End date for pictures (format YYYY-MM-DD)
|
|
781
|
+
* `filters.type` **[string][13]?** Type of picture to keep (flat, equirectangular)
|
|
782
|
+
* `filters.camera` **[string][13]?** Camera make and model to keep
|
|
783
|
+
* `filters.theme` **[string][13]?** Map theme to use
|
|
784
|
+
* `filters.qualityscore` **[Array][18]<[number][21]>?** QualityScore values, as a list of 1 to 5 grades
|
|
785
|
+
* `skipZoomIn` **[boolean][20]** If true, doesn't force zoom in to map level >= 7 (optional, default `false`)
|
|
750
786
|
|
|
751
787
|
### sequence-playing
|
|
752
788
|
|
|
@@ -760,13 +796,13 @@ Event for sequence stopped playing
|
|
|
760
796
|
|
|
761
797
|
Event for pictures navigation mode change
|
|
762
798
|
|
|
763
|
-
Type: [object][
|
|
799
|
+
Type: [object][16]
|
|
764
800
|
|
|
765
801
|
#### Properties
|
|
766
802
|
|
|
767
|
-
* `detail` **[object][
|
|
803
|
+
* `detail` **[object][16]** Event information
|
|
768
804
|
|
|
769
|
-
* `detail.value` **[string][
|
|
805
|
+
* `detail.value` **[string][13]** New mode (any, pic, seq)
|
|
770
806
|
|
|
771
807
|
### josm-live-enabled
|
|
772
808
|
|
|
@@ -780,29 +816,30 @@ Event for JOSM live disabled
|
|
|
780
816
|
|
|
781
817
|
Event for focus change (either map or picture is shown wide)
|
|
782
818
|
|
|
783
|
-
Type: [object][
|
|
819
|
+
Type: [object][16]
|
|
784
820
|
|
|
785
821
|
#### Properties
|
|
786
822
|
|
|
787
|
-
* `detail` **[object][
|
|
823
|
+
* `detail` **[object][16]** Event information
|
|
788
824
|
|
|
789
|
-
* `detail.focus` **[string][
|
|
825
|
+
* `detail.focus` **[string][13]** Component now focused on (map, pic)
|
|
790
826
|
|
|
791
827
|
### filters-changed
|
|
792
828
|
|
|
793
829
|
Event for filters changes
|
|
794
830
|
|
|
795
|
-
Type: [object][
|
|
831
|
+
Type: [object][16]
|
|
796
832
|
|
|
797
833
|
#### Properties
|
|
798
834
|
|
|
799
|
-
* `detail` **[object][
|
|
835
|
+
* `detail` **[object][16]** Event information
|
|
800
836
|
|
|
801
|
-
* `detail.minDate` **[string][
|
|
802
|
-
* `detail.maxDate` **[string][
|
|
803
|
-
* `detail.type` **[string][
|
|
804
|
-
* `detail.camera` **[string][
|
|
805
|
-
* `detail.theme` **[string][
|
|
837
|
+
* `detail.minDate` **[string][13]?** The minimum date in time range (ISO format)
|
|
838
|
+
* `detail.maxDate` **[string][13]?** The maximum date in time range (ISO format)
|
|
839
|
+
* `detail.type` **[string][13]?** Camera type (equirectangular, flat, null/empty string for both)
|
|
840
|
+
* `detail.camera` **[string][13]?** Camera make and model
|
|
841
|
+
* `detail.theme` **[string][13]?** Map theme
|
|
842
|
+
* `detail.qualityscore` **[Array][18]<[number][21]>?** QualityScore values, as a list of 1 to 5 grades
|
|
806
843
|
|
|
807
844
|
[1]: #coreview
|
|
808
845
|
|
|
@@ -816,44 +853,50 @@ Type: [object][13]
|
|
|
816
853
|
|
|
817
854
|
[6]: #autodetectlocale
|
|
818
855
|
|
|
819
|
-
[7]: #
|
|
856
|
+
[7]: #getgrade
|
|
857
|
+
|
|
858
|
+
[8]: #getcookie
|
|
859
|
+
|
|
860
|
+
[9]: #getuseraccount
|
|
861
|
+
|
|
862
|
+
[10]: #showgrade
|
|
820
863
|
|
|
821
|
-
[
|
|
864
|
+
[11]: #showqualityscore
|
|
822
865
|
|
|
823
|
-
[
|
|
866
|
+
[12]: #viewer
|
|
824
867
|
|
|
825
|
-
[
|
|
868
|
+
[13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
826
869
|
|
|
827
|
-
[
|
|
870
|
+
[14]: https://developer.mozilla.org/docs/Web/API/Element
|
|
828
871
|
|
|
829
|
-
[
|
|
872
|
+
[15]: https://github.com/radiantearth/stac-api-spec/blob/main/overview.md
|
|
830
873
|
|
|
831
|
-
[
|
|
874
|
+
[16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
832
875
|
|
|
833
|
-
[
|
|
876
|
+
[17]: https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters
|
|
834
877
|
|
|
835
|
-
[
|
|
878
|
+
[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
836
879
|
|
|
837
|
-
[
|
|
880
|
+
[19]: https://maplibre.org/maplibre-gl-js-docs/style-spec/
|
|
838
881
|
|
|
839
|
-
[
|
|
882
|
+
[20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
840
883
|
|
|
841
|
-
[
|
|
884
|
+
[21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
842
885
|
|
|
843
|
-
[
|
|
886
|
+
[22]: https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/
|
|
844
887
|
|
|
845
|
-
[
|
|
888
|
+
[23]: https://maplibre.org/maplibre-gl-js-docs/api/map/#map-parameters
|
|
846
889
|
|
|
847
|
-
[
|
|
890
|
+
[24]: https://maplibre.org/maplibre-style-spec/sources/#raster
|
|
848
891
|
|
|
849
|
-
[
|
|
892
|
+
[25]: https://photo-sphere-viewer.js.org/api/classes/core.viewer
|
|
850
893
|
|
|
851
|
-
[
|
|
894
|
+
[26]: https://photo-sphere-viewer.js.org/guide/config.html#standard-options
|
|
852
895
|
|
|
853
|
-
[
|
|
896
|
+
[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
|
|
854
897
|
|
|
855
|
-
[
|
|
898
|
+
[28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
856
899
|
|
|
857
|
-
[
|
|
900
|
+
[29]: #CoreView
|
|
858
901
|
|
|
859
|
-
[
|
|
902
|
+
[30]: https://josm.openstreetmap.de/wiki/Help/RemoteControlCommands
|