@panoramax/web-viewer 3.2.3-develop-d7e5a16d → 3.2.3-develop-6257391e
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/.gitlab-ci.yml +3 -0
- package/CHANGELOG.md +19 -0
- package/CODE_OF_CONDUCT.md +1 -1
- package/README.md +1 -1
- package/build/editor.html +10 -1
- package/build/index.css +2 -2
- package/build/index.css.map +1 -1
- package/build/index.html +1 -1
- package/build/index.js +1682 -5
- package/build/index.js.map +1 -1
- package/build/map.html +1 -1
- package/build/viewer.html +10 -1
- package/build/widgets.html +1 -0
- package/config/jest/mocks.js +172 -0
- package/config/paths.js +1 -0
- package/config/webpack.config.js +26 -0
- package/docs/03_URL_settings.md +3 -11
- package/docs/05_Compatibility.md +59 -76
- package/docs/09_Develop.md +30 -11
- package/docs/90_Releases.md +2 -2
- package/docs/images/class_diagram.drawio +28 -28
- package/docs/images/class_diagram.jpg +0 -0
- package/docs/index.md +112 -0
- package/docs/reference/components/core/Basic.md +153 -0
- package/docs/reference/components/core/CoverageMap.md +160 -0
- package/docs/reference/components/core/Editor.md +172 -0
- package/docs/reference/components/core/Viewer.md +288 -0
- package/docs/reference/components/layout/CorneredGrid.md +29 -0
- package/docs/reference/components/layout/Mini.md +45 -0
- package/docs/reference/components/menus/MapBackground.md +32 -0
- package/docs/reference/components/menus/MapFilters.md +15 -0
- package/docs/reference/components/menus/MapLayers.md +15 -0
- package/docs/reference/components/menus/MapLegend.md +15 -0
- package/docs/reference/components/menus/PictureLegend.md +15 -0
- package/docs/reference/components/menus/PictureMetadata.md +15 -0
- package/docs/reference/components/menus/PlayerOptions.md +15 -0
- package/docs/reference/components/menus/QualityScoreDoc.md +15 -0
- package/docs/reference/components/menus/ReportForm.md +15 -0
- package/docs/reference/components/menus/ShareMenu.md +15 -0
- package/docs/reference/components/ui/Button.md +39 -0
- package/docs/reference/components/ui/ButtonGroup.md +36 -0
- package/docs/reference/components/ui/CopyButton.md +35 -0
- package/docs/reference/components/ui/Grade.md +32 -0
- package/docs/reference/components/ui/LinkButton.md +44 -0
- package/docs/reference/components/ui/Loader.md +54 -0
- package/docs/reference/components/ui/Map.md +214 -0
- package/docs/reference/components/ui/MapMore.md +233 -0
- package/docs/reference/components/ui/Photo.md +369 -0
- package/docs/reference/components/ui/Popup.md +56 -0
- package/docs/reference/components/ui/QualityScore.md +45 -0
- package/docs/reference/components/ui/SearchBar.md +63 -0
- package/docs/reference/components/ui/TogglableGroup.md +39 -0
- package/docs/reference/components/ui/widgets/GeoSearch.md +32 -0
- package/docs/reference/components/ui/widgets/Legend.md +32 -0
- package/docs/reference/components/ui/widgets/MapFiltersButton.md +33 -0
- package/docs/reference/components/ui/widgets/MapLayersButton.md +15 -0
- package/docs/reference/components/ui/widgets/Player.md +32 -0
- package/docs/reference/components/ui/widgets/Share.md +15 -0
- package/docs/reference/components/ui/widgets/Zoom.md +15 -0
- package/docs/reference/utils/API.md +311 -0
- package/docs/reference/utils/InitParameters.md +67 -0
- package/docs/reference/utils/URLHandler.md +102 -0
- package/docs/reference.md +73 -0
- package/docs/shortcuts.md +11 -0
- package/docs/tutorials/aerial_imagery.md +19 -0
- package/docs/tutorials/authentication.md +10 -0
- package/docs/tutorials/custom_widgets.md +64 -0
- package/docs/tutorials/map_style.md +27 -0
- package/docs/tutorials/migrate_v4.md +122 -0
- package/docs/tutorials/synced_coverage.md +42 -0
- package/mkdocs.yml +60 -5
- package/package.json +10 -7
- package/public/editor.html +21 -29
- package/public/index.html +3 -3
- package/public/map.html +19 -18
- package/public/viewer.html +18 -24
- package/public/widgets.html +265 -0
- package/scripts/doc.js +77 -0
- package/src/components/core/Basic.css +44 -0
- package/src/components/core/Basic.js +258 -0
- package/src/components/core/CoverageMap.css +9 -0
- package/src/components/core/CoverageMap.js +105 -0
- package/src/components/core/Editor.css +23 -0
- package/src/components/core/Editor.js +354 -0
- package/src/components/core/Viewer.css +109 -0
- package/src/components/core/Viewer.js +707 -0
- package/src/components/core/index.js +11 -0
- package/src/components/index.js +13 -0
- package/src/components/layout/CorneredGrid.js +109 -0
- package/src/components/layout/Mini.js +117 -0
- package/src/components/layout/index.js +7 -0
- package/src/components/menus/MapBackground.js +106 -0
- package/src/components/menus/MapFilters.js +386 -0
- package/src/components/menus/MapLayers.js +143 -0
- package/src/components/menus/MapLegend.js +54 -0
- package/src/components/menus/PictureLegend.js +103 -0
- package/src/components/menus/PictureMetadata.js +188 -0
- package/src/components/menus/PlayerOptions.js +96 -0
- package/src/components/menus/QualityScoreDoc.js +36 -0
- package/src/components/menus/ReportForm.js +133 -0
- package/src/components/menus/Share.js +228 -0
- package/src/components/menus/index.js +15 -0
- package/src/components/styles.js +365 -0
- package/src/components/ui/Button.js +75 -0
- package/src/components/ui/ButtonGroup.css +49 -0
- package/src/components/ui/ButtonGroup.js +68 -0
- package/src/components/ui/CopyButton.js +71 -0
- package/src/components/ui/Grade.js +54 -0
- package/src/components/ui/LinkButton.js +68 -0
- package/src/components/ui/Loader.js +188 -0
- package/src/components/{Map.css → ui/Map.css} +5 -17
- package/src/components/{Map.js → ui/Map.js} +114 -138
- package/src/components/ui/MapMore.js +324 -0
- package/src/components/{Photo.css → ui/Photo.css} +6 -6
- package/src/components/{Photo.js → ui/Photo.js} +279 -90
- package/src/components/ui/Popup.js +145 -0
- package/src/components/ui/QualityScore.js +152 -0
- package/src/components/ui/SearchBar.js +363 -0
- package/src/components/ui/TogglableGroup.js +162 -0
- package/src/components/ui/index.js +20 -0
- package/src/components/ui/widgets/GeoSearch.css +21 -0
- package/src/components/ui/widgets/GeoSearch.js +139 -0
- package/src/components/ui/widgets/Legend.js +51 -0
- package/src/components/ui/widgets/MapFiltersButton.js +104 -0
- package/src/components/ui/widgets/MapLayersButton.js +79 -0
- package/src/components/ui/widgets/Player.css +7 -0
- package/src/components/ui/widgets/Player.js +148 -0
- package/src/components/ui/widgets/Share.js +30 -0
- package/src/components/ui/widgets/Zoom.js +82 -0
- package/src/components/ui/widgets/index.js +12 -0
- package/src/img/panoramax.svg +13 -0
- package/src/img/switch_big.svg +20 -10
- package/src/index.js +6 -9
- package/src/translations/da.json +1 -1
- package/src/translations/de.json +1 -1
- package/src/translations/en.json +5 -3
- package/src/translations/eo.json +1 -1
- package/src/translations/es.json +1 -1
- package/src/translations/fr.json +5 -3
- package/src/translations/hu.json +1 -1
- package/src/translations/it.json +1 -1
- package/src/translations/ja.json +1 -1
- package/src/translations/nl.json +1 -1
- package/src/translations/pl.json +1 -1
- package/src/translations/sv.json +1 -1
- package/src/translations/zh_Hant.json +1 -1
- package/src/utils/API.js +74 -42
- package/src/utils/InitParameters.js +354 -0
- package/src/utils/URLHandler.js +364 -0
- package/src/utils/geocoder.js +116 -0
- package/src/utils/{I18n.js → i18n.js} +3 -1
- package/src/utils/index.js +11 -0
- package/src/utils/{Map.js → map.js} +216 -80
- package/src/utils/picture.js +433 -0
- package/src/utils/utils.js +315 -0
- package/src/utils/widgets.js +93 -0
- package/tests/components/ui/CopyButton.test.js +52 -0
- package/tests/components/ui/Loader.test.js +54 -0
- package/tests/components/{Map.test.js → ui/Map.test.js} +19 -61
- package/tests/components/{Photo.test.js → ui/Photo.test.js} +89 -57
- package/tests/components/ui/Popup.test.js +24 -0
- package/tests/components/ui/QualityScore.test.js +17 -0
- package/tests/components/ui/SearchBar.test.js +107 -0
- package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +34 -0
- package/tests/components/ui/__snapshots__/Loader.test.js.snap +56 -0
- package/tests/components/{__snapshots__ → ui/__snapshots__}/Map.test.js.snap +11 -38
- package/tests/components/{__snapshots__ → ui/__snapshots__}/Photo.test.js.snap +57 -4
- package/tests/components/ui/__snapshots__/Popup.test.js.snap +29 -0
- package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +11 -0
- package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +65 -0
- package/tests/utils/API.test.js +1 -14
- package/tests/utils/InitParameters.test.js +485 -0
- package/tests/utils/URLHandler.test.js +350 -0
- package/tests/utils/__snapshots__/URLHandler.test.js.snap +21 -0
- package/tests/utils/__snapshots__/picture.test.js.snap +315 -0
- package/tests/utils/__snapshots__/widgets.test.js.snap +19 -0
- package/tests/utils/geocoder.test.js +37 -0
- package/tests/utils/{I18n.test.js → i18n.test.js} +1 -1
- package/tests/utils/map.test.js +67 -0
- package/tests/utils/picture.test.js +745 -0
- package/tests/utils/utils.test.js +288 -0
- package/tests/utils/widgets.test.js +90 -0
- package/docs/01_Start.md +0 -149
- package/docs/02_Usage.md +0 -831
- package/docs/04_Advanced_examples.md +0 -216
- package/src/Editor.css +0 -37
- package/src/Editor.js +0 -361
- package/src/StandaloneMap.js +0 -114
- package/src/Viewer.css +0 -203
- package/src/Viewer.js +0 -1246
- package/src/components/CoreView.css +0 -70
- package/src/components/CoreView.js +0 -175
- package/src/components/Loader.css +0 -74
- package/src/components/Loader.js +0 -120
- package/src/utils/Exif.js +0 -193
- package/src/utils/Utils.js +0 -631
- package/src/utils/Widgets.js +0 -562
- package/src/viewer/URLHash.js +0 -469
- package/src/viewer/Widgets.css +0 -880
- package/src/viewer/Widgets.js +0 -1470
- package/tests/Editor.test.js +0 -126
- package/tests/StandaloneMap.test.js +0 -45
- package/tests/Viewer.test.js +0 -366
- package/tests/__snapshots__/Editor.test.js.snap +0 -298
- package/tests/__snapshots__/StandaloneMap.test.js.snap +0 -30
- package/tests/__snapshots__/Viewer.test.js.snap +0 -195
- package/tests/components/CoreView.test.js +0 -92
- package/tests/components/Loader.test.js +0 -38
- package/tests/components/__snapshots__/Loader.test.js.snap +0 -15
- package/tests/utils/Exif.test.js +0 -124
- package/tests/utils/Map.test.js +0 -113
- package/tests/utils/Utils.test.js +0 -300
- package/tests/utils/Widgets.test.js +0 -107
- package/tests/utils/__snapshots__/Exif.test.js.snap +0 -43
- package/tests/utils/__snapshots__/Utils.test.js.snap +0 -41
- package/tests/utils/__snapshots__/Widgets.test.js.snap +0 -44
- package/tests/viewer/URLHash.test.js +0 -559
- package/tests/viewer/Widgets.test.js +0 -127
- package/tests/viewer/__snapshots__/URLHash.test.js.snap +0 -108
- package/tests/viewer/__snapshots__/Widgets.test.js.snap +0 -403
- /package/tests/utils/__snapshots__/{Map.test.js.snap → geocoder.test.js.snap} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.QualityScore"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.QualityScore ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Emits**: [<code>change</code>](#Panoramax.components.ui.QualityScore+event_change)
|
|
7
|
+
**Element**: pnx-quality-score
|
|
8
|
+
|
|
9
|
+
* [.QualityScore](#Panoramax.components.ui.QualityScore) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
10
|
+
* [new QualityScore()](#new_Panoramax.components.ui.QualityScore_new)
|
|
11
|
+
* [.properties](#Panoramax.components.ui.QualityScore+properties) : <code>Object</code>
|
|
12
|
+
* ["change"](#Panoramax.components.ui.QualityScore+event_change)
|
|
13
|
+
|
|
14
|
+
<a name="new_Panoramax.components.ui.QualityScore_new"></a>
|
|
15
|
+
|
|
16
|
+
### new QualityScore()
|
|
17
|
+
Quality Score element displays the picture quality grade.
|
|
18
|
+
|
|
19
|
+
**Example**
|
|
20
|
+
```html
|
|
21
|
+
<!-- Read-only -->
|
|
22
|
+
<pnx-quality-score grade="5" ._t=${viewer._t} />
|
|
23
|
+
|
|
24
|
+
<!-- Input -->
|
|
25
|
+
<pnx-quality-score grade="5" input="pnx-qs-input" @change=${() => alert('changed')} ._t=${viewer._t} />
|
|
26
|
+
```
|
|
27
|
+
<a name="Panoramax.components.ui.QualityScore+properties"></a>
|
|
28
|
+
|
|
29
|
+
### qualityScore.properties : <code>Object</code>
|
|
30
|
+
Component properties.
|
|
31
|
+
|
|
32
|
+
**Kind**: instance property of [<code>QualityScore</code>](#Panoramax.components.ui.QualityScore)
|
|
33
|
+
**Properties**
|
|
34
|
+
|
|
35
|
+
| Name | Type | Default | Description |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| [grade] | <code>number</code> \| <code>string</code> | <code>0</code> | The grade (5=A, 1=E, 0=none selected), or a list of grades |
|
|
38
|
+
| [input] | <code>string</code> | <code>false</code> | If set, score is an input and value is used as ID prefix |
|
|
39
|
+
|
|
40
|
+
<a name="Panoramax.components.ui.QualityScore+event_change"></a>
|
|
41
|
+
|
|
42
|
+
### "change"
|
|
43
|
+
Event for grade change
|
|
44
|
+
|
|
45
|
+
**Kind**: event emitted by [<code>QualityScore</code>](#Panoramax.components.ui.QualityScore)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.SearchBar"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.SearchBar ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Emits**: [<code>result</code>](#Panoramax.components.ui.SearchBar+event_result)
|
|
7
|
+
**Element**: pnx-search-bar
|
|
8
|
+
|
|
9
|
+
* [.SearchBar](#Panoramax.components.ui.SearchBar) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
10
|
+
* [new SearchBar()](#new_Panoramax.components.ui.SearchBar_new)
|
|
11
|
+
* [.properties](#Panoramax.components.ui.SearchBar+properties) : <code>Object</code>
|
|
12
|
+
* ["result"](#Panoramax.components.ui.SearchBar+event_result)
|
|
13
|
+
|
|
14
|
+
<a name="new_Panoramax.components.ui.SearchBar_new"></a>
|
|
15
|
+
|
|
16
|
+
### new SearchBar()
|
|
17
|
+
Search Bar Element displays an interactive search widget.
|
|
18
|
+
|
|
19
|
+
**Example**
|
|
20
|
+
```html
|
|
21
|
+
<pnx-search-bar
|
|
22
|
+
id="my-search-bar"
|
|
23
|
+
placeholder="Search something..."
|
|
24
|
+
.searcher=${mysearchfct}
|
|
25
|
+
._parent=${viewer}
|
|
26
|
+
reduceable="false"
|
|
27
|
+
reduced="false"
|
|
28
|
+
size="xxl" @result=${e => console.log(e.detail)}
|
|
29
|
+
>
|
|
30
|
+
<!-- Optional icon for display on left-side of search bar -->
|
|
31
|
+
</pnx-search-bar>
|
|
32
|
+
```
|
|
33
|
+
<a name="Panoramax.components.ui.SearchBar+properties"></a>
|
|
34
|
+
|
|
35
|
+
### searchBar.properties : <code>Object</code>
|
|
36
|
+
Component properties.
|
|
37
|
+
|
|
38
|
+
**Kind**: instance property of [<code>SearchBar</code>](#Panoramax.components.ui.SearchBar)
|
|
39
|
+
**Properties**
|
|
40
|
+
|
|
41
|
+
| Name | Type | Default | Description |
|
|
42
|
+
| --- | --- | --- | --- |
|
|
43
|
+
| [id] | <code>string</code> | | The ID attribute set on component and prefix for input as well |
|
|
44
|
+
| [placeholder] | <code>string</code> | | Default text to display on empty field |
|
|
45
|
+
| [reduceable] | <code>boolean</code> | <code>false</code> | Can the search bar be collapsed (for mobile view) |
|
|
46
|
+
| [reduced] | <code>boolean</code> | <code>false</code> | Is the search bar currently collapsed ? |
|
|
47
|
+
| [value] | <code>string</code> | | The default input value |
|
|
48
|
+
| [size] | <code>string</code> | <code>"md"</code> | The component sizing (md, xxl) |
|
|
49
|
+
| [searcher] | <code>function</code> | | Search callback, function that takes as parameter the input text value, and resolves on list of results ({title, subtitle} and any other data you'd like to get on validation) |
|
|
50
|
+
| [no-menu-closure] | <code>boolean</code> | <code>false</code> | Set to true to ignore menu closure events |
|
|
51
|
+
|
|
52
|
+
<a name="Panoramax.components.ui.SearchBar+event_result"></a>
|
|
53
|
+
|
|
54
|
+
### "result"
|
|
55
|
+
Event for search result clicked
|
|
56
|
+
|
|
57
|
+
**Kind**: event emitted by [<code>SearchBar</code>](#Panoramax.components.ui.SearchBar)
|
|
58
|
+
**Properties**
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| detail | <code>object</code> \| <code>null</code> | The data associated to clicked item (format based on searcher function results), or null on reset |
|
|
63
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.TogglableGroup"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.TogglableGroup ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-togglable-group
|
|
7
|
+
**Slot**: `button` The button on which click leads to open/close menu
|
|
8
|
+
**Slot**: `default` The menu to make shown/hidden on button click
|
|
9
|
+
|
|
10
|
+
* [.TogglableGroup](#Panoramax.components.ui.TogglableGroup) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
11
|
+
* [new TogglableGroup()](#new_Panoramax.components.ui.TogglableGroup_new)
|
|
12
|
+
* [.properties](#Panoramax.components.ui.TogglableGroup+properties) : <code>Object</code>
|
|
13
|
+
|
|
14
|
+
<a name="new_Panoramax.components.ui.TogglableGroup_new"></a>
|
|
15
|
+
|
|
16
|
+
### new TogglableGroup()
|
|
17
|
+
Togglable Group element allows to make a menu appear/disappear based on button click.
|
|
18
|
+
|
|
19
|
+
**Example**
|
|
20
|
+
```html
|
|
21
|
+
<pnx-togglable-group padded="false" ._parent=${viewer}>
|
|
22
|
+
<pnx-button slot="button">
|
|
23
|
+
Open menu
|
|
24
|
+
</pnx-button>
|
|
25
|
+
<div>Menu content</div>
|
|
26
|
+
</pnx-togglable-group>
|
|
27
|
+
```
|
|
28
|
+
<a name="Panoramax.components.ui.TogglableGroup+properties"></a>
|
|
29
|
+
|
|
30
|
+
### togglableGroup.properties : <code>Object</code>
|
|
31
|
+
Component properties.
|
|
32
|
+
|
|
33
|
+
**Kind**: instance property of [<code>TogglableGroup</code>](#Panoramax.components.ui.TogglableGroup)
|
|
34
|
+
**Properties**
|
|
35
|
+
|
|
36
|
+
| Name | Type | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| [padded] | <code>string</code> | If set, adds a 15px padding to the menu panel. |
|
|
39
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.GeoSearch"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.GeoSearch ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-geosearch
|
|
7
|
+
|
|
8
|
+
* [.GeoSearch](#Panoramax.components.ui.widgets.GeoSearch) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new GeoSearch()](#new_Panoramax.components.ui.widgets.GeoSearch_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.widgets.GeoSearch+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.widgets.GeoSearch_new"></a>
|
|
13
|
+
|
|
14
|
+
### new GeoSearch()
|
|
15
|
+
Ready-to-use geocoder search bar.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-widget-geosearch _parent=${viewer} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.widgets.GeoSearch+properties"></a>
|
|
22
|
+
|
|
23
|
+
### geoSearch.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>GeoSearch</code>](#Panoramax.components.ui.widgets.GeoSearch)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| [geocoder] | <code>string</code> | <code>"nominatim"</code> | The geocoder engine to use (nominatim, ban) |
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.Legend"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.Legend ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-legend
|
|
7
|
+
|
|
8
|
+
* [.Legend](#Panoramax.components.ui.widgets.Legend) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new Legend()](#new_Panoramax.components.ui.widgets.Legend_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.widgets.Legend+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.widgets.Legend_new"></a>
|
|
13
|
+
|
|
14
|
+
### new Legend()
|
|
15
|
+
Legend widget, handling switch between map and photo components.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-widget-legend _parent=${viewer} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.widgets.Legend+properties"></a>
|
|
22
|
+
|
|
23
|
+
### legend.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>Legend</code>](#Panoramax.components.ui.widgets.Legend)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| [focus] | <code>string</code> | The focused main component (map, pic) |
|
|
32
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.MapFiltersButton"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.MapFiltersButton ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-mapfilters
|
|
7
|
+
|
|
8
|
+
* [.MapFiltersButton](#Panoramax.components.ui.widgets.MapFiltersButton) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new MapFiltersButton()](#new_Panoramax.components.ui.widgets.MapFiltersButton_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.widgets.MapFiltersButton+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.widgets.MapFiltersButton_new"></a>
|
|
13
|
+
|
|
14
|
+
### new MapFiltersButton()
|
|
15
|
+
Collapsible button showing off map filters menus.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-widget-mapfilters user-search="" _parent=${viewer} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.widgets.MapFiltersButton+properties"></a>
|
|
22
|
+
|
|
23
|
+
### mapFiltersButton.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>MapFiltersButton</code>](#Panoramax.components.ui.widgets.MapFiltersButton)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| [user-search] | <code>boolean</code> | <code>false</code> | Should user search filter show up ? |
|
|
32
|
+
| [quality-score] | <code>boolean</code> | <code>false</code> | Should quality score filter show up ? |
|
|
33
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.MapLayersButton"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.MapLayersButton ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-maplayers
|
|
7
|
+
<a name="new_Panoramax.components.ui.widgets.MapLayersButton_new"></a>
|
|
8
|
+
|
|
9
|
+
### new MapLayersButton()
|
|
10
|
+
Collapsible button showing off map filters menus.
|
|
11
|
+
|
|
12
|
+
**Example**
|
|
13
|
+
```html
|
|
14
|
+
<pnx-widget-maplayers _parent=${viewer} />
|
|
15
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.Player"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.Player ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-player
|
|
7
|
+
|
|
8
|
+
* [.Player](#Panoramax.components.ui.widgets.Player) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new Player()](#new_Panoramax.components.ui.widgets.Player_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.widgets.Player+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.widgets.Player_new"></a>
|
|
13
|
+
|
|
14
|
+
### new Player()
|
|
15
|
+
Player widget shows prev/play/pause/next/more buttons in a unified toolbar.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-widget-player _parent=${viewer} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.widgets.Player+properties"></a>
|
|
22
|
+
|
|
23
|
+
### player.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>Player</code>](#Panoramax.components.ui.widgets.Player)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| [playing] | <code>boolean</code> | <code>false</code> | Is sequence currently playing ? |
|
|
32
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.Share"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.Share ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-share
|
|
7
|
+
<a name="new_Panoramax.components.ui.widgets.Share_new"></a>
|
|
8
|
+
|
|
9
|
+
### new Share()
|
|
10
|
+
Share button handles showing/hiding share menu.
|
|
11
|
+
|
|
12
|
+
**Example**
|
|
13
|
+
```html
|
|
14
|
+
<pnx-widget-share _parent=${viewer} />
|
|
15
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.Zoom"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.Zoom ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-zoom
|
|
7
|
+
<a name="new_Panoramax.components.ui.widgets.Zoom_new"></a>
|
|
8
|
+
|
|
9
|
+
### new Zoom()
|
|
10
|
+
Widget for +/- zoom on PSV or Map.
|
|
11
|
+
|
|
12
|
+
**Example**
|
|
13
|
+
```html
|
|
14
|
+
<pnx-widget-zoom _parent=${viewer} />
|
|
15
|
+
```
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<a name="Panoramax.utils.API"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.utils.API
|
|
4
|
+
**Kind**: static class of <code>Panoramax.utils</code>
|
|
5
|
+
|
|
6
|
+
* [.API](#Panoramax.utils.API)
|
|
7
|
+
* [new API(endpoint, [options])](#new_Panoramax.utils.API_new)
|
|
8
|
+
* _instance_
|
|
9
|
+
* [.onceReady()](#Panoramax.utils.API+onceReady) ⇒ <code>Promise</code>
|
|
10
|
+
* [.isReady()](#Panoramax.utils.API+isReady) ⇒ <code>boolean</code>
|
|
11
|
+
* [.getAvailableFeatures()](#Panoramax.utils.API+getAvailableFeatures) ⇒ <code>Array.<string></code>
|
|
12
|
+
* [.getUnavailableFeatures()](#Panoramax.utils.API+getUnavailableFeatures) ⇒ <code>Array.<string></code>
|
|
13
|
+
* [.getSequenceItems(seqId, [next], [data])](#Panoramax.utils.API+getSequenceItems) ⇒ <code>Promise</code>
|
|
14
|
+
* [.getPicturesAroundCoordinatesUrl(lat, lon, [factor], [limit], [seqId])](#Panoramax.utils.API+getPicturesAroundCoordinatesUrl) ⇒ <code>string</code>
|
|
15
|
+
* [.getPicturesAroundCoordinates(lat, lon, [factor], [limit], [seqId])](#Panoramax.utils.API+getPicturesAroundCoordinates) ⇒ <code>Promise</code>
|
|
16
|
+
* [.getPictureMetadataUrl(picId, [seqId])](#Panoramax.utils.API+getPictureMetadataUrl) ⇒ <code>string</code>
|
|
17
|
+
* [.getMapStyle()](#Panoramax.utils.API+getMapStyle) ⇒ <code>Promise</code> \| <code>object</code>
|
|
18
|
+
* [.getUserMapStyle(userId, [skipReadyCheck])](#Panoramax.utils.API+getUserMapStyle) ⇒ <code>Promise</code>
|
|
19
|
+
* [.getPictureThumbnailURLForSequence(seqId, [seq])](#Panoramax.utils.API+getPictureThumbnailURLForSequence) ⇒ <code>Promise</code>
|
|
20
|
+
* [.getPictureThumbnailURL(picId, [seqId])](#Panoramax.utils.API+getPictureThumbnailURL) ⇒ <code>Promise</code>
|
|
21
|
+
* [.getRSSURL([bbox])](#Panoramax.utils.API+getRSSURL) ⇒ <code>string</code> \| <code>null</code>
|
|
22
|
+
* [.getSequenceMetadataUrl(seqId)](#Panoramax.utils.API+getSequenceMetadataUrl) ⇒ <code>string</code>
|
|
23
|
+
* [.getDataBbox()](#Panoramax.utils.API+getDataBbox) ⇒ <code>LngLatBoundsLike</code>
|
|
24
|
+
* [.searchUsers(query)](#Panoramax.utils.API+searchUsers) ⇒ <code>Promise</code>
|
|
25
|
+
* [.getUserName(userId)](#Panoramax.utils.API+getUserName) ⇒ <code>Promise</code>
|
|
26
|
+
* [.sendReport(data)](#Panoramax.utils.API+sendReport) ⇒ <code>Promise</code>
|
|
27
|
+
* _static_
|
|
28
|
+
* [.isValidHttpUrl(str)](#Panoramax.utils.API.isValidHttpUrl) ⇒ <code>boolean</code>
|
|
29
|
+
* [.isIdValid(id)](#Panoramax.utils.API.isIdValid) ⇒ <code>boolean</code>
|
|
30
|
+
|
|
31
|
+
<a name="new_Panoramax.utils.API_new"></a>
|
|
32
|
+
|
|
33
|
+
### new API(endpoint, [options])
|
|
34
|
+
API contains various utility functions to communicate with Panoramax/STAC API
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
| Param | Type | Default | Description |
|
|
38
|
+
| --- | --- | --- | --- |
|
|
39
|
+
| endpoint | <code>string</code> | | The endpoint. It corresponds to the <a href="https://github.com/radiantearth/stac-api-spec/blob/main/overview.md#example-landing-page">STAC landing page</a>, with all links describing the API capabilites. |
|
|
40
|
+
| [options] | <code>object</code> | | Options |
|
|
41
|
+
| [options.style] | <code>string</code> \| <code>object</code> | | General map style |
|
|
42
|
+
| [options.tiles] | <code>string</code> | | API route serving pictures & sequences vector tiles |
|
|
43
|
+
| [options.skipReadLanding] | <code>boolean</code> | <code>false</code> | True to not call API landing page automatically |
|
|
44
|
+
| [options.fetch] | <code>object</code> | | Set custom options for fetch calls made against API ([same syntax as fetch options parameter](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters)) |
|
|
45
|
+
| [options.users] | <code>Array.<string></code> | | List of initial user IDs to load map styles for |
|
|
46
|
+
|
|
47
|
+
<a name="Panoramax.utils.API+onceReady"></a>
|
|
48
|
+
|
|
49
|
+
### api.onceReady() ⇒ <code>Promise</code>
|
|
50
|
+
Resolves when the API is ready to be used.
|
|
51
|
+
|
|
52
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
53
|
+
**Fulfil**: <code>string</code> "API is ready" when initialization is complete.
|
|
54
|
+
**Reject**: <code>string</code> Error message
|
|
55
|
+
<a name="Panoramax.utils.API+isReady"></a>
|
|
56
|
+
|
|
57
|
+
### api.isReady() ⇒ <code>boolean</code>
|
|
58
|
+
Checks if the API is ready to be used.
|
|
59
|
+
|
|
60
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
61
|
+
**Returns**: <code>boolean</code> - True if the API is ready, false otherwise.
|
|
62
|
+
<a name="Panoramax.utils.API+getAvailableFeatures"></a>
|
|
63
|
+
|
|
64
|
+
### api.getAvailableFeatures() ⇒ <code>Array.<string></code>
|
|
65
|
+
List of available features offered by API
|
|
66
|
+
|
|
67
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
68
|
+
**Returns**: <code>Array.<string></code> - Keywords of enabled features
|
|
69
|
+
<a name="Panoramax.utils.API+getUnavailableFeatures"></a>
|
|
70
|
+
|
|
71
|
+
### api.getUnavailableFeatures() ⇒ <code>Array.<string></code>
|
|
72
|
+
List of unavailable features on API
|
|
73
|
+
|
|
74
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
75
|
+
**Returns**: <code>Array.<string></code> - Keywords of disabled features
|
|
76
|
+
<a name="Panoramax.utils.API+getSequenceItems"></a>
|
|
77
|
+
|
|
78
|
+
### api.getSequenceItems(seqId, [next], [data]) ⇒ <code>Promise</code>
|
|
79
|
+
Get sequence GeoJSON representation
|
|
80
|
+
|
|
81
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
82
|
+
**Fulfil**: <code>object</code> Sequence GeoJSON
|
|
83
|
+
**Reject**: <code>Error</code> If API is not ready or for any network issue
|
|
84
|
+
|
|
85
|
+
| Param | Type | Default | Description |
|
|
86
|
+
| --- | --- | --- | --- |
|
|
87
|
+
| seqId | <code>string</code> | | The sequence ID |
|
|
88
|
+
| [next] | <code>string</code> | <code>null</code> | The next link URL (only for internals) |
|
|
89
|
+
| [data] | <code>object</code> | <code></code> | The previous dataset (only for internals) |
|
|
90
|
+
|
|
91
|
+
<a name="Panoramax.utils.API+getPicturesAroundCoordinatesUrl"></a>
|
|
92
|
+
|
|
93
|
+
### api.getPicturesAroundCoordinatesUrl(lat, lon, [factor], [limit], [seqId]) ⇒ <code>string</code>
|
|
94
|
+
Get full URL for listing pictures around a specific location
|
|
95
|
+
|
|
96
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
97
|
+
**Returns**: <code>string</code> - The corresponding URL
|
|
98
|
+
|
|
99
|
+
| Param | Type | Default | Description |
|
|
100
|
+
| --- | --- | --- | --- |
|
|
101
|
+
| lat | <code>number</code> | | Latitude |
|
|
102
|
+
| lon | <code>number</code> | | Longitude |
|
|
103
|
+
| [factor] | <code>number</code> | <code>0.0005</code> | The radius to search around (in degrees) |
|
|
104
|
+
| [limit] | <code>number</code> | | Max amount of pictures to retrieve |
|
|
105
|
+
| [seqId] | <code>string</code> | | The sequence ID to filter on (by default, no filter) |
|
|
106
|
+
|
|
107
|
+
<a name="Panoramax.utils.API+getPicturesAroundCoordinates"></a>
|
|
108
|
+
|
|
109
|
+
### api.getPicturesAroundCoordinates(lat, lon, [factor], [limit], [seqId]) ⇒ <code>Promise</code>
|
|
110
|
+
Get list of pictures around a specific location
|
|
111
|
+
|
|
112
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
113
|
+
**Fulfil**: <code>object</code> The GeoJSON feature collection
|
|
114
|
+
|
|
115
|
+
| Param | Type | Description |
|
|
116
|
+
| --- | --- | --- |
|
|
117
|
+
| lat | <code>number</code> | Latitude |
|
|
118
|
+
| lon | <code>number</code> | Longitude |
|
|
119
|
+
| [factor] | <code>number</code> | The radius to search around (in degrees) |
|
|
120
|
+
| [limit] | <code>number</code> | Max amount of pictures to retrieve |
|
|
121
|
+
| [seqId] | <code>string</code> | The sequence ID to filter on (by default, no filter) |
|
|
122
|
+
|
|
123
|
+
<a name="Panoramax.utils.API+getPictureMetadataUrl"></a>
|
|
124
|
+
|
|
125
|
+
### api.getPictureMetadataUrl(picId, [seqId]) ⇒ <code>string</code>
|
|
126
|
+
Get full URL for retrieving a specific picture metadata
|
|
127
|
+
|
|
128
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
129
|
+
**Returns**: <code>string</code> - The corresponding URL
|
|
130
|
+
**Throws**:
|
|
131
|
+
|
|
132
|
+
- <code>Error</code> If API is not ready
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
| Param | Type | Description |
|
|
136
|
+
| --- | --- | --- |
|
|
137
|
+
| picId | <code>string</code> | The picture unique identifier |
|
|
138
|
+
| [seqId] | <code>string</code> | The sequence ID |
|
|
139
|
+
|
|
140
|
+
<a name="Panoramax.utils.API+getMapStyle"></a>
|
|
141
|
+
|
|
142
|
+
### api.getMapStyle() ⇒ <code>Promise</code> \| <code>object</code>
|
|
143
|
+
Get JSON style for general vector tiles
|
|
144
|
+
|
|
145
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
146
|
+
**Returns**: <code>Promise</code> \| <code>object</code> - Promise if first load, MapLibre JSON style otherwise
|
|
147
|
+
**Fulfil**: <code>object</code> The MapLibre JSON style
|
|
148
|
+
**Reject**: <code>Error</code> If API is not ready, or no style defined.
|
|
149
|
+
<a name="Panoramax.utils.API+getUserMapStyle"></a>
|
|
150
|
+
|
|
151
|
+
### api.getUserMapStyle(userId, [skipReadyCheck]) ⇒ <code>Promise</code>
|
|
152
|
+
Get JSON style for specific-user vector tiles
|
|
153
|
+
|
|
154
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
155
|
+
**Fulfil**: <code>object</code> The MapLibre JSON style
|
|
156
|
+
**Reject**: <code>Error</code> If API is not ready, or no style defined.
|
|
157
|
+
|
|
158
|
+
| Param | Type | Default | Description |
|
|
159
|
+
| --- | --- | --- | --- |
|
|
160
|
+
| userId | <code>string</code> | | The user UUID |
|
|
161
|
+
| [skipReadyCheck] | <code>boolean</code> | <code>false</code> | Skip check for API readyness |
|
|
162
|
+
|
|
163
|
+
<a name="Panoramax.utils.API+getPictureThumbnailURLForSequence"></a>
|
|
164
|
+
|
|
165
|
+
### api.getPictureThumbnailURLForSequence(seqId, [seq]) ⇒ <code>Promise</code>
|
|
166
|
+
Get a picture thumbnail URL for a given sequence
|
|
167
|
+
|
|
168
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
169
|
+
**Throws**:
|
|
170
|
+
|
|
171
|
+
- <code>Error</code> If API is not ready
|
|
172
|
+
|
|
173
|
+
**Fulfil**: <code>string\|null</code> Promise resolving on the picture thumbnail URL, or null if not found
|
|
174
|
+
|
|
175
|
+
| Param | Type | Description |
|
|
176
|
+
| --- | --- | --- |
|
|
177
|
+
| seqId | <code>string</code> | The sequence ID |
|
|
178
|
+
| [seq] | <code>object</code> | The sequence metadata (with links) if already loaded |
|
|
179
|
+
|
|
180
|
+
<a name="Panoramax.utils.API+getPictureThumbnailURL"></a>
|
|
181
|
+
|
|
182
|
+
### api.getPictureThumbnailURL(picId, [seqId]) ⇒ <code>Promise</code>
|
|
183
|
+
Get thumbnail URL for a specific picture
|
|
184
|
+
|
|
185
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
186
|
+
**Throws**:
|
|
187
|
+
|
|
188
|
+
- <code>Error</code> If API is not ready
|
|
189
|
+
|
|
190
|
+
**Fulfil**: <code>string\|null</code> The corresponding URL on resolve, or null if no thumbnail could be found
|
|
191
|
+
|
|
192
|
+
| Param | Type | Description |
|
|
193
|
+
| --- | --- | --- |
|
|
194
|
+
| picId | <code>string</code> | The picture unique identifier |
|
|
195
|
+
| [seqId] | <code>string</code> | The sequence ID |
|
|
196
|
+
|
|
197
|
+
<a name="Panoramax.utils.API+getRSSURL"></a>
|
|
198
|
+
|
|
199
|
+
### api.getRSSURL([bbox]) ⇒ <code>string</code> \| <code>null</code>
|
|
200
|
+
Get the RSS feed URL with map parameters (if map is enabled)
|
|
201
|
+
|
|
202
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
203
|
+
**Returns**: <code>string</code> \| <code>null</code> - The URL, or null if no RSS feed is available
|
|
204
|
+
**Throws**:
|
|
205
|
+
|
|
206
|
+
- <code>Error</code> If API is not ready
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
| Param | Type | Description |
|
|
210
|
+
| --- | --- | --- |
|
|
211
|
+
| [bbox] | <code>LngLatBounds</code> | The map current bounding box, or null if not available |
|
|
212
|
+
|
|
213
|
+
<a name="Panoramax.utils.API+getSequenceMetadataUrl"></a>
|
|
214
|
+
|
|
215
|
+
### api.getSequenceMetadataUrl(seqId) ⇒ <code>string</code>
|
|
216
|
+
Get full URL for retrieving a specific sequence metadata
|
|
217
|
+
|
|
218
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
219
|
+
**Returns**: <code>string</code> - The corresponding URL
|
|
220
|
+
**Throws**:
|
|
221
|
+
|
|
222
|
+
- <code>Error</code> If API is not ready
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
| Param | Type | Description |
|
|
226
|
+
| --- | --- | --- |
|
|
227
|
+
| seqId | <code>string</code> | The sequence ID |
|
|
228
|
+
|
|
229
|
+
<a name="Panoramax.utils.API+getDataBbox"></a>
|
|
230
|
+
|
|
231
|
+
### api.getDataBbox() ⇒ <code>LngLatBoundsLike</code>
|
|
232
|
+
Get available data bounding box
|
|
233
|
+
|
|
234
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
235
|
+
**Returns**: <code>LngLatBoundsLike</code> - The bounding box or null if not available
|
|
236
|
+
**Throws**:
|
|
237
|
+
|
|
238
|
+
- <code>Error</code> If API is not ready
|
|
239
|
+
|
|
240
|
+
<a name="Panoramax.utils.API+searchUsers"></a>
|
|
241
|
+
|
|
242
|
+
### api.searchUsers(query) ⇒ <code>Promise</code>
|
|
243
|
+
Look for user ID based on user name query
|
|
244
|
+
|
|
245
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
246
|
+
**Throws**:
|
|
247
|
+
|
|
248
|
+
- <code>Error</code> If API is not ready or user search not available
|
|
249
|
+
|
|
250
|
+
**Fulfil**: <code>object\|null</code> List of potential users
|
|
251
|
+
|
|
252
|
+
| Param | Type | Description |
|
|
253
|
+
| --- | --- | --- |
|
|
254
|
+
| query | <code>string</code> | The user name to look for |
|
|
255
|
+
|
|
256
|
+
<a name="Panoramax.utils.API+getUserName"></a>
|
|
257
|
+
|
|
258
|
+
### api.getUserName(userId) ⇒ <code>Promise</code>
|
|
259
|
+
Get user name based on its ID
|
|
260
|
+
|
|
261
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
262
|
+
**Throws**:
|
|
263
|
+
|
|
264
|
+
- <code>Error</code> If API is not ready
|
|
265
|
+
|
|
266
|
+
**Fulfil**: <code>string\|null</code> The user name (or null if not found)
|
|
267
|
+
|
|
268
|
+
| Param | Type | Description |
|
|
269
|
+
| --- | --- | --- |
|
|
270
|
+
| userId | <code>string</code> | The user UUID |
|
|
271
|
+
|
|
272
|
+
<a name="Panoramax.utils.API+sendReport"></a>
|
|
273
|
+
|
|
274
|
+
### api.sendReport(data) ⇒ <code>Promise</code>
|
|
275
|
+
Send a report to API
|
|
276
|
+
|
|
277
|
+
**Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
|
|
278
|
+
**Fulfil**: <code>object</code> The JSON API response
|
|
279
|
+
|
|
280
|
+
| Param | Type | Description |
|
|
281
|
+
| --- | --- | --- |
|
|
282
|
+
| data | <code>object</code> | The input form data |
|
|
283
|
+
|
|
284
|
+
<a name="Panoramax.utils.API.isValidHttpUrl"></a>
|
|
285
|
+
|
|
286
|
+
### API.isValidHttpUrl(str) ⇒ <code>boolean</code>
|
|
287
|
+
Checks URL string validity
|
|
288
|
+
|
|
289
|
+
**Kind**: static method of [<code>API</code>](#Panoramax.utils.API)
|
|
290
|
+
**Returns**: <code>boolean</code> - True if valid
|
|
291
|
+
|
|
292
|
+
| Param | Type | Description |
|
|
293
|
+
| --- | --- | --- |
|
|
294
|
+
| str | <code>string</code> | The URL to check |
|
|
295
|
+
|
|
296
|
+
<a name="Panoramax.utils.API.isIdValid"></a>
|
|
297
|
+
|
|
298
|
+
### API.isIdValid(id) ⇒ <code>boolean</code>
|
|
299
|
+
Checks picture or sequence ID validity
|
|
300
|
+
|
|
301
|
+
**Kind**: static method of [<code>API</code>](#Panoramax.utils.API)
|
|
302
|
+
**Returns**: <code>boolean</code> - True if valid
|
|
303
|
+
**Throws**:
|
|
304
|
+
|
|
305
|
+
- <code>Error</code> If not valid
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
| Param | Type | Description |
|
|
309
|
+
| --- | --- | --- |
|
|
310
|
+
| id | <code>string</code> | The ID to check |
|
|
311
|
+
|