@panoramax/web-viewer 3.0.2-develop-a8ea8e60

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 (125) hide show
  1. package/.dockerignore +6 -0
  2. package/.gitlab-ci.yml +71 -0
  3. package/CHANGELOG.md +428 -0
  4. package/CODE_OF_CONDUCT.md +134 -0
  5. package/Dockerfile +14 -0
  6. package/LICENSE +21 -0
  7. package/README.md +39 -0
  8. package/build/editor.html +1 -0
  9. package/build/index.css +36 -0
  10. package/build/index.css.map +1 -0
  11. package/build/index.html +1 -0
  12. package/build/index.js +25 -0
  13. package/build/index.js.map +1 -0
  14. package/build/map.html +1 -0
  15. package/build/viewer.html +1 -0
  16. package/config/env.js +104 -0
  17. package/config/getHttpsConfig.js +66 -0
  18. package/config/getPackageJson.js +25 -0
  19. package/config/jest/babelTransform.js +29 -0
  20. package/config/jest/cssTransform.js +14 -0
  21. package/config/jest/fileTransform.js +40 -0
  22. package/config/modules.js +134 -0
  23. package/config/paths.js +72 -0
  24. package/config/pnpTs.js +35 -0
  25. package/config/webpack/persistentCache/createEnvironmentHash.js +9 -0
  26. package/config/webpack.config.js +885 -0
  27. package/config/webpackDevServer.config.js +127 -0
  28. package/docs/01_Start.md +149 -0
  29. package/docs/02_Usage.md +828 -0
  30. package/docs/03_URL_settings.md +140 -0
  31. package/docs/04_Advanced_examples.md +214 -0
  32. package/docs/05_Compatibility.md +85 -0
  33. package/docs/09_Develop.md +62 -0
  34. package/docs/90_Releases.md +27 -0
  35. package/docs/images/class_diagram.drawio +129 -0
  36. package/docs/images/class_diagram.jpg +0 -0
  37. package/docs/images/screenshot.jpg +0 -0
  38. package/mkdocs.yml +45 -0
  39. package/package.json +254 -0
  40. package/public/editor.html +54 -0
  41. package/public/favicon.ico +0 -0
  42. package/public/index.html +59 -0
  43. package/public/map.html +53 -0
  44. package/public/viewer.html +67 -0
  45. package/scripts/build.js +217 -0
  46. package/scripts/start.js +176 -0
  47. package/scripts/test.js +52 -0
  48. package/src/Editor.css +37 -0
  49. package/src/Editor.js +359 -0
  50. package/src/StandaloneMap.js +114 -0
  51. package/src/Viewer.css +203 -0
  52. package/src/Viewer.js +1186 -0
  53. package/src/components/CoreView.css +64 -0
  54. package/src/components/CoreView.js +159 -0
  55. package/src/components/Loader.css +56 -0
  56. package/src/components/Loader.js +111 -0
  57. package/src/components/Map.css +65 -0
  58. package/src/components/Map.js +841 -0
  59. package/src/components/Photo.css +36 -0
  60. package/src/components/Photo.js +687 -0
  61. package/src/img/arrow_360.svg +14 -0
  62. package/src/img/arrow_flat.svg +11 -0
  63. package/src/img/arrow_triangle.svg +10 -0
  64. package/src/img/arrow_turn.svg +9 -0
  65. package/src/img/bg_aerial.jpg +0 -0
  66. package/src/img/bg_streets.jpg +0 -0
  67. package/src/img/loader_base.jpg +0 -0
  68. package/src/img/loader_hd.jpg +0 -0
  69. package/src/img/logo_dead.svg +91 -0
  70. package/src/img/marker.svg +17 -0
  71. package/src/img/marker_blue.svg +20 -0
  72. package/src/img/switch_big.svg +44 -0
  73. package/src/img/switch_mini.svg +48 -0
  74. package/src/index.js +10 -0
  75. package/src/translations/de.json +163 -0
  76. package/src/translations/en.json +164 -0
  77. package/src/translations/eo.json +6 -0
  78. package/src/translations/es.json +164 -0
  79. package/src/translations/fi.json +1 -0
  80. package/src/translations/fr.json +164 -0
  81. package/src/translations/hu.json +133 -0
  82. package/src/translations/nl.json +1 -0
  83. package/src/translations/zh_Hant.json +136 -0
  84. package/src/utils/API.js +709 -0
  85. package/src/utils/Exif.js +198 -0
  86. package/src/utils/I18n.js +75 -0
  87. package/src/utils/Map.js +382 -0
  88. package/src/utils/PhotoAdapter.js +45 -0
  89. package/src/utils/Utils.js +568 -0
  90. package/src/utils/Widgets.js +477 -0
  91. package/src/viewer/URLHash.js +334 -0
  92. package/src/viewer/Widgets.css +711 -0
  93. package/src/viewer/Widgets.js +1196 -0
  94. package/tests/Editor.test.js +125 -0
  95. package/tests/StandaloneMap.test.js +44 -0
  96. package/tests/Viewer.test.js +363 -0
  97. package/tests/__snapshots__/Editor.test.js.snap +300 -0
  98. package/tests/__snapshots__/StandaloneMap.test.js.snap +30 -0
  99. package/tests/__snapshots__/Viewer.test.js.snap +195 -0
  100. package/tests/components/CoreView.test.js +91 -0
  101. package/tests/components/Loader.test.js +38 -0
  102. package/tests/components/Map.test.js +230 -0
  103. package/tests/components/Photo.test.js +335 -0
  104. package/tests/components/__snapshots__/Loader.test.js.snap +15 -0
  105. package/tests/components/__snapshots__/Map.test.js.snap +767 -0
  106. package/tests/components/__snapshots__/Photo.test.js.snap +205 -0
  107. package/tests/data/Map_geocoder_ban.json +36 -0
  108. package/tests/data/Map_geocoder_nominatim.json +56 -0
  109. package/tests/data/Viewer_pictures_1.json +148 -0
  110. package/tests/setupTests.js +5 -0
  111. package/tests/utils/API.test.js +906 -0
  112. package/tests/utils/Exif.test.js +124 -0
  113. package/tests/utils/I18n.test.js +28 -0
  114. package/tests/utils/Map.test.js +105 -0
  115. package/tests/utils/Utils.test.js +300 -0
  116. package/tests/utils/Widgets.test.js +107 -0
  117. package/tests/utils/__snapshots__/API.test.js.snap +132 -0
  118. package/tests/utils/__snapshots__/Exif.test.js.snap +43 -0
  119. package/tests/utils/__snapshots__/Map.test.js.snap +48 -0
  120. package/tests/utils/__snapshots__/Utils.test.js.snap +41 -0
  121. package/tests/utils/__snapshots__/Widgets.test.js.snap +44 -0
  122. package/tests/viewer/URLHash.test.js +537 -0
  123. package/tests/viewer/Widgets.test.js +127 -0
  124. package/tests/viewer/__snapshots__/URLHash.test.js.snap +98 -0
  125. package/tests/viewer/__snapshots__/Widgets.test.js.snap +393 -0
