@panoramax/web-viewer 3.2.3 → 4.0.0-develop-9f9cf858

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.
Files changed (255) hide show
  1. package/.gitlab-ci.yml +13 -6
  2. package/CHANGELOG.md +56 -1
  3. package/CODE_OF_CONDUCT.md +1 -1
  4. package/README.md +1 -1
  5. package/build/editor.html +10 -1
  6. package/build/index.css +12 -12
  7. package/build/index.css.map +1 -1
  8. package/build/index.html +1 -1
  9. package/build/index.js +2126 -14
  10. package/build/index.js.map +1 -1
  11. package/build/map.html +1 -1
  12. package/build/photo.html +1 -0
  13. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
  14. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
  15. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
  16. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
  17. package/build/viewer.html +12 -1
  18. package/build/widgets.html +1 -0
  19. package/config/jest/mocks.js +201 -0
  20. package/config/paths.js +2 -0
  21. package/config/webpack.config.js +52 -0
  22. package/docs/03_URL_settings.md +14 -16
  23. package/docs/05_Compatibility.md +59 -76
  24. package/docs/09_Develop.md +46 -11
  25. package/docs/90_Releases.md +2 -2
  26. package/docs/images/class_diagram.drawio +60 -45
  27. package/docs/images/class_diagram.jpg +0 -0
  28. package/docs/images/screenshot.jpg +0 -0
  29. package/docs/index.md +135 -0
  30. package/docs/reference/components/core/Basic.md +196 -0
  31. package/docs/reference/components/core/CoverageMap.md +210 -0
  32. package/docs/reference/components/core/Editor.md +224 -0
  33. package/docs/reference/components/core/PhotoViewer.md +307 -0
  34. package/docs/reference/components/core/Viewer.md +350 -0
  35. package/docs/reference/components/layout/BottomDrawer.md +35 -0
  36. package/docs/reference/components/layout/CorneredGrid.md +29 -0
  37. package/docs/reference/components/layout/Mini.md +45 -0
  38. package/docs/reference/components/layout/Tabs.md +45 -0
  39. package/docs/reference/components/menus/MapBackground.md +32 -0
  40. package/docs/reference/components/menus/MapFilters.md +15 -0
  41. package/docs/reference/components/menus/MapLayers.md +15 -0
  42. package/docs/reference/components/menus/MapLegend.md +15 -0
  43. package/docs/reference/components/menus/PictureLegend.md +16 -0
  44. package/docs/reference/components/menus/PictureMetadata.md +15 -0
  45. package/docs/reference/components/menus/PlayerOptions.md +15 -0
  46. package/docs/reference/components/menus/QualityScoreDoc.md +15 -0
  47. package/docs/reference/components/menus/ReportForm.md +15 -0
  48. package/docs/reference/components/menus/ShareMenu.md +15 -0
  49. package/docs/reference/components/ui/Button.md +40 -0
  50. package/docs/reference/components/ui/ButtonGroup.md +36 -0
  51. package/docs/reference/components/ui/CopyButton.md +38 -0
  52. package/docs/reference/components/ui/Grade.md +32 -0
  53. package/docs/reference/components/ui/LinkButton.md +45 -0
  54. package/docs/reference/components/ui/ListGroup.md +22 -0
  55. package/docs/reference/components/ui/Loader.md +56 -0
  56. package/docs/reference/components/ui/Map.md +239 -0
  57. package/docs/reference/components/ui/MapMore.md +256 -0
  58. package/docs/reference/components/ui/Photo.md +385 -0
  59. package/docs/reference/components/ui/Popup.md +56 -0
  60. package/docs/reference/components/ui/ProgressBar.md +32 -0
  61. package/docs/reference/components/ui/QualityScore.md +45 -0
  62. package/docs/reference/components/ui/SearchBar.md +63 -0
  63. package/docs/reference/components/ui/TogglableGroup.md +39 -0
  64. package/docs/reference/components/ui/widgets/GeoSearch.md +32 -0
  65. package/docs/reference/components/ui/widgets/Legend.md +49 -0
  66. package/docs/reference/components/ui/widgets/MapFiltersButton.md +33 -0
  67. package/docs/reference/components/ui/widgets/MapLayersButton.md +15 -0
  68. package/docs/reference/components/ui/widgets/OSMEditors.md +15 -0
  69. package/docs/reference/components/ui/widgets/PictureLegendActions.md +32 -0
  70. package/docs/reference/components/ui/widgets/Player.md +33 -0
  71. package/docs/reference/components/ui/widgets/Zoom.md +15 -0
  72. package/docs/reference/utils/API.md +334 -0
  73. package/docs/reference/utils/InitParameters.md +68 -0
  74. package/docs/reference/utils/URLHandler.md +107 -0
  75. package/docs/reference.md +79 -0
  76. package/docs/shortcuts.md +11 -0
  77. package/docs/tutorials/aerial_imagery.md +19 -0
  78. package/docs/tutorials/authentication.md +10 -0
  79. package/docs/tutorials/custom_widgets.md +59 -0
  80. package/docs/tutorials/map_style.md +39 -0
  81. package/docs/tutorials/migrate_v4.md +153 -0
  82. package/docs/tutorials/synced_coverage.md +43 -0
  83. package/mkdocs.yml +66 -5
  84. package/package.json +22 -17
  85. package/public/editor.html +21 -29
  86. package/public/index.html +17 -12
  87. package/public/map.html +19 -18
  88. package/public/photo.html +55 -0
  89. package/public/viewer.html +22 -26
  90. package/public/widgets.html +306 -0
  91. package/scripts/doc.js +79 -0
  92. package/src/components/core/Basic.css +48 -0
  93. package/src/components/core/Basic.js +349 -0
  94. package/src/components/core/CoverageMap.css +9 -0
  95. package/src/components/core/CoverageMap.js +139 -0
  96. package/src/components/core/Editor.css +23 -0
  97. package/src/components/core/Editor.js +390 -0
  98. package/src/components/core/PhotoViewer.css +48 -0
  99. package/src/components/core/PhotoViewer.js +499 -0
  100. package/src/components/core/Viewer.css +98 -0
  101. package/src/components/core/Viewer.js +564 -0
  102. package/src/components/core/index.js +12 -0
  103. package/src/components/index.js +13 -0
  104. package/src/components/layout/BottomDrawer.js +257 -0
  105. package/src/components/layout/CorneredGrid.js +112 -0
  106. package/src/components/layout/Mini.js +117 -0
  107. package/src/components/layout/Tabs.js +133 -0
  108. package/src/components/layout/index.js +9 -0
  109. package/src/components/menus/MapBackground.js +106 -0
  110. package/src/components/menus/MapFilters.js +400 -0
  111. package/src/components/menus/MapLayers.js +143 -0
  112. package/src/components/menus/MapLegend.js +34 -0
  113. package/src/components/menus/PictureLegend.js +257 -0
  114. package/src/components/menus/PictureMetadata.js +317 -0
  115. package/src/components/menus/PlayerOptions.js +95 -0
  116. package/src/components/menus/QualityScoreDoc.js +36 -0
  117. package/src/components/menus/ReportForm.js +133 -0
  118. package/src/components/menus/Share.js +100 -0
  119. package/src/components/menus/index.js +15 -0
  120. package/src/components/styles.js +383 -0
  121. package/src/components/ui/Button.js +77 -0
  122. package/src/components/ui/ButtonGroup.css +57 -0
  123. package/src/components/ui/ButtonGroup.js +68 -0
  124. package/src/components/ui/CopyButton.js +106 -0
  125. package/src/components/ui/Grade.js +54 -0
  126. package/src/components/ui/LinkButton.js +67 -0
  127. package/src/components/ui/ListGroup.js +66 -0
  128. package/src/components/ui/Loader.js +203 -0
  129. package/src/components/{Map.css → ui/Map.css} +5 -17
  130. package/src/components/{Map.js → ui/Map.js} +148 -156
  131. package/src/components/ui/MapMore.js +324 -0
  132. package/src/components/{Photo.css → ui/Photo.css} +6 -6
  133. package/src/components/{Photo.js → ui/Photo.js} +313 -101
  134. package/src/components/ui/Popup.js +145 -0
  135. package/src/components/ui/ProgressBar.js +104 -0
  136. package/src/components/ui/QualityScore.js +147 -0
  137. package/src/components/ui/SearchBar.js +367 -0
  138. package/src/components/ui/TogglableGroup.js +157 -0
  139. package/src/components/ui/index.js +22 -0
  140. package/src/components/ui/widgets/GeoSearch.css +21 -0
  141. package/src/components/ui/widgets/GeoSearch.js +139 -0
  142. package/src/components/ui/widgets/Legend.js +113 -0
  143. package/src/components/ui/widgets/MapFiltersButton.js +104 -0
  144. package/src/components/ui/widgets/MapLayersButton.js +79 -0
  145. package/src/components/ui/widgets/OSMEditors.js +155 -0
  146. package/src/components/ui/widgets/PictureLegendActions.js +117 -0
  147. package/src/components/ui/widgets/Player.css +7 -0
  148. package/src/components/ui/widgets/Player.js +151 -0
  149. package/src/components/ui/widgets/Zoom.js +82 -0
  150. package/src/components/ui/widgets/index.js +13 -0
  151. package/src/img/loader_base.jpg +0 -0
  152. package/src/img/panoramax.svg +13 -0
  153. package/src/img/switch_big.svg +20 -10
  154. package/src/index.js +7 -9
  155. package/src/translations/br.json +1 -0
  156. package/src/translations/da.json +38 -15
  157. package/src/translations/de.json +5 -3
  158. package/src/translations/en.json +35 -15
  159. package/src/translations/eo.json +38 -15
  160. package/src/translations/es.json +1 -1
  161. package/src/translations/fr.json +36 -16
  162. package/src/translations/hu.json +1 -1
  163. package/src/translations/it.json +39 -16
  164. package/src/translations/ja.json +182 -1
  165. package/src/translations/nl.json +106 -6
  166. package/src/translations/pl.json +1 -1
  167. package/src/translations/sv.json +182 -0
  168. package/src/translations/zh_Hant.json +35 -14
  169. package/src/utils/API.js +109 -49
  170. package/src/utils/InitParameters.js +388 -0
  171. package/src/utils/PhotoAdapter.js +1 -0
  172. package/src/utils/URLHandler.js +362 -0
  173. package/src/utils/geocoder.js +152 -0
  174. package/src/utils/{I18n.js → i18n.js} +7 -3
  175. package/src/utils/index.js +11 -0
  176. package/src/utils/{Map.js → map.js} +256 -77
  177. package/src/utils/picture.js +442 -0
  178. package/src/utils/utils.js +324 -0
  179. package/src/utils/widgets.js +55 -0
  180. package/tests/components/core/Basic.test.js +121 -0
  181. package/tests/components/core/BasicMock.js +25 -0
  182. package/tests/components/core/CoverageMap.test.js +20 -0
  183. package/tests/components/core/Editor.test.js +20 -0
  184. package/tests/components/core/PhotoViewer.test.js +57 -0
  185. package/tests/components/core/Viewer.test.js +84 -0
  186. package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +73 -0
  187. package/tests/components/core/__snapshots__/Viewer.test.js.snap +145 -0
  188. package/tests/components/ui/CopyButton.test.js +52 -0
  189. package/tests/components/ui/Loader.test.js +55 -0
  190. package/tests/components/{Map.test.js → ui/Map.test.js} +73 -61
  191. package/tests/components/{Photo.test.js → ui/Photo.test.js} +97 -63
  192. package/tests/components/ui/Popup.test.js +26 -0
  193. package/tests/components/ui/QualityScore.test.js +18 -0
  194. package/tests/components/ui/SearchBar.test.js +110 -0
  195. package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +33 -0
  196. package/tests/components/ui/__snapshots__/Loader.test.js.snap +56 -0
  197. package/tests/components/{__snapshots__ → ui/__snapshots__}/Map.test.js.snap +11 -38
  198. package/tests/components/{__snapshots__ → ui/__snapshots__}/Photo.test.js.snap +70 -6
  199. package/tests/components/ui/__snapshots__/Popup.test.js.snap +29 -0
  200. package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +11 -0
  201. package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +65 -0
  202. package/tests/utils/API.test.js +83 -83
  203. package/tests/utils/InitParameters.test.js +499 -0
  204. package/tests/utils/URLHandler.test.js +401 -0
  205. package/tests/utils/__snapshots__/API.test.js.snap +10 -0
  206. package/tests/utils/__snapshots__/URLHandler.test.js.snap +21 -0
  207. package/tests/utils/__snapshots__/{Map.test.js.snap → geocoder.test.js.snap} +1 -1
  208. package/tests/utils/__snapshots__/map.test.js.snap +11 -0
  209. package/tests/utils/__snapshots__/picture.test.js.snap +327 -0
  210. package/tests/utils/__snapshots__/widgets.test.js.snap +19 -0
  211. package/tests/utils/geocoder.test.js +37 -0
  212. package/tests/utils/{I18n.test.js → i18n.test.js} +8 -8
  213. package/tests/utils/map.test.js +126 -0
  214. package/tests/utils/picture.test.js +745 -0
  215. package/tests/utils/utils.test.js +288 -0
  216. package/tests/utils/widgets.test.js +31 -0
  217. package/docs/01_Start.md +0 -149
  218. package/docs/02_Usage.md +0 -831
  219. package/docs/04_Advanced_examples.md +0 -216
  220. package/src/Editor.css +0 -37
  221. package/src/Editor.js +0 -361
  222. package/src/StandaloneMap.js +0 -114
  223. package/src/Viewer.css +0 -203
  224. package/src/Viewer.js +0 -1246
  225. package/src/components/CoreView.css +0 -70
  226. package/src/components/CoreView.js +0 -175
  227. package/src/components/Loader.css +0 -74
  228. package/src/components/Loader.js +0 -120
  229. package/src/img/loader_hd.jpg +0 -0
  230. package/src/utils/Exif.js +0 -193
  231. package/src/utils/Utils.js +0 -631
  232. package/src/utils/Widgets.js +0 -562
  233. package/src/viewer/URLHash.js +0 -469
  234. package/src/viewer/Widgets.css +0 -880
  235. package/src/viewer/Widgets.js +0 -1470
  236. package/tests/Editor.test.js +0 -126
  237. package/tests/StandaloneMap.test.js +0 -45
  238. package/tests/Viewer.test.js +0 -366
  239. package/tests/__snapshots__/Editor.test.js.snap +0 -298
  240. package/tests/__snapshots__/StandaloneMap.test.js.snap +0 -30
  241. package/tests/__snapshots__/Viewer.test.js.snap +0 -195
  242. package/tests/components/CoreView.test.js +0 -92
  243. package/tests/components/Loader.test.js +0 -38
  244. package/tests/components/__snapshots__/Loader.test.js.snap +0 -15
  245. package/tests/utils/Exif.test.js +0 -124
  246. package/tests/utils/Map.test.js +0 -113
  247. package/tests/utils/Utils.test.js +0 -300
  248. package/tests/utils/Widgets.test.js +0 -107
  249. package/tests/utils/__snapshots__/Exif.test.js.snap +0 -43
  250. package/tests/utils/__snapshots__/Utils.test.js.snap +0 -41
  251. package/tests/utils/__snapshots__/Widgets.test.js.snap +0 -44
  252. package/tests/viewer/URLHash.test.js +0 -559
  253. package/tests/viewer/Widgets.test.js +0 -127
  254. package/tests/viewer/__snapshots__/URLHash.test.js.snap +0 -108
  255. package/tests/viewer/__snapshots__/Widgets.test.js.snap +0 -403
