@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,233 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.MapMore"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.MapMore ⇐ [<code>Map</code>](Map.md/#Panoramax.components.ui.Map)
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: [<code>Map</code>](Map.md/#Panoramax.components.ui.Map)
|
|
6
|
+
**Emits**: [<code>background-changed</code>](Map.md/#Panoramax.components.ui.Map+event_background-changed), [<code>users-changed</code>](Map.md/#Panoramax.components.ui.Map+event_users-changed), [<code>sequence-hover</code>](Map.md/#Panoramax.components.ui.Map+event_sequence-hover), [<code>sequence-click</code>](Map.md/#Panoramax.components.ui.Map+event_sequence-click), [<code>picture-click</code>](Map.md/#Panoramax.components.ui.Map+event_picture-click), [<code>filters-changed</code>](#Panoramax.components.ui.MapMore+event_filters-changed)
|
|
7
|
+
|
|
8
|
+
* [.MapMore](#Panoramax.components.ui.MapMore) ⇐ [<code>Map</code>](Map.md/#Panoramax.components.ui.Map)
|
|
9
|
+
* [new MapMore(parent, container, [options])](#new_Panoramax.components.ui.MapMore_new)
|
|
10
|
+
* [.destroy()](Map.md/#Panoramax.components.ui.Map+destroy)
|
|
11
|
+
* [.waitForEnoughMapLoaded()](Map.md/#Panoramax.components.ui.Map+waitForEnoughMapLoaded) ⇒ <code>Promise</code>
|
|
12
|
+
* [.reloadVectorTiles()](Map.md/#Panoramax.components.ui.Map+reloadVectorTiles)
|
|
13
|
+
* [.hasTwoBackgrounds()](Map.md/#Panoramax.components.ui.Map+hasTwoBackgrounds) ⇒ <code>boolean</code>
|
|
14
|
+
* [.getBackground()](Map.md/#Panoramax.components.ui.Map+getBackground) ⇒ <code>string</code>
|
|
15
|
+
* [.setBackground(bg)](Map.md/#Panoramax.components.ui.Map+setBackground)
|
|
16
|
+
* [.getVisibleUsers()](Map.md/#Panoramax.components.ui.Map+getVisibleUsers) ⇒ <code>Array.<string></code>
|
|
17
|
+
* [.setVisibleUsers(visibleIds)](Map.md/#Panoramax.components.ui.Map+setVisibleUsers)
|
|
18
|
+
* [.filterUserLayersContent(dataType, filter)](Map.md/#Panoramax.components.ui.Map+filterUserLayersContent)
|
|
19
|
+
* [.displayPictureMarker(lon, lat, heading, [skipCenter])](#Panoramax.components.ui.Map+displayPictureMarker)
|
|
20
|
+
* [.reloadLayersStyles()](Map.md/#Panoramax.components.ui.Map+reloadLayersStyles)
|
|
21
|
+
* ["filters-changed"](#Panoramax.components.ui.MapMore+event_filters-changed)
|
|
22
|
+
* ["background-changed"](Map.md/#Panoramax.components.ui.Map+event_background-changed)
|
|
23
|
+
* ["users-changed"](Map.md/#Panoramax.components.ui.Map+event_users-changed)
|
|
24
|
+
* ["sequence-hover"](Map.md/#Panoramax.components.ui.Map+event_sequence-hover)
|
|
25
|
+
* ["sequence-click"](Map.md/#Panoramax.components.ui.Map+event_sequence-click)
|
|
26
|
+
* ["picture-click"](Map.md/#Panoramax.components.ui.Map+event_picture-click)
|
|
27
|
+
|
|
28
|
+
<a name="new_Panoramax.components.ui.MapMore_new"></a>
|
|
29
|
+
|
|
30
|
+
### new MapMore(parent, container, [options])
|
|
31
|
+
MapMore is a more complete version of [Map UI component](Map.md/#Panoramax.components.ui.Map).
|
|
32
|
+
|
|
33
|
+
It offers advanced features like themes, filters and more.
|
|
34
|
+
|
|
35
|
+
Note that all functions of [MapLibre GL JS class Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/) are also available.
|
|
36
|
+
|
|
37
|
+
⚠️ This class doesn't inherit from [EventTarget](https://developer.mozilla.org/fr/docs/Web/API/EventTarget), so it doesn't have `addEventListener` and `dispatchEvent` functions.
|
|
38
|
+
It uses instead [`on`](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#on) and `fire` functions from MapLibre Map class.
|
|
39
|
+
`fire` function doesn't take directly [`Event`](https://developer.mozilla.org/fr/docs/Web/API/Event) objects, but a string and object data.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
| Param | Type | Default | Description |
|
|
43
|
+
| --- | --- | --- | --- |
|
|
44
|
+
| parent | [<code>Basic</code>](../core/Basic.md/#Panoramax.components.core.Basic) | | The parent view |
|
|
45
|
+
| container | <code>Element</code> | | The DOM element to create into |
|
|
46
|
+
| [options] | <code>object</code> | | The map options (any of [MapLibre GL settings](https://maplibre.org/maplibre-gl-js-docs/api/map/#map-parameters) or any supplementary option defined here) |
|
|
47
|
+
| [options.raster] | <code>object</code> | | The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster). |
|
|
48
|
+
| [options.background] | <code>string</code> | <code>"streets"</code> | Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to streets. |
|
|
49
|
+
| [options.theme] | <code>string</code> | <code>"default"</code> | The map theme (default, age, score, type) |
|
|
50
|
+
|
|
51
|
+
**Example**
|
|
52
|
+
```js
|
|
53
|
+
const map = new Panoramax.components.ui.MapMore(viewer, mapNode, {center: {lat: 48.7, lng: -1.7}});
|
|
54
|
+
```
|
|
55
|
+
<a name="Panoramax.components.ui.Map+destroy"></a>
|
|
56
|
+
|
|
57
|
+
### mapMore.destroy()
|
|
58
|
+
Destroy any form of life in this component
|
|
59
|
+
|
|
60
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
61
|
+
<a name="Panoramax.components.ui.Map+waitForEnoughMapLoaded"></a>
|
|
62
|
+
|
|
63
|
+
### mapMore.waitForEnoughMapLoaded() ⇒ <code>Promise</code>
|
|
64
|
+
Helper to know when enough map background and Panoramax tiles are loaded for a proper display.
|
|
65
|
+
|
|
66
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
67
|
+
**Returns**: <code>Promise</code> - Resolves when enough is loaded
|
|
68
|
+
<a name="Panoramax.components.ui.Map+reloadVectorTiles"></a>
|
|
69
|
+
|
|
70
|
+
### mapMore.reloadVectorTiles()
|
|
71
|
+
Force refresh of vector tiles data
|
|
72
|
+
|
|
73
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
74
|
+
<a name="Panoramax.components.ui.Map+hasTwoBackgrounds"></a>
|
|
75
|
+
|
|
76
|
+
### mapMore.hasTwoBackgrounds() ⇒ <code>boolean</code>
|
|
77
|
+
Check if map offers aerial imagery as well as streets rendering.
|
|
78
|
+
|
|
79
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
80
|
+
**Returns**: <code>boolean</code> - True if aerial imagery is available for display
|
|
81
|
+
<a name="Panoramax.components.ui.Map+getBackground"></a>
|
|
82
|
+
|
|
83
|
+
### mapMore.getBackground() ⇒ <code>string</code>
|
|
84
|
+
Get the currently selected map background
|
|
85
|
+
|
|
86
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
87
|
+
**Returns**: <code>string</code> - aerial or streets
|
|
88
|
+
<a name="Panoramax.components.ui.Map+setBackground"></a>
|
|
89
|
+
|
|
90
|
+
### mapMore.setBackground(bg)
|
|
91
|
+
Change the shown background in map.
|
|
92
|
+
|
|
93
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
94
|
+
**Throws**:
|
|
95
|
+
|
|
96
|
+
- <code>Error</code> If not aerial imagery is available
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
| Param | Type | Description |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| bg | <code>string</code> | The new background to display (aerial or streets) |
|
|
102
|
+
|
|
103
|
+
<a name="Panoramax.components.ui.Map+getVisibleUsers"></a>
|
|
104
|
+
|
|
105
|
+
### mapMore.getVisibleUsers() ⇒ <code>Array.<string></code>
|
|
106
|
+
Get the currently visible users
|
|
107
|
+
|
|
108
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
109
|
+
**Returns**: <code>Array.<string></code> - List of visible users
|
|
110
|
+
<a name="Panoramax.components.ui.Map+setVisibleUsers"></a>
|
|
111
|
+
|
|
112
|
+
### mapMore.setVisibleUsers(visibleIds)
|
|
113
|
+
Make given user layers visible on map, and hide all others (if any)
|
|
114
|
+
|
|
115
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
116
|
+
|
|
117
|
+
| Param | Type | Description |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| visibleIds | <code>string</code> \| <code>Array.<string></code> | The user layers IDs to display |
|
|
120
|
+
|
|
121
|
+
<a name="Panoramax.components.ui.Map+filterUserLayersContent"></a>
|
|
122
|
+
|
|
123
|
+
### mapMore.filterUserLayersContent(dataType, filter)
|
|
124
|
+
Filter the visible data content in all visible map layers
|
|
125
|
+
|
|
126
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
127
|
+
|
|
128
|
+
| Param | Type | Description |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| dataType | <code>string</code> | sequences or pictures |
|
|
131
|
+
| filter | <code>object</code> | The MapLibre GL filter rule to apply |
|
|
132
|
+
|
|
133
|
+
<a name="Panoramax.components.ui.Map+displayPictureMarker"></a>
|
|
134
|
+
|
|
135
|
+
### mapMore.displayPictureMarker(lon, lat, heading, [skipCenter])
|
|
136
|
+
Shows on map a picture position and heading.
|
|
137
|
+
|
|
138
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
139
|
+
|
|
140
|
+
| Param | Type | Default | Description |
|
|
141
|
+
| --- | --- | --- | --- |
|
|
142
|
+
| lon | <code>number</code> | | The longitude |
|
|
143
|
+
| lat | <code>number</code> | | The latitude |
|
|
144
|
+
| heading | <code>number</code> | | The heading |
|
|
145
|
+
| [skipCenter] | <code>boolean</code> | <code>false</code> | Set to true to avoid map centering on marker |
|
|
146
|
+
|
|
147
|
+
<a name="Panoramax.components.ui.Map+reloadLayersStyles"></a>
|
|
148
|
+
|
|
149
|
+
### mapMore.reloadLayersStyles()
|
|
150
|
+
Forces reload of pictures/sequences layer styles.
|
|
151
|
+
This is useful after a map theme change.
|
|
152
|
+
|
|
153
|
+
**Kind**: instance method of [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
154
|
+
<a name="Panoramax.components.ui.MapMore+event_filters-changed"></a>
|
|
155
|
+
|
|
156
|
+
### "filters-changed"
|
|
157
|
+
Event for filters changes
|
|
158
|
+
|
|
159
|
+
**Kind**: event emitted by [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
160
|
+
**Properties**
|
|
161
|
+
|
|
162
|
+
| Name | Type | Description |
|
|
163
|
+
| --- | --- | --- |
|
|
164
|
+
| [minDate] | <code>string</code> | The minimum date in time range (ISO format) |
|
|
165
|
+
| [maxDate] | <code>string</code> | The maximum date in time range (ISO format) |
|
|
166
|
+
| [pic_type] | <code>string</code> | Camera type (equirectangular, flat, null/empty string for both) |
|
|
167
|
+
| [camera] | <code>string</code> | Camera make and model |
|
|
168
|
+
| [theme] | <code>string</code> | Map theme |
|
|
169
|
+
| [qualityscore] | <code>Array.<number></code> | QualityScore values, as a list of 1 to 5 grades |
|
|
170
|
+
|
|
171
|
+
<a name="Panoramax.components.ui.Map+event_background-changed"></a>
|
|
172
|
+
|
|
173
|
+
### "background-changed"
|
|
174
|
+
Event for map background changes
|
|
175
|
+
|
|
176
|
+
**Kind**: event emitted by [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
177
|
+
**Properties**
|
|
178
|
+
|
|
179
|
+
| Name | Type | Description |
|
|
180
|
+
| --- | --- | --- |
|
|
181
|
+
| [background] | <code>string</code> | The new selected background (aerial, streets) |
|
|
182
|
+
|
|
183
|
+
<a name="Panoramax.components.ui.Map+event_users-changed"></a>
|
|
184
|
+
|
|
185
|
+
### "users-changed"
|
|
186
|
+
Event for visible users changes
|
|
187
|
+
|
|
188
|
+
**Kind**: event emitted by [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
189
|
+
**Properties**
|
|
190
|
+
|
|
191
|
+
| Name | Type | Description |
|
|
192
|
+
| --- | --- | --- |
|
|
193
|
+
| [usersIds] | <code>Array.<string></code> | The list of newly selected users |
|
|
194
|
+
|
|
195
|
+
<a name="Panoramax.components.ui.Map+event_sequence-hover"></a>
|
|
196
|
+
|
|
197
|
+
### "sequence-hover"
|
|
198
|
+
Event when a sequence on map is hovered (not selected)
|
|
199
|
+
|
|
200
|
+
**Kind**: event emitted by [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
201
|
+
**Properties**
|
|
202
|
+
|
|
203
|
+
| Name | Type | Description |
|
|
204
|
+
| --- | --- | --- |
|
|
205
|
+
| seqId | <code>string</code> | The hovered sequence ID |
|
|
206
|
+
|
|
207
|
+
<a name="Panoramax.components.ui.Map+event_sequence-click"></a>
|
|
208
|
+
|
|
209
|
+
### "sequence-click"
|
|
210
|
+
Event when a sequence on map is clicked
|
|
211
|
+
|
|
212
|
+
**Kind**: event emitted by [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
213
|
+
**Properties**
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description |
|
|
216
|
+
| --- | --- | --- |
|
|
217
|
+
| seqId | <code>string</code> | The clicked sequence ID |
|
|
218
|
+
| coordinates | <code>maplibregl.LngLat</code> | The coordinates of user click |
|
|
219
|
+
|
|
220
|
+
<a name="Panoramax.components.ui.Map+event_picture-click"></a>
|
|
221
|
+
|
|
222
|
+
### "picture-click"
|
|
223
|
+
Event when a picture on map is clicked
|
|
224
|
+
|
|
225
|
+
**Kind**: event emitted by [<code>MapMore</code>](#Panoramax.components.ui.MapMore)
|
|
226
|
+
**Properties**
|
|
227
|
+
|
|
228
|
+
| Name | Type | Description |
|
|
229
|
+
| --- | --- | --- |
|
|
230
|
+
| picId | <code>string</code> | The clicked picture ID |
|
|
231
|
+
| seqId | <code>string</code> | The clicked picture's sequence ID |
|
|
232
|
+
| feature | <code>object</code> | The GeoJSON feature of the picture |
|
|
233
|
+
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.Photo"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.Photo ⇐ <code>[photo-sphere-viewer.core.Viewer](https://photo-sphere-viewer.js.org/api/classes/Core.Viewer.html)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[photo-sphere-viewer.core.Viewer](https://photo-sphere-viewer.js.org/api/classes/Core.Viewer.html)</code>
|
|
6
|
+
**Emits**: [<code>picture-loading</code>](#Panoramax.components.ui.Photo+event_picture-loading), [<code>picture-preview-started</code>](#Panoramax.components.ui.Photo+event_picture-preview-started), [<code>picture-preview-stopped</code>](#Panoramax.components.ui.Photo+event_picture-preview-stopped), [<code>view-rotated</code>](#Panoramax.components.ui.Photo+event_view-rotated), [<code>picture-loaded</code>](#Panoramax.components.ui.Photo+event_picture-loaded), [<code>picture-tiles-loaded</code>](#Panoramax.components.ui.Photo+event_picture-tiles-loaded), [<code>transition-duration-changed</code>](#Panoramax.components.ui.Photo+event_transition-duration-changed), [<code>sequence-playing</code>](#Panoramax.components.ui.Photo+event_sequence-playing), [<code>sequence-stopped</code>](#Panoramax.components.ui.Photo+event_sequence-stopped), [<code>pictures-navigation-changed</code>](#Panoramax.components.ui.Photo+event_pictures-navigation-changed)
|
|
7
|
+
|
|
8
|
+
* [.Photo](#Panoramax.components.ui.Photo) ⇐ <code>[photo-sphere-viewer.core.Viewer](https://photo-sphere-viewer.js.org/api/classes/Core.Viewer.html)</code>
|
|
9
|
+
* [new Photo(parent, container, [options])](#new_Panoramax.components.ui.Photo_new)
|
|
10
|
+
* [.getPictureMetadata()](#Panoramax.components.ui.Photo+getPictureMetadata) ⇒ <code>object</code>
|
|
11
|
+
* [.goToNextPicture()](#Panoramax.components.ui.Photo+goToNextPicture)
|
|
12
|
+
* [.goToPrevPicture()](#Panoramax.components.ui.Photo+goToPrevPicture)
|
|
13
|
+
* [.goToPosition(lat, lon)](#Panoramax.components.ui.Photo+goToPosition) ⇒ <code>Promise</code>
|
|
14
|
+
* [.getXY()](#Panoramax.components.ui.Photo+getXY) ⇒ <code>object</code>
|
|
15
|
+
* [.getXYZ()](#Panoramax.components.ui.Photo+getXYZ) ⇒ <code>object</code>
|
|
16
|
+
* [.getPictureOriginalHeading()](#Panoramax.components.ui.Photo+getPictureOriginalHeading) ⇒ <code>number</code>
|
|
17
|
+
* [.getPictureRelativeHeading()](#Panoramax.components.ui.Photo+getPictureRelativeHeading) ⇒ <code>number</code>
|
|
18
|
+
* [.clearPictureMetadataCache()](#Panoramax.components.ui.Photo+clearPictureMetadataCache)
|
|
19
|
+
* [.setXYZ(x, y, z)](#Panoramax.components.ui.Photo+setXYZ)
|
|
20
|
+
* [.setHigherContrast(enable)](#Panoramax.components.ui.Photo+setHigherContrast)
|
|
21
|
+
* [.getTransitionDuration()](#Panoramax.components.ui.Photo+getTransitionDuration) ⇒ <code>number</code>
|
|
22
|
+
* [.setTransitionDuration(value)](#Panoramax.components.ui.Photo+setTransitionDuration)
|
|
23
|
+
* [.showErrorOverlay(e, label, dissmisable)](#Panoramax.components.ui.Photo+showErrorOverlay)
|
|
24
|
+
* [.playSequence()](#Panoramax.components.ui.Photo+playSequence)
|
|
25
|
+
* [.stopSequence()](#Panoramax.components.ui.Photo+stopSequence)
|
|
26
|
+
* [.isSequencePlaying()](#Panoramax.components.ui.Photo+isSequencePlaying) ⇒ <code>boolean</code>
|
|
27
|
+
* [.toggleSequencePlaying()](#Panoramax.components.ui.Photo+toggleSequencePlaying)
|
|
28
|
+
* [.getPicturesNavigation()](#Panoramax.components.ui.Photo+getPicturesNavigation) ⇒ <code>string</code>
|
|
29
|
+
* [.setPicturesNavigation(pn)](#Panoramax.components.ui.Photo+setPicturesNavigation)
|
|
30
|
+
* [.forceRefresh()](#Panoramax.components.ui.Photo+forceRefresh)
|
|
31
|
+
* ["picture-loading"](#Panoramax.components.ui.Photo+event_picture-loading)
|
|
32
|
+
* ["picture-preview-started"](#Panoramax.components.ui.Photo+event_picture-preview-started)
|
|
33
|
+
* ["picture-preview-stopped"](#Panoramax.components.ui.Photo+event_picture-preview-stopped)
|
|
34
|
+
* ["view-rotated"](#Panoramax.components.ui.Photo+event_view-rotated)
|
|
35
|
+
* ["picture-loaded"](#Panoramax.components.ui.Photo+event_picture-loaded)
|
|
36
|
+
* ["picture-tiles-loaded"](#Panoramax.components.ui.Photo+event_picture-tiles-loaded)
|
|
37
|
+
* ["transition-duration-changed"](#Panoramax.components.ui.Photo+event_transition-duration-changed)
|
|
38
|
+
* ["sequence-playing"](#Panoramax.components.ui.Photo+event_sequence-playing)
|
|
39
|
+
* ["sequence-stopped"](#Panoramax.components.ui.Photo+event_sequence-stopped)
|
|
40
|
+
* ["pictures-navigation-changed"](#Panoramax.components.ui.Photo+event_pictures-navigation-changed)
|
|
41
|
+
|
|
42
|
+
<a name="new_Panoramax.components.ui.Photo_new"></a>
|
|
43
|
+
|
|
44
|
+
### new Photo(parent, container, [options])
|
|
45
|
+
Photo is the component showing a single picture.
|
|
46
|
+
It uses Photo Sphere Viewer as a basis, and pre-configure dialog with STAC API.
|
|
47
|
+
|
|
48
|
+
Note that all functions of [PhotoSphereViewer Viewer class](https://photo-sphere-viewer.js.org/api/classes/core.viewer) are available as well.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
| Param | Type | Default | Description |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| parent | <code>Panoramax.components.core.basic</code> | | The parent view |
|
|
54
|
+
| container | <code>Element</code> | | The DOM element to create into |
|
|
55
|
+
| [options] | <code>object</code> | | The viewer options. Can be any of [Photo Sphere Viewer options](https://photo-sphere-viewer.js.org/guide/config.html#standard-options) |
|
|
56
|
+
| [options.transitionDuration] | <code>number</code> | | The number of milliseconds the transition animation should be. |
|
|
57
|
+
| [options.position] | <code>Array.<number></code> | | Initial geographical coordinates (as [latitude, longitude]) to find picture nearby. Only used if no picture ID is set. |
|
|
58
|
+
| [options.shouldGoFast] | <code>function</code> | | Function returning a boolean to indicate if we may skip loading HD images. |
|
|
59
|
+
| [options.picturesNavigation] | <code>string</code> | <code>"any"</code> | The allowed pictures navigation ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture) |
|
|
60
|
+
|
|
61
|
+
**Example**
|
|
62
|
+
```js
|
|
63
|
+
const psv = new Panoramax.components.ui.Photo(viewer, psvNode, {transitionDuration: 500})
|
|
64
|
+
```
|
|
65
|
+
<a name="Panoramax.components.ui.Photo+getPictureMetadata"></a>
|
|
66
|
+
|
|
67
|
+
### photo.getPictureMetadata() ⇒ <code>object</code>
|
|
68
|
+
Access currently shown picture metadata
|
|
69
|
+
|
|
70
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
71
|
+
**Returns**: <code>object</code> - Picture metadata
|
|
72
|
+
<a name="Panoramax.components.ui.Photo+goToNextPicture"></a>
|
|
73
|
+
|
|
74
|
+
### photo.goToNextPicture()
|
|
75
|
+
Displays next picture in current sequence (if any)
|
|
76
|
+
|
|
77
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
78
|
+
**Throws**:
|
|
79
|
+
|
|
80
|
+
- <code>Error</code> If no picture is selected, or no next picture available
|
|
81
|
+
|
|
82
|
+
<a name="Panoramax.components.ui.Photo+goToPrevPicture"></a>
|
|
83
|
+
|
|
84
|
+
### photo.goToPrevPicture()
|
|
85
|
+
Displays previous picture in current sequence (if any)
|
|
86
|
+
|
|
87
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
88
|
+
**Throws**:
|
|
89
|
+
|
|
90
|
+
- <code>Error</code> If no picture is selected, or no previous picture available
|
|
91
|
+
|
|
92
|
+
<a name="Panoramax.components.ui.Photo+goToPosition"></a>
|
|
93
|
+
|
|
94
|
+
### photo.goToPosition(lat, lon) ⇒ <code>Promise</code>
|
|
95
|
+
Displays in viewer a picture near to given coordinates
|
|
96
|
+
|
|
97
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
98
|
+
**Fulfil**: <code>string</code> Picture ID if picture found
|
|
99
|
+
**Reject**: <code>Error</code> If no picture found
|
|
100
|
+
|
|
101
|
+
| Param | Type | Description |
|
|
102
|
+
| --- | --- | --- |
|
|
103
|
+
| lat | <code>number</code> | Latitude (WGS84) |
|
|
104
|
+
| lon | <code>number</code> | Longitude (WGS84) |
|
|
105
|
+
|
|
106
|
+
<a name="Panoramax.components.ui.Photo+getXY"></a>
|
|
107
|
+
|
|
108
|
+
### photo.getXY() ⇒ <code>object</code>
|
|
109
|
+
Get 2D position of sphere currently shown to user
|
|
110
|
+
|
|
111
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
112
|
+
**Returns**: <code>object</code> - 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) }
|
|
113
|
+
<a name="Panoramax.components.ui.Photo+getXYZ"></a>
|
|
114
|
+
|
|
115
|
+
### photo.getXYZ() ⇒ <code>object</code>
|
|
116
|
+
Get 3D position of sphere currently shown to user
|
|
117
|
+
|
|
118
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
119
|
+
**Returns**: <code>object</code> - 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) }
|
|
120
|
+
<a name="Panoramax.components.ui.Photo+getPictureOriginalHeading"></a>
|
|
121
|
+
|
|
122
|
+
### photo.getPictureOriginalHeading() ⇒ <code>number</code>
|
|
123
|
+
Get capture orientation of current picture, based on its GPS.
|
|
124
|
+
|
|
125
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
126
|
+
**Returns**: <code>number</code> - Picture original heading in degrees (0 to 360°)
|
|
127
|
+
<a name="Panoramax.components.ui.Photo+getPictureRelativeHeading"></a>
|
|
128
|
+
|
|
129
|
+
### photo.getPictureRelativeHeading() ⇒ <code>number</code>
|
|
130
|
+
Computes the relative heading of currently selected picture.
|
|
131
|
+
This gives the angle of capture compared to sequence path (vehicle movement).
|
|
132
|
+
|
|
133
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
134
|
+
**Returns**: <code>number</code> - Relative heading in degrees (-180 to 180)
|
|
135
|
+
<a name="Panoramax.components.ui.Photo+clearPictureMetadataCache"></a>
|
|
136
|
+
|
|
137
|
+
### photo.clearPictureMetadataCache()
|
|
138
|
+
Clears the Photo Sphere Viewer metadata cache.
|
|
139
|
+
It is useful when current picture or sequence has changed server-side after first load.
|
|
140
|
+
|
|
141
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
142
|
+
<a name="Panoramax.components.ui.Photo+setXYZ"></a>
|
|
143
|
+
|
|
144
|
+
### photo.setXYZ(x, y, z)
|
|
145
|
+
Change the shown position in picture
|
|
146
|
+
|
|
147
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
148
|
+
|
|
149
|
+
| Param | Type | Description |
|
|
150
|
+
| --- | --- | --- |
|
|
151
|
+
| x | <code>number</code> | X position (in degrees) |
|
|
152
|
+
| y | <code>number</code> | Y position (in degrees) |
|
|
153
|
+
| z | <code>number</code> | Z position (0-100) |
|
|
154
|
+
|
|
155
|
+
<a name="Panoramax.components.ui.Photo+setHigherContrast"></a>
|
|
156
|
+
|
|
157
|
+
### photo.setHigherContrast(enable)
|
|
158
|
+
Enable or disable higher contrast on picture
|
|
159
|
+
|
|
160
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
161
|
+
|
|
162
|
+
| Param | Type | Description |
|
|
163
|
+
| --- | --- | --- |
|
|
164
|
+
| enable | <code>boolean</code> | True to enable higher contrast |
|
|
165
|
+
|
|
166
|
+
<a name="Panoramax.components.ui.Photo+getTransitionDuration"></a>
|
|
167
|
+
|
|
168
|
+
### photo.getTransitionDuration() ⇒ <code>number</code>
|
|
169
|
+
Get the duration of stay on a picture during a sequence play.
|
|
170
|
+
|
|
171
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
172
|
+
**Returns**: <code>number</code> - The duration (in milliseconds)
|
|
173
|
+
<a name="Panoramax.components.ui.Photo+setTransitionDuration"></a>
|
|
174
|
+
|
|
175
|
+
### photo.setTransitionDuration(value)
|
|
176
|
+
Changes the duration of stay on a picture during a sequence play.
|
|
177
|
+
|
|
178
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
179
|
+
|
|
180
|
+
| Param | Type | Description |
|
|
181
|
+
| --- | --- | --- |
|
|
182
|
+
| value | <code>number</code> | The new duration (in milliseconds, between 100 and 3000) |
|
|
183
|
+
|
|
184
|
+
<a name="Panoramax.components.ui.Photo+showErrorOverlay"></a>
|
|
185
|
+
|
|
186
|
+
### photo.showErrorOverlay(e, label, dissmisable)
|
|
187
|
+
Display an error message to user on screen
|
|
188
|
+
|
|
189
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
190
|
+
|
|
191
|
+
| Param | Type | Description |
|
|
192
|
+
| --- | --- | --- |
|
|
193
|
+
| e | <code>object</code> | The initial error |
|
|
194
|
+
| label | <code>str</code> | The main error label to display |
|
|
195
|
+
| dissmisable | <code>boolean</code> | Is error dissmisable |
|
|
196
|
+
|
|
197
|
+
<a name="Panoramax.components.ui.Photo+playSequence"></a>
|
|
198
|
+
|
|
199
|
+
### photo.playSequence()
|
|
200
|
+
Goes continuously to next picture in sequence as long as possible
|
|
201
|
+
|
|
202
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
203
|
+
<a name="Panoramax.components.ui.Photo+stopSequence"></a>
|
|
204
|
+
|
|
205
|
+
### photo.stopSequence()
|
|
206
|
+
Stops playing current sequence
|
|
207
|
+
|
|
208
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
209
|
+
<a name="Panoramax.components.ui.Photo+isSequencePlaying"></a>
|
|
210
|
+
|
|
211
|
+
### photo.isSequencePlaying() ⇒ <code>boolean</code>
|
|
212
|
+
Is there any sequence being played right now ?
|
|
213
|
+
|
|
214
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
215
|
+
**Returns**: <code>boolean</code> - True if sequence is playing
|
|
216
|
+
<a name="Panoramax.components.ui.Photo+toggleSequencePlaying"></a>
|
|
217
|
+
|
|
218
|
+
### photo.toggleSequencePlaying()
|
|
219
|
+
Starts/stops the reading of pictures in a sequence
|
|
220
|
+
|
|
221
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
222
|
+
<a name="Panoramax.components.ui.Photo+getPicturesNavigation"></a>
|
|
223
|
+
|
|
224
|
+
### photo.getPicturesNavigation() ⇒ <code>string</code>
|
|
225
|
+
Get current pictures navigation mode.
|
|
226
|
+
|
|
227
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
228
|
+
**Returns**: <code>string</code> - The picture navigation mode ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture)
|
|
229
|
+
<a name="Panoramax.components.ui.Photo+setPicturesNavigation"></a>
|
|
230
|
+
|
|
231
|
+
### photo.setPicturesNavigation(pn)
|
|
232
|
+
Switch the allowed navigation between pictures.
|
|
233
|
+
|
|
234
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
235
|
+
|
|
236
|
+
| Param | Type | Description |
|
|
237
|
+
| --- | --- | --- |
|
|
238
|
+
| pn | <code>string</code> | The picture navigation mode ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture) |
|
|
239
|
+
|
|
240
|
+
<a name="Panoramax.components.ui.Photo+forceRefresh"></a>
|
|
241
|
+
|
|
242
|
+
### photo.forceRefresh()
|
|
243
|
+
Force reload of texture and tiles.
|
|
244
|
+
|
|
245
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
246
|
+
<a name="Panoramax.components.ui.Photo+event_picture-loading"></a>
|
|
247
|
+
|
|
248
|
+
### "picture-loading"
|
|
249
|
+
Event for picture starting to load
|
|
250
|
+
|
|
251
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
252
|
+
**Properties**
|
|
253
|
+
|
|
254
|
+
| Name | Type | Description |
|
|
255
|
+
| --- | --- | --- |
|
|
256
|
+
| detail.picId | <code>string</code> | The picture unique identifier |
|
|
257
|
+
| detail.lon | <code>number</code> | Longitude (WGS84) |
|
|
258
|
+
| detail.lat | <code>number</code> | Latitude (WGS84) |
|
|
259
|
+
| detail.x | <code>number</code> | New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West) |
|
|
260
|
+
| detail.y | <code>number</code> | New y position (in degrees) |
|
|
261
|
+
| detail.z | <code>number</code> | New z position (0-100) |
|
|
262
|
+
| detail.first | <code>boolean</code> | True if first picture loaded |
|
|
263
|
+
|
|
264
|
+
<a name="Panoramax.components.ui.Photo+event_picture-preview-started"></a>
|
|
265
|
+
|
|
266
|
+
### "picture-preview-started"
|
|
267
|
+
Event for picture preview
|
|
268
|
+
|
|
269
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
270
|
+
**Properties**
|
|
271
|
+
|
|
272
|
+
| Name | Type | Description |
|
|
273
|
+
| --- | --- | --- |
|
|
274
|
+
| detail.picId | <code>string</code> | The picture ID |
|
|
275
|
+
| detail.coordinates | <code>Array.<number></code> | [x,y] coordinates |
|
|
276
|
+
| detail.direction | <code>number</code> | The theorical picture orientation |
|
|
277
|
+
|
|
278
|
+
<a name="Panoramax.components.ui.Photo+event_picture-preview-stopped"></a>
|
|
279
|
+
|
|
280
|
+
### "picture-preview-stopped"
|
|
281
|
+
Event for end of picture preview
|
|
282
|
+
|
|
283
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
284
|
+
**Properties**
|
|
285
|
+
|
|
286
|
+
| Name | Type | Description |
|
|
287
|
+
| --- | --- | --- |
|
|
288
|
+
| detail.picId | <code>string</code> | The picture ID |
|
|
289
|
+
|
|
290
|
+
<a name="Panoramax.components.ui.Photo+event_view-rotated"></a>
|
|
291
|
+
|
|
292
|
+
### "view-rotated"
|
|
293
|
+
Event for viewer rotation
|
|
294
|
+
|
|
295
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
296
|
+
**Properties**
|
|
297
|
+
|
|
298
|
+
| Name | Type | Description |
|
|
299
|
+
| --- | --- | --- |
|
|
300
|
+
| detail.x | <code>number</code> | New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West) |
|
|
301
|
+
| detail.y | <code>number</code> | New y position (in degrees) |
|
|
302
|
+
| detail.z | <code>number</code> | New Z position (between 0 and 100) |
|
|
303
|
+
|
|
304
|
+
<a name="Panoramax.components.ui.Photo+event_picture-loaded"></a>
|
|
305
|
+
|
|
306
|
+
### "picture-loaded"
|
|
307
|
+
Event for picture load (low-resolution image is loaded)
|
|
308
|
+
|
|
309
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
310
|
+
**Properties**
|
|
311
|
+
|
|
312
|
+
| Name | Type | Description |
|
|
313
|
+
| --- | --- | --- |
|
|
314
|
+
| detail.picId | <code>string</code> | The picture unique identifier |
|
|
315
|
+
| detail.lon | <code>number</code> | Longitude (WGS84) |
|
|
316
|
+
| detail.lat | <code>number</code> | Latitude (WGS84) |
|
|
317
|
+
| detail.x | <code>number</code> | New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West) |
|
|
318
|
+
| detail.y | <code>number</code> | New y position (in degrees) |
|
|
319
|
+
| detail.z | <code>number</code> | New z position (0-100) |
|
|
320
|
+
| detail.first | <code>boolean</code> | True if first picture loaded |
|
|
321
|
+
|
|
322
|
+
<a name="Panoramax.components.ui.Photo+event_picture-tiles-loaded"></a>
|
|
323
|
+
|
|
324
|
+
### "picture-tiles-loaded"
|
|
325
|
+
Event launched when all visible tiles of a picture are loaded
|
|
326
|
+
|
|
327
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
328
|
+
**Properties**
|
|
329
|
+
|
|
330
|
+
| Name | Type | Description |
|
|
331
|
+
| --- | --- | --- |
|
|
332
|
+
| detail.picId | <code>string</code> | The picture unique identifier |
|
|
333
|
+
|
|
334
|
+
<a name="Panoramax.components.ui.Photo+event_transition-duration-changed"></a>
|
|
335
|
+
|
|
336
|
+
### "transition-duration-changed"
|
|
337
|
+
Event for transition duration change
|
|
338
|
+
|
|
339
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
340
|
+
**Properties**
|
|
341
|
+
|
|
342
|
+
| Name | Type | Description |
|
|
343
|
+
| --- | --- | --- |
|
|
344
|
+
| detail.duration | <code>string</code> | New duration (in milliseconds) |
|
|
345
|
+
|
|
346
|
+
<a name="Panoramax.components.ui.Photo+event_sequence-playing"></a>
|
|
347
|
+
|
|
348
|
+
### "sequence-playing"
|
|
349
|
+
Event for sequence starting to play
|
|
350
|
+
|
|
351
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
352
|
+
<a name="Panoramax.components.ui.Photo+event_sequence-stopped"></a>
|
|
353
|
+
|
|
354
|
+
### "sequence-stopped"
|
|
355
|
+
Event for sequence stopped playing
|
|
356
|
+
|
|
357
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
358
|
+
<a name="Panoramax.components.ui.Photo+event_pictures-navigation-changed"></a>
|
|
359
|
+
|
|
360
|
+
### "pictures-navigation-changed"
|
|
361
|
+
Event for pictures navigation mode change
|
|
362
|
+
|
|
363
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
364
|
+
**Properties**
|
|
365
|
+
|
|
366
|
+
| Name | Type | Description |
|
|
367
|
+
| --- | --- | --- |
|
|
368
|
+
| detail.value | <code>string</code> | New mode (any, pic, seq) |
|
|
369
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.Popup"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.Popup ⇐ <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>open</code>](#Panoramax.components.ui.Popup+event_open), [<code>close</code>](#Panoramax.components.ui.Popup+event_close)
|
|
7
|
+
**Element**: pnx-popup
|
|
8
|
+
|
|
9
|
+
* [.Popup](#Panoramax.components.ui.Popup) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
10
|
+
* [new Popup()](#new_Panoramax.components.ui.Popup_new)
|
|
11
|
+
* [.properties](#Panoramax.components.ui.Popup+properties) : <code>Object</code>
|
|
12
|
+
* [.close()](#Panoramax.components.ui.Popup+close)
|
|
13
|
+
* ["open"](#Panoramax.components.ui.Popup+event_open)
|
|
14
|
+
* ["close"](#Panoramax.components.ui.Popup+event_close)
|
|
15
|
+
|
|
16
|
+
<a name="new_Panoramax.components.ui.Popup_new"></a>
|
|
17
|
+
|
|
18
|
+
### new Popup()
|
|
19
|
+
Popup Element displays a full overlay container.
|
|
20
|
+
|
|
21
|
+
**Example**
|
|
22
|
+
```html
|
|
23
|
+
<pnx-popup @close=${() => alert("closed")}>
|
|
24
|
+
<h3>Popup content</h3>
|
|
25
|
+
</pnx-popup>
|
|
26
|
+
```
|
|
27
|
+
<a name="Panoramax.components.ui.Popup+properties"></a>
|
|
28
|
+
|
|
29
|
+
### popup.properties : <code>Object</code>
|
|
30
|
+
Component properties.
|
|
31
|
+
|
|
32
|
+
**Kind**: instance property of [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
33
|
+
**Properties**
|
|
34
|
+
|
|
35
|
+
| Name | Type | Default | Description |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| [visible] | <code>boolean</code> | <code>true</code> | Is the popup visible to user ? |
|
|
38
|
+
|
|
39
|
+
<a name="Panoramax.components.ui.Popup+close"></a>
|
|
40
|
+
|
|
41
|
+
### popup.close()
|
|
42
|
+
Close popup
|
|
43
|
+
|
|
44
|
+
**Kind**: instance method of [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
45
|
+
<a name="Panoramax.components.ui.Popup+event_open"></a>
|
|
46
|
+
|
|
47
|
+
### "open"
|
|
48
|
+
Event for popup opening
|
|
49
|
+
|
|
50
|
+
**Kind**: event emitted by [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
51
|
+
<a name="Panoramax.components.ui.Popup+event_close"></a>
|
|
52
|
+
|
|
53
|
+
### "close"
|
|
54
|
+
Event for popup closing
|
|
55
|
+
|
|
56
|
+
**Kind**: event emitted by [<code>Popup</code>](#Panoramax.components.ui.Popup)
|