package/.dockerignore ADDED
@@ -0,0 +1,6 @@
1
+ /build
2
+ /node_modules
3
+ /.git*
4
+ /demo
5
+ /.vscode
6
+ Dockerfile
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,71 @@
1
+ # Testing
2
+ viewer-test:
3
+ stage: test
4
+ image: node:16
5
+ cache:
6
+ paths:
7
+ - node_modules
8
+ variables:
9
+ CI: 1
10
+ script:
11
+ - npm install --legacy-peer-deps
12
+ - npm run lint
13
+ - npm run test
14
+
15
+ # Release publishing on npm
16
+ viewer-publish:
17
+ stage: deploy
18
+ only:
19
+ refs:
20
+ - tags
21
+ image: node:16
22
+ cache:
23
+ paths:
24
+ - node_modules
25
+ variables:
26
+ CI: 1
27
+ script:
28
+ - npm install --legacy-peer-deps
29
+ - npm run build
30
+ - echo "//registry.npmjs.org/:always-auth=true" > ~/.npmrc
31
+ - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
32
+ - npm publish --userconfig=~/.npmrc --access=public --registry=https://registry.npmjs.org/
33
+
34
+ # Develop publishing on npm
35
+ viewer-publish-develop-tag:
36
+ stage: deploy
37
+ only:
38
+ - develop
39
+ image: node:16
40
+ cache:
41
+ paths:
42
+ - node_modules
43
+ variables:
44
+ CI: 1
45
+ script:
46
+ - npm install --legacy-peer-deps
47
+ - npm run build
48
+ - echo "//registry.npmjs.org/:always-auth=true" > ~/.npmrc
49
+ - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
50
+ - VERSION=`npm view @panoramax/web-viewer version` || VERSION=`npm view geovisio version`
51
+ - npm version --no-git-tag-version $VERSION-develop-$CI_COMMIT_SHORT_SHA
52
+ - npm publish --tag develop --userconfig=~/.npmrc --access=public --registry=https://registry.npmjs.org/
53
+
54
+ # Develop publishing on Gitlab Pages
55
+ pages:
56
+ stage: deploy
57
+ only:
58
+ - develop
59
+ image: node:16
60
+ cache:
61
+ paths:
62
+ - node_modules
63
+ variables:
64
+ CI: 1
65
+ script:
66
+ - npm install --legacy-peer-deps
67
+ - npm run build
68
+ artifacts:
69
+ paths:
70
+ - build
71
+ publish: build
package/CHANGELOG.md ADDED
@@ -0,0 +1,428 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ Before _2.0.0_, Viewer was embed in the [API repository](https://gitlab.com/panoramax/server/api), this changelog only includes features since the split. Older details are present in [API Changelog](https://gitlab.com/panoramax/server/api/-/blob/develop/CHANGELOG.md).
8
+
9
+ ## [Unreleased]
10
+
11
+ ⚠️ Library has been renamed on NPM into `@panoramax/web-viewer`, you are invited to change your dependencies to keep track of new updates.
12
+
13
+ ### Added
14
+ - Support for 🇨🇳 traditionnal Chinese language (`zh_Hant`) thanks to [Kevin32950](https://gitlab.com/kevinlin18)
15
+ - Support for 🇩🇪 German language (`de`) thanks to [Bastian Greshake Tzovaras](https://gitlab.com/gedankenstuecke)
16
+ - Support for 🇪🇸 Spanish language (`es`) thanks to Daniel Callejas Sevilla
17
+ - Viewer new option `iframeBaseURL` which allows to change the start of URL given in "Website integration" code from _Share_ widget.
18
+ - Viewer new option `picturesNavigation` to eventually restrict possible navigation in photo (limit to same sequence or only current picture). Also manageable through `nav` URL hash parameter.
19
+ - An automatic geolocate button added to the address search bar for showing user's position based on GPS on map.
20
+ - Form to send reports about pictures (blur issues, copyright infringement...) against compatible API. This is available in Viewer, click on bottom-right corner legend of a picture, then "Report picture" in metadata popup.
21
+ - In browser console, API information is shown: title, endpoint URL, STAC and GeoVisio versions.
22
+
23
+ ### Changed
24
+ - **Library has been renamed to `Panoramax`** and moved on NPM to `@panoramax/web-viewer` package.
25
+ - Proper support for picture yaw correction (from `Xmp.GPano.PoseHeadingDegrees, Xmp.Camera.Yaw, Exif.MpfInfo.MPFYawAngle` EXIF tags). This replaces the past behaviour of viewer using `GPSImgDirection` as yaw value. A picture can now have a different GPS direction (corresponding to capture direction, geographically speaking) and a yaw correction (relative to camera). This means that **PSV getPosition** and similar functions doesn't return GPS heading value in X, but yaw correction. GPS heading is available through `viewer.psv.getPictureOriginalHeading` function. Functions `getXY` and `getXYZ` stay unchanged in their behaviour (X value is GPS heading).
26
+ - When viewer is loaded inside through an iframe, a lot less widgets are shown for better usability.
27
+ - URL hash parameter `map` can also take a `none` value on first page load to disable viewer map.
28
+ - Viewer popup now has a close button in its top-right corner.
29
+ - Transition between two flat pictures keeps image position and zoom if current view is inside visible image.
30
+ - When a fast enough Internet connection is available (more than 10 MBit/s), flat pictures are loaded in HD instead of SD definition.
31
+ - EXIF tags table in viewer is now sorted alphabetically.
32
+ - URL hash doesn't update until viewer is fully loaded (to avoid broken URL in the while).
33
+ - Button to edit in OSM iD editor directly opens current viewer image.
34
+ - Update of Photo Sphere Viewer to 5.10 (for yaw/pitch/roll fix).
35
+ - Some error messages are dismissable.
36
+
37
+ ### Fixed
38
+ - `selectedPicture` parameter for Viewer was not taken into account at load and blocking everything.
39
+ - Editor orientation change preview was not showing coherent links, they are now removed.
40
+ - Picture orientation symbol where not shown correctly when switching from specific user to general tiles.
41
+ - Sphere correction values were inverted (reported by [Peter Bremer](https://gitlab.com/peter1972)).
42
+ - Click on certain elements of a widget panel could close it unexpectedly.
43
+ - Date filter fields were too large on mobile.
44
+ - Proper support of _cropped panoramas_.
45
+ - JS class names are hard-coded to avoid issues with Webpack/bundled environments.
46
+ - Viewer event `psv:view-rotated` was giving incorrect `x` value when moving around.
47
+
48
+ ## [3.0.2] - 2024-06-26
49
+
50
+ ### Added
51
+ - Metadata for pitch & roll correction are read and used for picture display.
52
+ - Develop version can be tested at [viewer.geovisio.fr](https://viewer.geovisio.fr/).
53
+ - Mkdocs is now used to generate documentation.
54
+ - A warning alerts you when map should be zoomed more for filters to be visible.
55
+ - Legend is reduced by default on mobile, and can be shown on a single click.
56
+
57
+ ### Changed
58
+ - Doc and links changed following Gitlab organization renaming from GeoVisio to Panoramax.
59
+ - Map markers are showing picture type and orientation even before clicking on it.
60
+ - Arrows to change current picture are using are using images instead of 3D model and can't render outside of view.
61
+ - Picture legend (author and date) can be click as a whole instead of just _i_ button.
62
+ - Better handling of multiple picture IDs passed in URL, as well as picture not found in API errors.
63
+ - Skip picture transition animation if playing sequence at high-speed.
64
+ - Search bar is showing up as a reduced button on mobile.
65
+ - Mini-map is reduced by default on mobile.
66
+
67
+ ### Fixed
68
+ - Partially translated language had "undefined" labels showing when no translation was available.
69
+ - `xyz` URL parameter was not correctly restored on initial load.
70
+ - Restore user name in filter widget on page reload.
71
+
72
+ ## [3.0.1] - 2024-05-02
73
+
74
+ ### Fixed
75
+
76
+ - `reloadVectorTiles` function was not working for specific user tiles.
77
+ - RSS link in Viewer _Share_ menu was not embedding map bounding box.
78
+ - Fetch options were not always sent to MapLibre calls.
79
+ - Pictures & sequences colouring was not correct at first load.
80
+ - The label "hidden to public" was not showing up correctly on Standalone Map.
81
+
82
+ ## [3.0.0] - 2024-04-30
83
+
84
+ ⚠️ This release introduces __many breaking changes__, make sure to update your code to follow new namings and function calls.
85
+
86
+ ### Added
87
+ - A new `Editor` view is available, for previewing changes applied to a sequence or picture.
88
+ - In viewer, popup for picture metadata has _Copy to clipboard_ buttons for sequence and picture IDs.
89
+ - Viewer supports printing, either through browser menus (or Ctrl+P) or through _Share_ widget.
90
+ - Viewer GPS precision quality also takes in account EXIF tag `GPSHPositioningError`.
91
+
92
+ ### Changed
93
+ - Source code was __widely refactored__. The new logic is:
94
+ - `Map` and `Photo` are designated as _components_, basic bricks which can be embed elsewhere.
95
+ - `Viewer`, `StandaloneMap` and `Editor` are designated as _views_, which embed either Map, Photo or both. They also add custom logic beyond common behaviour of components.
96
+ - Utilitary functions are moved into various files or `utils` folder.
97
+ - Usage doc was improved, with more links and events associated to their respective classes.
98
+ - Many functions previously in `Viewer` class have moved to _components_:
99
+ - Moved to `components/Photo`: `getXY, getXYZ, getPictureMetadata, getPictureRelativeHeading, goToNextPicture, goToPrevPicture, goToPosition, clearPictureMetadataCache, setPictureHigherContrast (renamed setHigherContrast), setXYZ, getTransitionDuration, setTransitionDuration`
100
+ - Moved to `components/Map`: `reloadVectorTiles, getMapBackground (renamed getBackground), getVisibleUsers, switchVisibleUsers (renamed setVisibleUsers)`
101
+ - Moved to `components/CoreView`: `isSmall (renamed isWidthSmall)`
102
+ - Some events were renamed:
103
+
104
+ | Old event name | New event name |
105
+ | -------------- | -------------- |
106
+ | `map-background-changed` | `map:background-changed` |
107
+ | `users-changed` | `map:users-changed` |
108
+ | `hover` | `map:sequence-hover` |
109
+ | `picture-loading` | `psv:picture-loading` |
110
+ | `picture-loaded` | `psv:picture-loaded` |
111
+ | `picture-preview-started` | `psv:picture-preview-started` |
112
+ | `picture-preview-stopped` | `psv:picture-preview-stopped` |
113
+ | `view-rotated` | `psv:view-rotated` |
114
+ | `picture-tiles-loaded` | `psv:picture-tiles-loaded` |
115
+ | `transition-duration-changed` | `psv:transition-duration-changed` |
116
+
117
+ - In Viewer, double click on reduced widget makes it wide.
118
+ - Demo page has been reworked, to show all available views.
119
+ - Sequences are easier to click on.
120
+ - Viewer metadata popup displays capture date timezone.
121
+ - Improved display of author name if `Author` EXIF tag is set and similar to user account name.
122
+ - EXIF table in viewer metadata popup is collapsed by default.
123
+ - Size of JS bundle reduced (removed or replaced some images, selective FontAwesome imports).
124
+ - Option `style` in viewer has moved to top-level properties (instead of being under `map.style`).
125
+ - Viewer image loading times improved by showing lower resolution if playing at high speed, or if map is expanded.
126
+ - Photo component function `setTransitionDuration` expects a minimal value of 100 instead of 0.
127
+ - Labels from vector tiles are always shown on top of other layers, including STAC API ones.
128
+
129
+ ### Removed
130
+ - Option `picturesTiles` is removed in favor of advertised `xyz` link from STAC API.
131
+ - `Viewer` functions `getMap` and `getPhotoViewer`, in favor of direct properties `map` and `psv`.
132
+ - `Viewer` function `goToPicture`, in favor of `select` function.
133
+
134
+ ### Fixed
135
+ - Popup wasn't opening if a picture didn't have a heading value set.
136
+ - Date filter fields were overflowing in certain cases.
137
+ - Viewer popup was not showing correct value for _GPS dilution of precision_ if value was a fraction (`10/2`).
138
+
139
+
140
+ ## [2.5.1] - 2024-03-08
141
+
142
+ ### Fixed
143
+ - Some map filters where broken due to picture zoom level change from 2.5.0
144
+
145
+
146
+ ## [2.5.0] - 2024-03-07
147
+
148
+ ### Changed
149
+ - In map rendering, pictures exact position are shown from zoom level 15 (instead of 14) to reduce size of vector tiles.
150
+
151
+
152
+ ## [2.4.2] - 2024-03-05
153
+
154
+ ### Fixed
155
+ - Sequence and picture thumbnail popup was not showing/hiding smoothly due to delay introduced in past version.
156
+ - If hash option was disabled, viewer was not loading properly.
157
+
158
+
159
+ ## [2.4.1] - 2024-03-05
160
+
161
+ ### Added
162
+ - Picture metadata are visible in a popup, accessible through picture legend ("_i_" button). It displays summarized information, as well as all EXIF and XMP tags available.
163
+ - A new method in Viewer named `getPictureRelativeHeading` allow to get information about relative heading of camera compared to vehicle movement.
164
+ - A new method in Viewer named `clearPictureMetadataCache` allows to force refresh the metadata of all loaded pictures and map display of selected picture (if any). Useful when a picture or a sequence has changed on server-side after first load.
165
+ - A new event `broken` can be fired by Viewer in case of initial loading error.
166
+
167
+ ### Changed
168
+ - Improved styling of _Share_ panel (better contrast, more icons)
169
+ - Updated Maplibre GL to 3.6.2, PMTiles to 2.11.0, Photo Sphere Viewer to 5.7.0
170
+ - Improved display of place search results (geocoding) by using either returned bounding box (Nominatim) or place type (BAN) for a more precise map positioning
171
+ - Improved performance of thumbnail display
172
+
173
+
174
+ ## [2.4.0] - 2024-01-31
175
+
176
+ ### Added
177
+ - Viewer can be filtered to only display data from a single user. This can be done through user interface, or through parameters (`users`).
178
+
179
+ ### Removed
180
+ - In standalone map, `setFilters` is dropped in favor of `users` parameter passed in constructor.
181
+ - In viewer, `setFilters` doesn't support `user` parameter anymore, in favor of `switchVisibleUsers` and `getVisibleUsers` methods and `users` constructor parameter.
182
+
183
+
184
+ ## [2.3.1] - 2024-01-18
185
+
186
+ ### Added
187
+ - Support of [PMTiles](https://docs.protomaps.com/pmtiles/) as vector tile input data. They have to be declared in your MapLibre style JSON, using a prefixed URL (like `pmtiles://https://example.com/example.pmtiles`). [PMTiles docs](https://docs.protomaps.com/pmtiles/maplibre) can help you.
188
+ - A second map background (for aerial imagery) can be defined, in complement of current streets map rendering. This is done through the `map.raster` parameter, using the [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster).
189
+
190
+ ### Changed
191
+ - User interface reworked to improve readability and usability, both on desktop and mobile.
192
+ - Click on map at low zoom levels (where only sequence geometry is shown) better directs to nearby picture (instead of last one in sequence). Also, in thumbnail popup on mouse hover, a closer picture is shown.
193
+ - Default vector map background is showing worldwide data (instead of only France).
194
+
195
+ ### Fixed
196
+ - Loader showed up when clicking on already selected picture on map.
197
+
198
+ ### Removed
199
+ - Dependency to MapLibre GL Geocoder. Consequently, `geocoder` settings for viewer and map only uses parameter `engine` to choose between Nominatim and BAN geocoding service.
200
+
201
+
202
+ ## [2.3.0] - 2023-11-27
203
+
204
+ ### Added
205
+ - `StandaloneMap` supports now `reloadVectorTiles` function, in a similar fashion as classic viewer.
206
+ - Support of `rel=related` pictures links to travel to nearby, related sequences.
207
+ - Hover on nearby picture arrow in viewer shows picture location in map.
208
+ - 🇭🇺 Hungarian translation (thanks to [Balázs Meskó](https://gitlab.com/meskobalazs))
209
+
210
+ ### Changed
211
+ - Nearby pictures arrows are shown with a color depending of their status (blue if in same sequence, orange if in a nearby sequence).
212
+ - Library _Photo Sphere Viewer_ updated to 5.5.0.
213
+
214
+
215
+ ## [2.2.1] - 2023-10-30
216
+
217
+ ### Added
218
+ - When multiple _producer_ names are associated to a picture, all are shown in details widget (instead of only first one).
219
+
220
+ ### Changed
221
+ - In `StandaloneMap`, the `select` method also make a thumbnail visible on selected feature.
222
+ - The "Move around" widget is not shown when container height is too small.
223
+
224
+
225
+ ## [2.2.0] - 2023-10-10
226
+
227
+ ### Added
228
+ - A `destroy` function is now available to properly get rid of the viewer, which is useful for single-page applications.
229
+ - A new component named `StandaloneMap` is available to show a coverage map of pictures and sequences, without full picture display. It can be controlled programatically.
230
+
231
+ ### Changed
232
+ - Calls to API are now using STAC standard notation for IDs lists (`ids=bla` instead of `ids=["bla"]`). Old notation was based on GeoVisio API misunderstanding of STAC docs. This __breaks compatibility__ with GeoVisio API <= 2.1.4, but makes viewer compatible with any STAC-compliant API.
233
+ - A new button in player advanced settings allows to augment image brightness & contrast (_☀️_ button).
234
+ - Mini map/viewer is now responsive, with a size increasing based on screen size.
235
+ - Photo Sphere Viewer updated to 5.4.3.
236
+
237
+ ### Fixed
238
+ - Invalid map bounding box received from API was preventing viewer from loading. Now, a warning is shown instead in web console.
239
+
240
+
241
+ ## [2.1.4] - 2023-09-05
242
+
243
+ ### Added
244
+ - Custom widgets can be inserted in viewer through `widgets.customWidget` option.
245
+ - A `ready` event is launched by viewer when it has done all its first loading process.
246
+
247
+ ### Changed
248
+ - Advanced examples of how to use the viewer are moved into a dedicated documentation named [04_Advanced_examples](./docs/04_Advanced_examples.md).
249
+
250
+ ### Fixed
251
+ - Default `box-sizing` CSS property (overridden by some CSS frameworks) was breaking size of some widgets. This is now explicitly defined at top-level viewer `div`.
252
+ - Player widget could not init with pre-loaded image metadata due to empty CSS class string.
253
+ - If a STAC item was not having `roles` defined, code was failing.
254
+
255
+
256
+ ## [2.1.3] - 2023-08-30
257
+
258
+ ### Added
259
+ - A widget allows to change speed of sequence playing. It actually changes the duration of stay on a single picture on sequence playing. The speed can also be changed programmatically.
260
+ - Viewer displays a _RSS_ button in _Share_ panel to have a feed of recently uploaded sequences on visible map area. This is shown only if API landing page advertises RSS feed availability.
261
+ - In _Filters_ panel, the map color scheme can be changed to visually find sequences and pictures based on their capture "age" or camera type.
262
+ - Selected sequence is shown on map with a different color (blue).
263
+
264
+ ### Changed
265
+ - In _Share_ panel, current page, RSS and HD image links are grouped into a _Links_ section, replacing the previous _Link to this page_ section.
266
+ - When applying filters, if map is at a zoom level < 7, it zooms automatically to zoom 7 to make applied filters having a visible effect on map data.
267
+ - Legend is also shown in mini map/picture component, not only on main component.
268
+ - JOSM link now only zoom on picture area (instead of zooming and downloading data) for smoother transitions. Also, zoomed area takes into account picture heading for better positioning.
269
+ - In a flat picture sequence, avoid picture viewer rotation if angle between two pictures is more than 1/8 of a circle (to avoid 🤢).
270
+ - Transitions in 360° sequences are fine-tuned according to relative orientation in viewer (fade effect and rotation only if looking in capture path direction).
271
+
272
+ ### Fixed
273
+ - In _Filters_ panel, clicking on _Enter_ key was resetting all input fields.
274
+ - Thumbnails were not updating when mouse wasn't going out of pictures/sequences layer ([reported by Stéphane Peneau](https://gitlab.com/panoramax/clients/web-viewer/-/issues/40)).
275
+ - Map picture pointer was not pointing to correct direction during picture loading ([reported by Stéphane Peneau](https://gitlab.com/panoramax/clients/web-viewer/-/issues/39)).
276
+ - Map had an empty background if no vector tiles were available on some places, now a white background is always shown.
277
+
278
+
279
+ ## [2.1.2] - 2023-08-20
280
+
281
+ ### Added
282
+ - A new widget is available on map to filter shown pictures by date, type (flat/equirectangular) or camera. Pictures are filtered only on zoom levels >= 7 (due to availability of required metadata in vector tiles). Filters are also persisted in URL hash with new parameters (`date_from`, `date_to`, `pic_type`, `camera`).
283
+ - In "share" button, links to edit OpenStreetMap with iD and JOSM editors are now available. JOSM is automatically synced when a new picture is loaded. iD editor instance to use can be changed through `widgets.editIdUrl` Viewer parameter.
284
+ - Keyboard shortcuts are introduced for all actions in the viewer ([listed here](./docs/01_Start.md)).
285
+
286
+ ### Changed
287
+ - Transition between pictures and sequences are perfectly synced ([thanks to Damien Sorel](https://github.com/mistic100/Photo-Sphere-Viewer/issues/1049)).
288
+
289
+
290
+ ## [2.1.1] - 2023-08-01
291
+
292
+ ### Added
293
+ - Meaningful error messages are displayed when possible (instead of generic message)
294
+ - A "share" button allows to get direct link to current viewer, and offers ready-to-paste iframe snippet
295
+
296
+ ### Changed
297
+ - Buttons and widgets have coherent design and behaviour between map and photo viewer
298
+
299
+
300
+ ## [2.1.0] - 2023-07-20
301
+
302
+ Empty release to follow the API's minor version
303
+
304
+ ## [2.0.7] - 2023-07-10
305
+
306
+ ### Added
307
+ - A new function `reloadVectorTiles` allows users to force full refresh of GeoVisio/STAC API tiles, for example to reflect backend changes done on sequences or pictures data.
308
+
309
+ ### Changed
310
+ - Map is updated sooner to be more in sync when loading incoming picture
311
+
312
+ ### Fixed
313
+ - Thumbnail of hidden sequences where not correctly shown
314
+
315
+
316
+ ## [2.0.6] - 2023-06-30
317
+
318
+ ### Added
319
+ - A `fetchOptions` parameter for Viewer allows to embed custom settings for internal `fetch` calls, for example to enable authenticated calls against API
320
+ - Hidden sequences or pictures for an user are shown on map if user is authenticated (rendered in a gray tone)
321
+ - A loader screen is shown while API, map and first picture loads. It also displays an user-friendly error message if necessary.
322
+
323
+ ### Changed
324
+ - Transitions between flat pictures are smoother
325
+ - Arrows are more visible in zoom 0 to 70% for classic pictures
326
+
327
+
328
+ ## [2.0.5] - 2023-06-09
329
+
330
+ ### Changed
331
+ - Transition between pictures is lowered to 500ms
332
+
333
+ ### Fixed
334
+ - Viewer was not showing vector tiles anymore for GeoVisio API <= 2.0.1
335
+
336
+
337
+ ## [2.0.4] - 2023-06-08
338
+
339
+ ### Changed
340
+ - Read sequence info from vector tiles if available
341
+
342
+ ## [2.0.3] - 2023-06-08
343
+
344
+ ### Changed
345
+ - Viewer calls API based on its advertised capabilities in its landing page, so many API calls are faster. This is particularly useful for __tiles URL__, which can be now determined based on API response, making it not necessary to define it on Viewer settings.
346
+ - Viewer `endpoint` parameter should now be a direct link to API landing page, instead of its search endpoint.
347
+
348
+ ### Fixed
349
+ - Default image shown at start is better oriented
350
+
351
+
352
+ ## [2.0.2] - 2023-06-05
353
+
354
+ ### Added
355
+ - A download button is shown to get the HD picture currently shown by viewer.
356
+ - Version and git commit are shown at viewer start-up in web browser console.
357
+
358
+ ### Changed
359
+ - Map maximum zoom is set by default to 24, but still can be changed through Viewer `options.map.maxZoom` parameter.
360
+ - Error message from viewer doesn't block using navbar
361
+
362
+
363
+ ## [2.0.1] - 2023-05-26
364
+
365
+ ### Added
366
+ - Support of translations of viewer labels. This is defined based on user browser preferences, or a `lang` setting that can be passed to Viewer. Available languages are English (`en`) and French (`fr`).
367
+
368
+ ### Changed
369
+ - Updated Photo Sphere Viewer to 1.5.0, solves some low-quality display issues
370
+
371
+ ### Fixed
372
+ - Label shown on small action button (bottom left corner) was showing [wrong label when map was hidden](https://gitlab.com/panoramax/clients/web-viewer/-/issues/16)
373
+
374
+
375
+ ## [2.0.0] - 2023-04-27
376
+
377
+ ### Added
378
+
379
+ - Publish a `geovisio@develop` viewer version on NPM for each commit on the `develop` branch. You can depend on this version if you like to live on the edge.
380
+ - Viewer displays the name of picture author, next to the picture date.
381
+ - Viewer offers a search bar to easily find a street or city on map. It can use either _Nominatim_ or _Base Adresse Nationale_ geocoders, as well as your own geocoder engine.
382
+ - A download button allows to download full-resolution image directly
383
+
384
+ ### Changed
385
+
386
+ - Viewer dependencies have been updated :
387
+ - Photo Sphere Viewer 5.1 (inducing __breaking changes__)
388
+ - MapLibre 2.4
389
+ - JS Library Boilerplate 2.7
390
+ - Viewer unit tests are covering a broader part of functionalities. To make this possible, Photo Sphere Viewer is differently associated to GeoVisio viewer (as a property `this.psv` instead of GeoVisio inheriting directly from PSV). Original PSV object is accessible through `getPhotoViewer` function.
391
+ - Linked to previous point, map and photo viewer are two distinct DOM elements in a main GeoVisio container. Many CSS classes have been changed, and `setMapWide` JS function renamed into `setFocus`.
392
+ - Improved rendering of flat, vertical images in viewer and thumbnail.
393
+ - Improved error messages for missing parameters in the Viewer initialization
394
+ - Viewer has a better rendering on small-screen devices
395
+
396
+ ### Fixed
397
+
398
+ - Map couldn't be disabled due to an error with URL `hash` handling
399
+ - MapLibre was raising issues on built versions on NPM
400
+ - [A Photo Sphere Viewer under Chrome issue](https://github.com/mistic100/Photo-Sphere-Viewer/issues/937) was making classic pictures not visible
401
+
402
+
403
+ [Unreleased]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/3.0.2...develop
404
+ [3.0.2]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/3.0.1...3.0.2
405
+ [3.0.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/3.0.0...3.0.1
406
+ [3.0.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.5.1...3.0.0
407
+ [2.5.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.5.0...2.5.1
408
+ [2.5.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.4.2...2.5.0
409
+ [2.4.2]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.4.1...2.4.2
410
+ [2.4.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.4.0...2.4.1
411
+ [2.4.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.3.1...2.4.0
412
+ [2.3.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.3.0...2.3.1
413
+ [2.3.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.2.1...2.3.0
414
+ [2.2.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.2.0...2.2.1
415
+ [2.2.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.1.4...2.2.0
416
+ [2.1.4]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.1.3...2.1.4
417
+ [2.1.3]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.1.2...2.1.3
418
+ [2.1.2]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.1.1...2.1.2
419
+ [2.1.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.1.0...2.1.1
420
+ [2.1.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.7...2.1.0
421
+ [2.0.7]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.6...2.0.7
422
+ [2.0.6]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.5...2.0.6
423
+ [2.0.5]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.4...2.0.5
424
+ [2.0.4]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.3...2.0.4
425
+ [2.0.3]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.2...2.0.3
426
+ [2.0.2]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.1...2.0.2
427
+ [2.0.1]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/2.0.0...2.0.1
428
+ [2.0.0]: https://gitlab.com/panoramax/clients/web-viewer/-/compare/1.5.0...2.0.0
@@ -0,0 +1,134 @@
1
+
2
+ # Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, caste, color, religion, or sexual
11
+ identity and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
15
+
16
+ ## Our Standards
17
+
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
20
+
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the overall
27
+ community
28
+
29
+ Examples of unacceptable behavior include:
30
+
31
+ * The use of sexualized language or imagery, and sexual attention or advances of
32
+ any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
34
+ * Public or private harassment
35
+ * Publishing others' private information, such as a physical or email address,
36
+ without their explicit permission
37
+ * Other conduct which could reasonably be considered inappropriate in a
38
+ professional setting
39
+
40
+ ## Enforcement Responsibilities
41
+
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
46
+
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
51
+
52
+ ## Scope
53
+
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
59
+
60
+ ## Enforcement
61
+
62
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
+ reported to the community leaders responsible for enforcement at panieravide@riseup.net
64
+
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series of
87
+ actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or permanent
94
+ ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within the
114
+ community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.1, available at
120
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127
+ [https://www.contributor-covenant.org/translations][translations].
128
+
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
134
+
package/Dockerfile ADDED
@@ -0,0 +1,14 @@
1
+ FROM node:16-alpine
2
+
3
+ RUN npm update -g \
4
+ && npm update -g npm
5
+
6
+ WORKDIR /src
7
+
8
+ # To be able to be docker cache friendly, we first install dependencies
9
+ COPY ./package*.json ./
10
+ RUN npm install --legacy-peer-deps
11
+
12
+ # Build viewer
13
+ COPY ./ ./
14
+ RUN npm run build