@@ -0,0 +1,49 @@
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
+ **Slot**: `editors` External links to map editors, or any tool that may be helpful. Defaults to OSM tools (iD & JOSM).
8
+
9
+ * [.Legend](#Panoramax.components.ui.widgets.Legend) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
10
+ * [new Legend()](#new_Panoramax.components.ui.widgets.Legend_new)
11
+ * [.properties](#Panoramax.components.ui.widgets.Legend+properties) : <code>Object</code>
12
+
13
+ <a name="new_Panoramax.components.ui.widgets.Legend_new"></a>
14
+
15
+ ### new Legend()
16
+ Legend widget, handling switch between map and photo components.
17
+ Also displays a default "About Panoramax" message.
18
+
19
+ **Example**
20
+ ```html
21
+ <!-- Default legend -->
22
+ <pnx-widget-legend
23
+ _parent=${viewer}
24
+ focus="map"
25
+ picture="PICTURE-ID-IF-ANY"
26
+ />
27
+
28
+ <!-- With custom editor links -->
29
+ <pnx-widget-legend
30
+ _parent=${viewer}
31
+ focus="map"
32
+ picture="PICTURE-ID-IF-ANY"
33
+ >
34
+ <div slot="editors"><a href="http://my.own.tool">Edit in my own tool</a></div>
35
+ </pnx-widget-legend>
36
+ ```
37
+ <a name="Panoramax.components.ui.widgets.Legend+properties"></a>
38
+
39
+ ### legend.properties : <code>Object</code>
40
+ Component properties.
41
+
42
+ **Kind**: instance property of [<code>Legend</code>](#Panoramax.components.ui.widgets.Legend)
43
+ **Properties**
44
+
45
+ | Name | Type | Description |
46
+ | --- | --- | --- |
47
+ | [focus] | <code>string</code> | The focused main component (map, pic) |
48
+ | [picture] | <code>string</code> | The picture ID |
49
+
@@ -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,15 @@
1
+ <a name="Panoramax.components.ui.widgets.OSMEditors"></a>
2
+
3
+ ## Panoramax.components.ui.widgets.OSMEditors ⇐ <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-osmeditors
7
+ <a name="new_Panoramax.components.ui.widgets.OSMEditors_new"></a>
8
+
9
+ ### new OSMEditors()
10
+ OSM Editors component offers direct links to OpenStreetMap's iD and JOSM editors.
11
+
12
+ **Example**
13
+ ```html
14
+ <pnx-widget-osmeditors _parent=${viewer} />
15
+ ```
@@ -0,0 +1,32 @@
1
+ <a name="Panoramax.components.ui.widgets.PictureLegendActions"></a>
2
+
3
+ ## Panoramax.components.ui.widgets.PictureLegendActions ⇐ <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-picture-legend-actions
7
+
8
+ * [.PictureLegendActions](#Panoramax.components.ui.widgets.PictureLegendActions) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new PictureLegendActions()](#new_Panoramax.components.ui.widgets.PictureLegendActions_new)
10
+ * [.properties](#Panoramax.components.ui.widgets.PictureLegendActions+properties) : <code>Object</code>
11
+
12
+ <a name="new_Panoramax.components.ui.widgets.PictureLegendActions_new"></a>
13
+
14
+ ### new PictureLegendActions()
15
+ Picture Legend Actions is a menu showing up complementary actions for picture legend.
16
+
17
+ **Example**
18
+ ```html
19
+ <pnx-picture-legend-actions _parent=${viewer} />
20
+ ```
21
+ <a name="Panoramax.components.ui.widgets.PictureLegendActions+properties"></a>
22
+
23
+ ### pictureLegendActions.properties : <code>Object</code>
24
+ Component properties.
25
+
26
+ **Kind**: instance property of [<code>PictureLegendActions</code>](#Panoramax.components.ui.widgets.PictureLegendActions)
27
+ **Properties**
28
+
29
+ | Name | Type | Default | Description |
30
+ | --- | --- | --- | --- |
31
+ | [full] | <code>boolean</code> | <code>false</code> | Show advanced actions |
32
+
@@ -0,0 +1,33 @@
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
+ | [size] | <code>string</code> | <code>&quot;xl&quot;</code> | Group size (md, xl) |
33
+
@@ -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,334 @@
1
+ <a name="Panoramax.utils.API"></a>
2
+
3
+ ## Panoramax.utils.API
4
+ **Kind**: static class of <code>Panoramax.utils</code>
5
+ **Emits**: [<code>ready</code>](#Panoramax.utils.API+event_ready), [<code>broken</code>](#Panoramax.utils.API+event_broken)
6
+
7
+ * [.API](#Panoramax.utils.API)
8
+ * [new API(endpoint, [options])](#new_Panoramax.utils.API_new)
9
+ * _instance_
10
+ * [.onceReady()](#Panoramax.utils.API+onceReady) ⇒ <code>Promise</code>
11
+ * [.isReady()](#Panoramax.utils.API+isReady) ⇒ <code>boolean</code>
12
+ * [.getAvailableFeatures()](#Panoramax.utils.API+getAvailableFeatures) ⇒ <code>Array.&lt;string&gt;</code>
13
+ * [.getUnavailableFeatures()](#Panoramax.utils.API+getUnavailableFeatures) ⇒ <code>Array.&lt;string&gt;</code>
14
+ * [.getSequenceItems(seqId, [next], [data])](#Panoramax.utils.API+getSequenceItems) ⇒ <code>Promise</code>
15
+ * [.getPicturesAroundCoordinatesUrl(lat, lon, [factor], [limit], [seqId])](#Panoramax.utils.API+getPicturesAroundCoordinatesUrl) ⇒ <code>string</code>
16
+ * [.getPicturesAroundCoordinates(lat, lon, [factor], [limit], [seqId])](#Panoramax.utils.API+getPicturesAroundCoordinates) ⇒ <code>Promise</code>
17
+ * [.getPictureMetadataUrl(picId, [seqId])](#Panoramax.utils.API+getPictureMetadataUrl) ⇒ <code>string</code>
18
+ * [.getMapStyle()](#Panoramax.utils.API+getMapStyle) ⇒ <code>Promise</code> \| <code>object</code>
19
+ * [.getUserMapStyle(userId, [skipReadyCheck])](#Panoramax.utils.API+getUserMapStyle) ⇒ <code>Promise</code>
20
+ * [.getPictureThumbnailURLForSequence(seqId, [seq])](#Panoramax.utils.API+getPictureThumbnailURLForSequence) ⇒ <code>Promise</code>
21
+ * [.getPictureThumbnailURL(picId, [seqId])](#Panoramax.utils.API+getPictureThumbnailURL) ⇒ <code>Promise</code>
22
+ * [.getRSSURL([bbox])](#Panoramax.utils.API+getRSSURL) ⇒ <code>string</code> \| <code>null</code>
23
+ * [.getSequenceMetadataUrl(seqId)](#Panoramax.utils.API+getSequenceMetadataUrl) ⇒ <code>string</code>
24
+ * [.getDataBbox()](#Panoramax.utils.API+getDataBbox) ⇒ <code>LngLatBoundsLike</code>
25
+ * [.searchUsers(query)](#Panoramax.utils.API+searchUsers) ⇒ <code>Promise</code>
26
+ * [.getUserName(userId)](#Panoramax.utils.API+getUserName) ⇒ <code>Promise</code>
27
+ * [.sendReport(data)](#Panoramax.utils.API+sendReport) ⇒ <code>Promise</code>
28
+ * ["broken"](#Panoramax.utils.API+event_broken)
29
+ * ["ready"](#Panoramax.utils.API+event_ready)
30
+ * _static_
31
+ * [.isValidHttpUrl(str)](#Panoramax.utils.API.isValidHttpUrl) ⇒ <code>boolean</code>
32
+ * [.isIdValid(id)](#Panoramax.utils.API.isIdValid) ⇒ <code>boolean</code>
33
+
34
+ <a name="new_Panoramax.utils.API_new"></a>
35
+
36
+ ### new API(endpoint, [options])
37
+ API contains various utility functions to communicate with Panoramax/STAC API
38
+
39
+
40
+ | Param | Type | Default | Description |
41
+ | --- | --- | --- | --- |
42
+ | 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. |
43
+ | [options] | <code>object</code> | | Options |
44
+ | [options.style] | <code>string</code> \| <code>object</code> | | General map style |
45
+ | [options.tiles] | <code>string</code> | | API route serving pictures & sequences vector tiles |
46
+ | [options.skipReadLanding] | <code>boolean</code> | <code>false</code> | True to not call API landing page automatically |
47
+ | [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)) |
48
+ | [options.users] | <code>Array.&lt;string&gt;</code> | | List of initial user IDs to load map styles for |
49
+
50
+ <a name="Panoramax.utils.API+onceReady"></a>
51
+
52
+ ### api.onceReady() ⇒ <code>Promise</code>
53
+ Resolves when the API is ready to be used.
54
+
55
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
56
+ **Fulfil**: <code>string</code> "API is ready" when initialization is complete.
57
+ **Reject**: <code>string</code> Error message
58
+ <a name="Panoramax.utils.API+isReady"></a>
59
+
60
+ ### api.isReady() ⇒ <code>boolean</code>
61
+ Checks if the API is ready to be used.
62
+
63
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
64
+ **Returns**: <code>boolean</code> - True if the API is ready, false otherwise.
65
+ <a name="Panoramax.utils.API+getAvailableFeatures"></a>
66
+
67
+ ### api.getAvailableFeatures() ⇒ <code>Array.&lt;string&gt;</code>
68
+ List of available features offered by API
69
+
70
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
71
+ **Returns**: <code>Array.&lt;string&gt;</code> - Keywords of enabled features
72
+ <a name="Panoramax.utils.API+getUnavailableFeatures"></a>
73
+
74
+ ### api.getUnavailableFeatures() ⇒ <code>Array.&lt;string&gt;</code>
75
+ List of unavailable features on API
76
+
77
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
78
+ **Returns**: <code>Array.&lt;string&gt;</code> - Keywords of disabled features
79
+ <a name="Panoramax.utils.API+getSequenceItems"></a>
80
+
81
+ ### api.getSequenceItems(seqId, [next], [data]) ⇒ <code>Promise</code>
82
+ Get sequence GeoJSON representation
83
+
84
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
85
+ **Fulfil**: <code>object</code> Sequence GeoJSON
86
+ **Reject**: <code>Error</code> If API is not ready or for any network issue
87
+
88
+ | Param | Type | Default | Description |
89
+ | --- | --- | --- | --- |
90
+ | seqId | <code>string</code> | | The sequence ID |
91
+ | [next] | <code>string</code> | <code>null</code> | The next link URL (only for internals) |
92
+ | [data] | <code>object</code> | <code></code> | The previous dataset (only for internals) |
93
+
94
+ <a name="Panoramax.utils.API+getPicturesAroundCoordinatesUrl"></a>
95
+
96
+ ### api.getPicturesAroundCoordinatesUrl(lat, lon, [factor], [limit], [seqId]) ⇒ <code>string</code>
97
+ Get full URL for listing pictures around a specific location
98
+
99
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
100
+ **Returns**: <code>string</code> - The corresponding URL
101
+
102
+ | Param | Type | Default | Description |
103
+ | --- | --- | --- | --- |
104
+ | lat | <code>number</code> | | Latitude |
105
+ | lon | <code>number</code> | | Longitude |
106
+ | [factor] | <code>number</code> | <code>0.0005</code> | The radius to search around (in degrees) |
107
+ | [limit] | <code>number</code> | | Max amount of pictures to retrieve |
108
+ | [seqId] | <code>string</code> | | The sequence ID to filter on (by default, no filter) |
109
+
110
+ <a name="Panoramax.utils.API+getPicturesAroundCoordinates"></a>
111
+
112
+ ### api.getPicturesAroundCoordinates(lat, lon, [factor], [limit], [seqId]) ⇒ <code>Promise</code>
113
+ Get list of pictures around a specific location
114
+
115
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
116
+ **Fulfil**: <code>object</code> The GeoJSON feature collection
117
+
118
+ | Param | Type | Description |
119
+ | --- | --- | --- |
120
+ | lat | <code>number</code> | Latitude |
121
+ | lon | <code>number</code> | Longitude |
122
+ | [factor] | <code>number</code> | The radius to search around (in degrees) |
123
+ | [limit] | <code>number</code> | Max amount of pictures to retrieve |
124
+ | [seqId] | <code>string</code> | The sequence ID to filter on (by default, no filter) |
125
+
126
+ <a name="Panoramax.utils.API+getPictureMetadataUrl"></a>
127
+
128
+ ### api.getPictureMetadataUrl(picId, [seqId]) ⇒ <code>string</code>
129
+ Get full URL for retrieving a specific picture metadata
130
+
131
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
132
+ **Returns**: <code>string</code> - The corresponding URL
133
+ **Throws**:
134
+
135
+ - <code>Error</code> If API is not ready
136
+
137
+
138
+ | Param | Type | Description |
139
+ | --- | --- | --- |
140
+ | picId | <code>string</code> | The picture unique identifier |
141
+ | [seqId] | <code>string</code> | The sequence ID |
142
+
143
+ <a name="Panoramax.utils.API+getMapStyle"></a>
144
+
145
+ ### api.getMapStyle() ⇒ <code>Promise</code> \| <code>object</code>
146
+ Get JSON style for general vector tiles
147
+
148
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
149
+ **Returns**: <code>Promise</code> \| <code>object</code> - Promise if first load, MapLibre JSON style otherwise
150
+ **Fulfil**: <code>object</code> The MapLibre JSON style
151
+ **Reject**: <code>Error</code> If API is not ready, or no style defined.
152
+ <a name="Panoramax.utils.API+getUserMapStyle"></a>
153
+
154
+ ### api.getUserMapStyle(userId, [skipReadyCheck]) ⇒ <code>Promise</code>
155
+ Get JSON style for specific-user vector tiles
156
+
157
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
158
+ **Fulfil**: <code>object</code> The MapLibre JSON style
159
+ **Reject**: <code>Error</code> If API is not ready, or no style defined.
160
+
161
+ | Param | Type | Default | Description |
162
+ | --- | --- | --- | --- |
163
+ | userId | <code>string</code> | | The user UUID |
164
+ | [skipReadyCheck] | <code>boolean</code> | <code>false</code> | Skip check for API readyness |
165
+
166
+ <a name="Panoramax.utils.API+getPictureThumbnailURLForSequence"></a>
167
+
168
+ ### api.getPictureThumbnailURLForSequence(seqId, [seq]) ⇒ <code>Promise</code>
169
+ Get a picture thumbnail URL for a given sequence
170
+
171
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
172
+ **Throws**:
173
+
174
+ - <code>Error</code> If API is not ready
175
+
176
+ **Fulfil**: <code>string\|null</code> Promise resolving on the picture thumbnail URL, or null if not found
177
+
178
+ | Param | Type | Description |
179
+ | --- | --- | --- |
180
+ | seqId | <code>string</code> | The sequence ID |
181
+ | [seq] | <code>object</code> | The sequence metadata (with links) if already loaded |
182
+
183
+ <a name="Panoramax.utils.API+getPictureThumbnailURL"></a>
184
+
185
+ ### api.getPictureThumbnailURL(picId, [seqId]) ⇒ <code>Promise</code>
186
+ Get thumbnail URL for a specific picture
187
+
188
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
189
+ **Throws**:
190
+
191
+ - <code>Error</code> If API is not ready
192
+
193
+ **Fulfil**: <code>string\|null</code> The corresponding URL on resolve, or null if no thumbnail could be found
194
+
195
+ | Param | Type | Description |
196
+ | --- | --- | --- |
197
+ | picId | <code>string</code> | The picture unique identifier |
198
+ | [seqId] | <code>string</code> | The sequence ID |
199
+
200
+ <a name="Panoramax.utils.API+getRSSURL"></a>
201
+
202
+ ### api.getRSSURL([bbox]) ⇒ <code>string</code> \| <code>null</code>
203
+ Get the RSS feed URL with map parameters (if map is enabled)
204
+
205
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
206
+ **Returns**: <code>string</code> \| <code>null</code> - The URL, or null if no RSS feed is available
207
+ **Throws**:
208
+
209
+ - <code>Error</code> If API is not ready
210
+
211
+
212
+ | Param | Type | Description |
213
+ | --- | --- | --- |
214
+ | [bbox] | <code>LngLatBounds</code> | The map current bounding box, or null if not available |
215
+
216
+ <a name="Panoramax.utils.API+getSequenceMetadataUrl"></a>
217
+
218
+ ### api.getSequenceMetadataUrl(seqId) ⇒ <code>string</code>
219
+ Get full URL for retrieving a specific sequence metadata
220
+
221
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
222
+ **Returns**: <code>string</code> - The corresponding URL
223
+ **Throws**:
224
+
225
+ - <code>Error</code> If API is not ready
226
+
227
+
228
+ | Param | Type | Description |
229
+ | --- | --- | --- |
230
+ | seqId | <code>string</code> | The sequence ID |
231
+
232
+ <a name="Panoramax.utils.API+getDataBbox"></a>
233
+
234
+ ### api.getDataBbox() ⇒ <code>LngLatBoundsLike</code>
235
+ Get available data bounding box
236
+
237
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
238
+ **Returns**: <code>LngLatBoundsLike</code> - The bounding box or null if not available
239
+ **Throws**:
240
+
241
+ - <code>Error</code> If API is not ready
242
+
243
+ <a name="Panoramax.utils.API+searchUsers"></a>
244
+
245
+ ### api.searchUsers(query) ⇒ <code>Promise</code>
246
+ Look for user ID based on user name query
247
+
248
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
249
+ **Throws**:
250
+
251
+ - <code>Error</code> If API is not ready or user search not available
252
+
253
+ **Fulfil**: <code>object\|null</code> List of potential users
254
+
255
+ | Param | Type | Description |
256
+ | --- | --- | --- |
257
+ | query | <code>string</code> | The user name to look for |
258
+
259
+ <a name="Panoramax.utils.API+getUserName"></a>
260
+
261
+ ### api.getUserName(userId) ⇒ <code>Promise</code>
262
+ Get user name based on its ID
263
+
264
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
265
+ **Throws**:
266
+
267
+ - <code>Error</code> If API is not ready
268
+
269
+ **Fulfil**: <code>string\|null</code> The user name (or null if not found)
270
+
271
+ | Param | Type | Description |
272
+ | --- | --- | --- |
273
+ | userId | <code>string</code> | The user UUID |
274
+
275
+ <a name="Panoramax.utils.API+sendReport"></a>
276
+
277
+ ### api.sendReport(data) ⇒ <code>Promise</code>
278
+ Send a report to API
279
+
280
+ **Kind**: instance method of [<code>API</code>](#Panoramax.utils.API)
281
+ **Fulfil**: <code>object</code> The JSON API response
282
+
283
+ | Param | Type | Description |
284
+ | --- | --- | --- |
285
+ | data | <code>object</code> | The input form data |
286
+
287
+ <a name="Panoramax.utils.API+event_broken"></a>
288
+
289
+ ### "broken"
290
+ Event when API is broken.
291
+ This happens on any API loading or map styling issue.
292
+
293
+ **Kind**: event emitted by [<code>API</code>](#Panoramax.utils.API)
294
+ **Properties**
295
+
296
+ | Name | Type | Description |
297
+ | --- | --- | --- |
298
+ | detail.error | <code>Error</code> | The original error |
299
+
300
+ <a name="Panoramax.utils.API+event_ready"></a>
301
+
302
+ ### "ready"
303
+ Event when API is ready to use.
304
+ This happens after initial API read and map styles load.
305
+
306
+ **Kind**: event emitted by [<code>API</code>](#Panoramax.utils.API)
307
+ <a name="Panoramax.utils.API.isValidHttpUrl"></a>
308
+
309
+ ### API.isValidHttpUrl(str) ⇒ <code>boolean</code>
310
+ Checks URL string validity
311
+
312
+ **Kind**: static method of [<code>API</code>](#Panoramax.utils.API)
313
+ **Returns**: <code>boolean</code> - True if valid
314
+
315
+ | Param | Type | Description |
316
+ | --- | --- | --- |
317
+ | str | <code>string</code> | The URL to check |
318
+
319
+ <a name="Panoramax.utils.API.isIdValid"></a>
320
+
321
+ ### API.isIdValid(id) ⇒ <code>boolean</code>
322
+ Checks picture or sequence ID validity
323
+
324
+ **Kind**: static method of [<code>API</code>](#Panoramax.utils.API)
325
+ **Returns**: <code>boolean</code> - True if valid
326
+ **Throws**:
327
+
328
+ - <code>Error</code> If not valid
329
+
330
+
331
+ | Param | Type | Description |
332
+ | --- | --- | --- |
333
+ | id | <code>string</code> | The ID to check |
334
+
@@ -0,0 +1,68 @@
1
+ <a name="Panoramax.utils.InitParameters"></a>
2
+
3
+ ## Panoramax.utils.InitParameters
4
+ **Kind**: static class of <code>Panoramax.utils</code>
5
+
6
+ * [.InitParameters](#Panoramax.utils.InitParameters)
7
+ * [new InitParameters([componentAttrs], [urlParams], [browserStorage])](#new_Panoramax.utils.InitParameters_new)
8
+ * [.getParentInit()](#Panoramax.utils.InitParameters+getParentInit)
9
+ * [.getParentPostInit()](#Panoramax.utils.InitParameters+getParentPostInit)
10
+ * [.getPSVInit()](#Panoramax.utils.InitParameters+getPSVInit)
11
+ * [.getPSVPostInit()](#Panoramax.utils.InitParameters+getPSVPostInit)
12
+ * [.getMapInit()](#Panoramax.utils.InitParameters+getMapInit)
13
+ * [.getMapPostInit()](#Panoramax.utils.InitParameters+getMapPostInit)
14
+
15
+ <a name="new_Panoramax.utils.InitParameters_new"></a>
16
+
17
+ ### new InitParameters([componentAttrs], [urlParams], [browserStorage])
18
+ Merges all URL parameters and component attributes into a single set of coherent settings.
19
+
20
+
21
+ | Param | Type | Description |
22
+ | --- | --- | --- |
23
+ | [componentAttrs] | <code>object</code> | HTML attributes from parent component |
24
+ | [urlParams] | <code>object</code> | Parameters extracted from URL |
25
+ | [browserStorage] | <code>object</code> | Parameters read from local/session storage |
26
+
27
+ <a name="Panoramax.utils.InitParameters+getParentInit"></a>
28
+
29
+ ### initParameters.getParentInit()
30
+ Get core component initialization parameters.
31
+ They must be passed as soon as possible.
32
+
33
+ **Kind**: instance method of [<code>InitParameters</code>](#Panoramax.utils.InitParameters)
34
+ <a name="Panoramax.utils.InitParameters+getParentPostInit"></a>
35
+
36
+ ### initParameters.getParentPostInit()
37
+ Get core component post-initialization parameters.
38
+ They must be passed after first rendering or init.
39
+
40
+ **Kind**: instance method of [<code>InitParameters</code>](#Panoramax.utils.InitParameters)
41
+ <a name="Panoramax.utils.InitParameters+getPSVInit"></a>
42
+
43
+ ### initParameters.getPSVInit()
44
+ Get Photo Sphere Viewer initialization parameters.
45
+ They must be passed as soon as possible.
46
+
47
+ **Kind**: instance method of [<code>InitParameters</code>](#Panoramax.utils.InitParameters)
48
+ <a name="Panoramax.utils.InitParameters+getPSVPostInit"></a>
49
+
50
+ ### initParameters.getPSVPostInit()
51
+ Get Photo Sphere Viewer post-initialization parameters.
52
+ They must be passed after first rendering or init.
53
+
54
+ **Kind**: instance method of [<code>InitParameters</code>](#Panoramax.utils.InitParameters)
55
+ <a name="Panoramax.utils.InitParameters+getMapInit"></a>
56
+
57
+ ### initParameters.getMapInit()
58
+ Get MapLibre GL initialization parameters.
59
+ They must be passed as soon as possible.
60
+
61
+ **Kind**: instance method of [<code>InitParameters</code>](#Panoramax.utils.InitParameters)
62
+ <a name="Panoramax.utils.InitParameters+getMapPostInit"></a>
63
+
64
+ ### initParameters.getMapPostInit()
65
+ Get MapLibre GL post-initialization parameters.
66
+ They must be passed after first rendering or init.
67
+
68
+ **Kind**: instance method of [<code>InitParameters</code>](#Panoramax.utils.InitParameters)