@panoramax/web-viewer 4.4.0-develop-3839b5a4 → 4.4.0-develop-f91f6758
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/{src → build}/components/core/Basic.js +22 -16
- package/{src → build}/components/core/CoverageMap.js +19 -14
- package/{src → build}/components/core/Editor.js +16 -16
- package/{src → build}/components/core/PhotoViewer.js +30 -29
- package/{src → build}/components/core/Viewer.js +21 -20
- package/build/components/core/index.js +10 -0
- package/build/components/index.js +11 -0
- package/build/components/index_photoviewer.js +6 -0
- package/{src → build}/components/layout/BottomDrawer.js +4 -4
- package/{src → build}/components/layout/CorneredGrid.js +1 -1
- package/{src → build}/components/layout/Mini.js +5 -4
- package/{src → build}/components/layout/Tabs.js +1 -1
- package/build/components/layout/index.js +9 -0
- package/{src → build}/components/menus/LocationPrecisionDoc.js +4 -6
- package/{src → build}/components/menus/MapBackground.js +4 -6
- package/{src → build}/components/menus/MapFilters.js +16 -21
- package/{src → build}/components/menus/MapLayers.js +20 -24
- package/{src → build}/components/menus/MapLegend.js +3 -4
- package/{src → build}/components/menus/MiniPictureLegend.js +3 -4
- package/{src → build}/components/menus/PictureLegend.js +10 -15
- package/{src → build}/components/menus/PictureMetadata.js +12 -19
- package/{src → build}/components/menus/PlayerOptions.js +5 -7
- package/{src → build}/components/menus/QualityScoreDoc.js +3 -4
- package/{src → build}/components/menus/ReportForm.js +8 -9
- package/{src → build}/components/menus/SemanticsDoc.js +3 -4
- package/{src → build}/components/menus/SemanticsDownload.js +3 -3
- package/{src → build}/components/menus/SemanticsFilters.js +7 -8
- package/{src → build}/components/menus/SemanticsList.js +11 -18
- package/{src → build}/components/menus/SemanticsMetadata.js +8 -11
- package/{src → build}/components/menus/Share.js +6 -7
- package/build/components/menus/index.js +22 -0
- package/build/components/menus/index_photoviewer.js +11 -0
- package/{src → build}/components/styles.js +0 -2
- package/{src → build}/components/ui/AnnotationsSwitch.js +6 -8
- package/{src → build}/components/ui/Button.js +1 -1
- package/{src → build}/components/ui/ButtonGroup.js +2 -1
- package/{src → build}/components/ui/CopyButton.js +4 -6
- package/{src → build}/components/ui/Grade.js +5 -5
- package/{src → build}/components/ui/GradeFilter.js +3 -3
- package/{src → build}/components/ui/IconSwitch.js +1 -1
- package/{src → build}/components/ui/LinkButton.js +1 -1
- package/{src → build}/components/ui/ListGroup.js +3 -3
- package/{src → build}/components/ui/ListItem.js +1 -1
- package/{src → build}/components/ui/Loader.js +8 -7
- package/{src → build}/components/ui/Map.js +38 -26
- package/{src → build}/components/ui/MapMore.js +7 -7
- package/{src → build}/components/ui/Photo.js +29 -27
- package/{src → build}/components/ui/Popup.js +4 -4
- package/{src → build}/components/ui/QualityScore.js +4 -4
- package/{src → build}/components/ui/SearchBar.js +6 -7
- package/{src → build}/components/ui/SemanticsEditor.js +14 -15
- package/{src → build}/components/ui/SemanticsTable.js +4 -5
- package/{src → build}/components/ui/Switch.js +1 -1
- package/{src → build}/components/ui/TogglableGroup.js +4 -4
- package/build/components/ui/index.js +29 -0
- package/build/components/ui/index_photoviewer.js +21 -0
- package/{src → build}/components/ui/widgets/CopyCoordinates.js +5 -5
- package/{src → build}/components/ui/widgets/GeoSearch.js +10 -10
- package/{src → build}/components/ui/widgets/Legend.js +9 -8
- package/{src → build}/components/ui/widgets/LevelSelect.js +9 -7
- package/{src → build}/components/ui/widgets/MapFiltersButton.js +5 -5
- package/{src → build}/components/ui/widgets/MapLayersButton.js +5 -5
- package/{src → build}/components/ui/widgets/OSMEditors.js +8 -8
- package/{src → build}/components/ui/widgets/PictureLegendActions.js +4 -4
- package/{src → build}/components/ui/widgets/Player.js +6 -7
- package/{src → build}/components/ui/widgets/SemanticsFiltersButton.js +6 -7
- package/{src → build}/components/ui/widgets/Zoom.js +6 -6
- package/build/components/ui/widgets/index.js +16 -0
- package/build/components/ui/widgets/index_photoviewer.js +7 -0
- package/build/editor.html +94 -10
- package/{src → build}/img/arrow_triangle.svg +0 -1
- package/{src → build}/img/arrow_turn.svg +0 -1
- package/build/index.html +111 -1
- package/build/index.js +6 -95
- package/build/index_photoviewer.js +4 -0
- package/build/map.html +97 -1
- package/build/package.json +141 -0
- package/build/photo.html +85 -1
- package/build/servers.js +3 -4
- package/{src → build}/utils/API.js +33 -33
- package/{src → build}/utils/InitParameters.js +11 -9
- package/{src → build}/utils/MapStyleComposer.js +39 -37
- package/{src → build}/utils/PhotoAdapter.js +1 -0
- package/{src → build}/utils/PresetsManager.js +4 -4
- package/{src → build}/utils/SemanticsMapProtocol.js +3 -4
- package/{src → build}/utils/URLHandler.js +16 -14
- package/{src → build}/utils/geocoder.js +5 -5
- package/{src → build}/utils/i18n.js +21 -20
- package/build/utils/index.js +17 -0
- package/build/utils/index_photoviewer.js +14 -0
- package/{src → build}/utils/indoor.js +9 -5
- package/{src → build}/utils/map.js +15 -11
- package/{src → build}/utils/picture.js +22 -17
- package/{src → build}/utils/semantics.js +9 -5
- package/{src → build}/utils/utils.js +8 -4
- package/{src → build}/utils/widgets.js +2 -2
- package/build/viewer.html +120 -35
- package/build/viewer_indoor.html +90 -8
- package/build/widgets.html +410 -1
- package/package.json +81 -204
- package/.dockerignore +0 -7
- package/.gitlab-ci.yml +0 -78
- package/CHANGELOG.md +0 -853
- package/CODE_OF_CONDUCT.md +0 -134
- package/Dockerfile +0 -14
- package/build/index.css +0 -36
- package/build/index.css.map +0 -1
- package/build/index.js.map +0 -1
- package/build/photoviewer.css +0 -36
- package/build/photoviewer.css.map +0 -1
- package/build/photoviewer.js +0 -86
- package/build/photoviewer.js.map +0 -1
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
- package/config/env.js +0 -104
- package/config/getHttpsConfig.js +0 -69
- package/config/getPackageJson.js +0 -25
- package/config/jest/babelTransform.js +0 -29
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileTransform.js +0 -40
- package/config/jest/mocks.js +0 -230
- package/config/modules.js +0 -134
- package/config/paths.js +0 -76
- package/config/pnpTs.js +0 -35
- package/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/config/webpack.config.js +0 -825
- package/config/webpackDevServer.config.js +0 -131
- package/docs/03_URL_settings.md +0 -218
- package/docs/05_Compatibility.md +0 -83
- package/docs/09_Develop.md +0 -141
- package/docs/90_Releases.md +0 -27
- package/docs/images/class_diagram.drawio +0 -144
- package/docs/images/class_diagram.jpg +0 -0
- package/docs/images/comparative_3drender.jpg +0 -0
- package/docs/images/indoor_level.png +0 -0
- package/docs/images/screenshot.jpg +0 -0
- package/docs/index.md +0 -159
- package/docs/reference/components/core/Basic.md +0 -211
- package/docs/reference/components/core/CoverageMap.md +0 -220
- package/docs/reference/components/core/Editor.md +0 -252
- package/docs/reference/components/core/PhotoViewer.md +0 -320
- package/docs/reference/components/core/Viewer.md +0 -398
- package/docs/reference/components/layout/BottomDrawer.md +0 -35
- package/docs/reference/components/layout/CorneredGrid.md +0 -29
- package/docs/reference/components/layout/Mini.md +0 -45
- package/docs/reference/components/layout/Tabs.md +0 -46
- package/docs/reference/components/menus/LocationPrecisionDoc.md +0 -15
- package/docs/reference/components/menus/MapBackground.md +0 -32
- package/docs/reference/components/menus/MapFilters.md +0 -37
- package/docs/reference/components/menus/MapLayers.md +0 -15
- package/docs/reference/components/menus/MapLegend.md +0 -32
- package/docs/reference/components/menus/MiniPictureLegend.md +0 -15
- package/docs/reference/components/menus/PictureLegend.md +0 -45
- package/docs/reference/components/menus/PictureMetadata.md +0 -32
- package/docs/reference/components/menus/PlayerOptions.md +0 -15
- package/docs/reference/components/menus/QualityScoreDoc.md +0 -15
- package/docs/reference/components/menus/ReportForm.md +0 -15
- package/docs/reference/components/menus/SemanticsDoc.md +0 -15
- package/docs/reference/components/menus/SemanticsDownload.md +0 -15
- package/docs/reference/components/menus/SemanticsFilters.md +0 -33
- package/docs/reference/components/menus/SemanticsList.md +0 -97
- package/docs/reference/components/menus/SemanticsMetadata.md +0 -15
- package/docs/reference/components/menus/ShareMenu.md +0 -32
- package/docs/reference/components/ui/AnnotationsSwitch.md +0 -32
- package/docs/reference/components/ui/Button.md +0 -40
- package/docs/reference/components/ui/ButtonGroup.md +0 -36
- package/docs/reference/components/ui/CopyButton.md +0 -41
- package/docs/reference/components/ui/Grade.md +0 -32
- package/docs/reference/components/ui/GradeFilter.md +0 -42
- package/docs/reference/components/ui/IconSwitch.md +0 -53
- package/docs/reference/components/ui/LinkButton.md +0 -45
- package/docs/reference/components/ui/ListGroup.md +0 -22
- package/docs/reference/components/ui/ListItem.md +0 -39
- package/docs/reference/components/ui/Loader.md +0 -56
- package/docs/reference/components/ui/Map.md +0 -150
- package/docs/reference/components/ui/MapMore.md +0 -150
- package/docs/reference/components/ui/Photo.md +0 -495
- package/docs/reference/components/ui/Popup.md +0 -56
- package/docs/reference/components/ui/ProgressBar.md +0 -32
- package/docs/reference/components/ui/QualityScore.md +0 -45
- package/docs/reference/components/ui/SearchBar.md +0 -63
- package/docs/reference/components/ui/SemanticsEditor.md +0 -113
- package/docs/reference/components/ui/SemanticsTable.md +0 -32
- package/docs/reference/components/ui/Switch.md +0 -49
- package/docs/reference/components/ui/TogglableGroup.md +0 -39
- package/docs/reference/components/ui/widgets/CopyCoordinates.md +0 -32
- package/docs/reference/components/ui/widgets/GeoSearch.md +0 -36
- package/docs/reference/components/ui/widgets/Legend.md +0 -58
- package/docs/reference/components/ui/widgets/LevelSelect.md +0 -16
- package/docs/reference/components/ui/widgets/MapFiltersButton.md +0 -37
- package/docs/reference/components/ui/widgets/MapLayersButton.md +0 -15
- package/docs/reference/components/ui/widgets/OSMEditors.md +0 -15
- package/docs/reference/components/ui/widgets/PictureLegendActions.md +0 -32
- package/docs/reference/components/ui/widgets/Player.md +0 -34
- package/docs/reference/components/ui/widgets/SemanticsFiltersButton.md +0 -15
- package/docs/reference/components/ui/widgets/Zoom.md +0 -15
- package/docs/reference/utils/API.md +0 -389
- package/docs/reference/utils/InitParameters.md +0 -68
- package/docs/reference/utils/MapStyleComposer.md +0 -408
- package/docs/reference/utils/PanoraMapProtocol.md +0 -28
- package/docs/reference/utils/PresetsManager.md +0 -43
- package/docs/reference/utils/SemanticsMapProtocol.md +0 -43
- package/docs/reference/utils/URLHandler.md +0 -114
- package/docs/reference.md +0 -99
- package/docs/shortcuts.md +0 -11
- package/docs/tutorials/aerial_imagery.md +0 -21
- package/docs/tutorials/authentication.md +0 -10
- package/docs/tutorials/custom_widgets.md +0 -59
- package/docs/tutorials/indoor_maps.md +0 -50
- package/docs/tutorials/map_style.md +0 -83
- package/docs/tutorials/migrate_v4.md +0 -153
- package/docs/tutorials/migrate_v5.md +0 -103
- package/docs/tutorials/semantics_overlays.md +0 -74
- package/docs/tutorials/synced_coverage.md +0 -43
- package/mkdocs.yml +0 -131
- package/public/editor.html +0 -53
- package/public/index.html +0 -70
- package/public/map.html +0 -55
- package/public/photo.html +0 -43
- package/public/servers.js +0 -15
- package/public/viewer.html +0 -79
- package/public/viewer_indoor.html +0 -48
- package/public/widgets.html +0 -366
- package/scripts/build.js +0 -217
- package/scripts/doc.js +0 -79
- package/scripts/start.js +0 -172
- package/scripts/test.js +0 -52
- package/src/components/core/index.js +0 -12
- package/src/components/index.js +0 -13
- package/src/components/index_photoviewer.js +0 -8
- package/src/components/layout/index.js +0 -9
- package/src/components/menus/index.js +0 -22
- package/src/components/menus/index_photoviewer.js +0 -13
- package/src/components/ui/index.js +0 -29
- package/src/components/ui/index_photoviewer.js +0 -23
- package/src/components/ui/widgets/index.js +0 -16
- package/src/components/ui/widgets/index_photoviewer.js +0 -9
- package/src/index.js +0 -8
- package/src/index_photoviewer.js +0 -6
- package/src/utils/index.js +0 -17
- package/src/utils/index_photoviewer.js +0 -16
- package/tests/components/core/Basic.test.js +0 -168
- package/tests/components/core/BasicMock.js +0 -25
- package/tests/components/core/CoverageMap.test.js +0 -20
- package/tests/components/core/Editor.test.js +0 -20
- package/tests/components/core/PhotoViewer.test.js +0 -57
- package/tests/components/core/Viewer.test.js +0 -85
- package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +0 -96
- package/tests/components/core/__snapshots__/Viewer.test.js.snap +0 -188
- package/tests/components/ui/CopyButton.test.js +0 -52
- package/tests/components/ui/Loader.test.js +0 -55
- package/tests/components/ui/Map.test.js +0 -145
- package/tests/components/ui/Photo.test.js +0 -437
- package/tests/components/ui/Popup.test.js +0 -26
- package/tests/components/ui/QualityScore.test.js +0 -18
- package/tests/components/ui/SearchBar.test.js +0 -110
- package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +0 -33
- package/tests/components/ui/__snapshots__/Loader.test.js.snap +0 -56
- package/tests/components/ui/__snapshots__/Map.test.js.snap +0 -16
- package/tests/components/ui/__snapshots__/Photo.test.js.snap +0 -263
- package/tests/components/ui/__snapshots__/Popup.test.js.snap +0 -29
- package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +0 -11
- package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +0 -65
- package/tests/data/Map_geocoder_ban.json +0 -36
- package/tests/data/Map_geocoder_nominatim.json +0 -41
- package/tests/data/Viewer_pictures_1.json +0 -148
- package/tests/setupTests.js +0 -5
- package/tests/utils/API.test.js +0 -752
- package/tests/utils/InitParameters.test.js +0 -599
- package/tests/utils/MapStyleComposer.test.js +0 -697
- package/tests/utils/PresetsManager.test.js +0 -123
- package/tests/utils/URLHandler.test.js +0 -587
- package/tests/utils/__snapshots__/API.test.js.snap +0 -40
- package/tests/utils/__snapshots__/MapStyleComposer.test.js.snap +0 -767
- package/tests/utils/__snapshots__/URLHandler.test.js.snap +0 -21
- package/tests/utils/__snapshots__/geocoder.test.js.snap +0 -37
- package/tests/utils/__snapshots__/map.test.js.snap +0 -1249
- package/tests/utils/__snapshots__/picture.test.js.snap +0 -327
- package/tests/utils/__snapshots__/widgets.test.js.snap +0 -19
- package/tests/utils/geocoder.test.js +0 -37
- package/tests/utils/i18n.test.js +0 -111
- package/tests/utils/map.test.js +0 -200
- package/tests/utils/picture.test.js +0 -745
- package/tests/utils/semantics.test.js +0 -174
- package/tests/utils/utils.test.js +0 -358
- package/tests/utils/widgets.test.js +0 -31
- /package/{src → build}/components/core/Basic.css +0 -0
- /package/{src → build}/components/core/CoverageMap.css +0 -0
- /package/{src → build}/components/core/Editor.css +0 -0
- /package/{src → build}/components/core/PhotoViewer.css +0 -0
- /package/{src → build}/components/core/Viewer.css +0 -0
- /package/{src → build}/components/ui/ButtonGroup.css +0 -0
- /package/{src → build}/components/ui/Map.css +0 -0
- /package/{src → build}/components/ui/Photo.css +0 -0
- /package/{src → build}/components/ui/ProgressBar.js +0 -0
- /package/{src → build}/components/ui/widgets/GeoSearch.css +0 -0
- /package/{src → build}/components/ui/widgets/LevelSelect.css +0 -0
- /package/{src → build}/components/ui/widgets/Player.css +0 -0
- /package/{public → build}/favicon.ico +0 -0
- /package/{src → build}/img/arrow_360.svg +0 -0
- /package/{src → build}/img/arrow_flat.svg +0 -0
- /package/{src → build}/img/bg_aerial.jpg +0 -0
- /package/{src → build}/img/bg_streets.jpg +0 -0
- /package/{src → build}/img/loader_base.jpg +0 -0
- /package/{src → build}/img/logo_dead.svg +0 -0
- /package/{src → build}/img/marker.svg +0 -0
- /package/{src → build}/img/marker_blue.svg +0 -0
- /package/{src → build}/img/osm.svg +0 -0
- /package/{src → build}/img/panoramax.svg +0 -0
- /package/{src → build}/img/switch_big.svg +0 -0
- /package/{src → build}/img/switch_mini.svg +0 -0
- /package/{src → build}/img/wd.svg +0 -0
- /package/{src → build}/translations/ar.json +0 -0
- /package/{src → build}/translations/be.json +0 -0
- /package/{src → build}/translations/br.json +0 -0
- /package/{src → build}/translations/cy.json +0 -0
- /package/{src → build}/translations/da.json +0 -0
- /package/{src → build}/translations/de.json +0 -0
- /package/{src → build}/translations/en.json +0 -0
- /package/{src → build}/translations/eo.json +0 -0
- /package/{src → build}/translations/es.json +0 -0
- /package/{src → build}/translations/fi.json +0 -0
- /package/{src → build}/translations/fr.json +0 -0
- /package/{src → build}/translations/hu.json +0 -0
- /package/{src → build}/translations/it.json +0 -0
- /package/{src → build}/translations/ja.json +0 -0
- /package/{src → build}/translations/ko.json +0 -0
- /package/{src → build}/translations/nl.json +0 -0
- /package/{src → build}/translations/nn.json +0 -0
- /package/{src → build}/translations/pl.json +0 -0
- /package/{src → build}/translations/pt.json +0 -0
- /package/{src → build}/translations/pt_BR.json +0 -0
- /package/{src → build}/translations/sv.json +0 -0
- /package/{src → build}/translations/ti.json +0 -0
- /package/{src → build}/translations/tr.json +0 -0
- /package/{src → build}/translations/uk.json +0 -0
- /package/{src → build}/translations/zh_Hant.json +0 -0
- /package/{src → build}/utils/PanoraMapProtocol.js +0 -0
- /package/{src → build}/utils/services.js +0 -0
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
|
|
5
|
-
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
|
|
6
|
-
const ignoredFiles = require('react-dev-utils/ignoredFiles');
|
|
7
|
-
const redirectServedPath = require('react-dev-utils/redirectServedPathMiddleware');
|
|
8
|
-
const paths = require('./paths');
|
|
9
|
-
const getHttpsConfig = require('./getHttpsConfig');
|
|
10
|
-
|
|
11
|
-
const host = process.env.HOST || '0.0.0.0';
|
|
12
|
-
const sockHost = process.env.WDS_SOCKET_HOST;
|
|
13
|
-
const sockPath = process.env.WDS_SOCKET_PATH; // default: '/ws'
|
|
14
|
-
const sockPort = process.env.WDS_SOCKET_PORT;
|
|
15
|
-
|
|
16
|
-
module.exports = function (proxy, allowedHost) {
|
|
17
|
-
const disableFirewall =
|
|
18
|
-
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true';
|
|
19
|
-
return {
|
|
20
|
-
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
|
|
21
|
-
// websites from potentially accessing local content through DNS rebinding:
|
|
22
|
-
// https://github.com/webpack/webpack-dev-server/issues/887
|
|
23
|
-
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
|
|
24
|
-
// However, it made several existing use cases such as development in cloud
|
|
25
|
-
// environment or subdomains in development significantly more complicated:
|
|
26
|
-
// https://github.com/facebook/create-react-app/issues/2271
|
|
27
|
-
// https://github.com/facebook/create-react-app/issues/2233
|
|
28
|
-
// While we're investigating better solutions, for now we will take a
|
|
29
|
-
// compromise. Since our WDS configuration only serves files in the `public`
|
|
30
|
-
// folder we won't consider accessing them a vulnerability. However, if you
|
|
31
|
-
// use the `proxy` feature, it gets more dangerous because it can expose
|
|
32
|
-
// remote code execution vulnerabilities in backends like Django and Rails.
|
|
33
|
-
// So we will disable the host check normally, but enable it if you have
|
|
34
|
-
// specified the `proxy` setting. Finally, we let you override it if you
|
|
35
|
-
// really know what you're doing with a special environment variable.
|
|
36
|
-
// Note: ["localhost", ".localhost"] will support subdomains - but we might
|
|
37
|
-
// want to allow setting the allowedHosts manually for more complex setups
|
|
38
|
-
allowedHosts: disableFirewall ? 'all' : [allowedHost],
|
|
39
|
-
headers: {
|
|
40
|
-
'Access-Control-Allow-Origin': '*',
|
|
41
|
-
'Access-Control-Allow-Methods': '*',
|
|
42
|
-
'Access-Control-Allow-Headers': '*',
|
|
43
|
-
},
|
|
44
|
-
// Enable gzip compression of generated files.
|
|
45
|
-
compress: true,
|
|
46
|
-
static: {
|
|
47
|
-
// By default WebpackDevServer serves physical files from current directory
|
|
48
|
-
// in addition to all the virtual build products that it serves from memory.
|
|
49
|
-
// This is confusing because those files won’t automatically be available in
|
|
50
|
-
// production build folder unless we copy them. However, copying the whole
|
|
51
|
-
// project directory is dangerous because we may expose sensitive files.
|
|
52
|
-
// Instead, we establish a convention that only files in `public` directory
|
|
53
|
-
// get served. Our build script will copy `public` into the `build` folder.
|
|
54
|
-
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
|
|
55
|
-
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
|
|
56
|
-
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
|
|
57
|
-
// Note that we only recommend to use `public` folder as an escape hatch
|
|
58
|
-
// for files like `favicon.ico`, `manifest.json`, and libraries that are
|
|
59
|
-
// for some reason broken when imported through webpack. If you just want to
|
|
60
|
-
// use an image, put it in `src` and `import` it from JavaScript instead.
|
|
61
|
-
directory: paths.appPublic,
|
|
62
|
-
publicPath: [paths.publicUrlOrPath],
|
|
63
|
-
// By default files from `contentBase` will not trigger a page reload.
|
|
64
|
-
watch: {
|
|
65
|
-
// Reportedly, this avoids CPU overload on some systems.
|
|
66
|
-
// https://github.com/facebook/create-react-app/issues/293
|
|
67
|
-
// src/node_modules is not ignored to support absolute imports
|
|
68
|
-
// https://github.com/facebook/create-react-app/issues/1065
|
|
69
|
-
ignored: ignoredFiles(paths.appSrc),
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
client: {
|
|
73
|
-
webSocketURL: {
|
|
74
|
-
// Enable custom sockjs pathname for websocket connection to hot reloading server.
|
|
75
|
-
// Enable custom sockjs hostname, pathname and port for websocket connection
|
|
76
|
-
// to hot reloading server.
|
|
77
|
-
hostname: sockHost,
|
|
78
|
-
pathname: sockPath,
|
|
79
|
-
port: sockPort,
|
|
80
|
-
},
|
|
81
|
-
overlay: {
|
|
82
|
-
errors: true,
|
|
83
|
-
warnings: false,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
devMiddleware: {
|
|
87
|
-
// It is important to tell WebpackDevServer to use the same "publicPath" path as
|
|
88
|
-
// we specified in the webpack config. When homepage is '.', default to serving
|
|
89
|
-
// from the root.
|
|
90
|
-
// remove last slash so user can land on `/test` instead of `/test/`
|
|
91
|
-
publicPath: paths.publicUrlOrPath.slice(0, -1),
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
server: getHttpsConfig(),
|
|
95
|
-
host,
|
|
96
|
-
historyApiFallback: {
|
|
97
|
-
// Paths with dots should still use the history fallback.
|
|
98
|
-
// See https://github.com/facebook/create-react-app/issues/387.
|
|
99
|
-
disableDotRule: true,
|
|
100
|
-
index: paths.publicUrlOrPath,
|
|
101
|
-
},
|
|
102
|
-
// `proxy` is run between `before` and `after` `webpack-dev-server` hooks
|
|
103
|
-
proxy,
|
|
104
|
-
setupMiddlewares: (middlewares, devServer) => {
|
|
105
|
-
if (!devServer) {
|
|
106
|
-
throw new Error("webpack-dev-server is not defined");
|
|
107
|
-
}
|
|
108
|
-
// Keep `evalSourceMapMiddleware`
|
|
109
|
-
// middlewares before `redirectServedPath` otherwise will not have any effect
|
|
110
|
-
// This lets us fetch source contents from webpack for the error overlay
|
|
111
|
-
devServer.app.use(evalSourceMapMiddleware(devServer));
|
|
112
|
-
|
|
113
|
-
if (fs.existsSync(paths.proxySetup)) {
|
|
114
|
-
// This registers user provided middleware for proxy reasons
|
|
115
|
-
require(paths.proxySetup)(devServer.app);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Redirect to `PUBLIC_URL` or `homepage` from `package.json` if url not match
|
|
119
|
-
devServer.app.use(redirectServedPath(paths.publicUrlOrPath));
|
|
120
|
-
|
|
121
|
-
// This service worker file is effectively a 'no-op' that will reset any
|
|
122
|
-
// previous service worker registered for the same host:port combination.
|
|
123
|
-
// We do this in development to avoid hitting the production cache if
|
|
124
|
-
// it used the same host and port.
|
|
125
|
-
// https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
|
|
126
|
-
devServer.app.use(noopServiceWorkerMiddleware(paths.publicUrlOrPath));
|
|
127
|
-
|
|
128
|
-
return middlewares;
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
};
|
package/docs/03_URL_settings.md
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
# URL settings
|
|
2
|
-
|
|
3
|
-
Various settings could be set from URL query part in order to create permalinks.
|
|
4
|
-
|
|
5
|
-
These are set after the `?` symbol of the URL, following a `key=value` format, each being separated by `&` symbol.
|
|
6
|
-
|
|
7
|
-
Example:
|
|
8
|
-
|
|
9
|
-
```urlencoded
|
|
10
|
-
https://api.panoramax.xyz/?map=19.51/48.1204522/-1.7199004&pic=890b6268-7716-4e34-ada9-69985e6c1657
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
!!! note
|
|
14
|
-
|
|
15
|
-
This works only for __Viewer__ and __Photo Viewer__ components, not for __Editor__ or __Coverage Map__.
|
|
16
|
-
|
|
17
|
-
## :fontawesome-solid-computer: Interface settings
|
|
18
|
-
|
|
19
|
-
### :material-target: `focus`: main shown element
|
|
20
|
-
|
|
21
|
-
Switch to choose which element between map or picture should be shown wide at start. Examples:
|
|
22
|
-
|
|
23
|
-
- `focus=map`
|
|
24
|
-
- `focus=pic`
|
|
25
|
-
|
|
26
|
-
By default, picture is shown wide.
|
|
27
|
-
|
|
28
|
-
!!! note
|
|
29
|
-
|
|
30
|
-
In versions prior to 4.0.0, another `meta` value was also available to display picture metadata popup. As this part of interface is shown directly on picture side since 4.0.0, this parameter was removed. If present, picture is shown focused.
|
|
31
|
-
|
|
32
|
-
### :simple-speedtest: `speed`: sequence play speed
|
|
33
|
-
|
|
34
|
-
The duration of stay on a picture during sequence play (excluding image downloading time), in milliseconds. Authorized values are between 0 and 3000. Example:
|
|
35
|
-
|
|
36
|
-
```urlencoded
|
|
37
|
-
speed=1000
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### :lock: `nav`: allowed navigation between pictures
|
|
41
|
-
|
|
42
|
-
Choose the allowed navigation between pictures, to eventually restrict what is visible from first shown picture. Values are:
|
|
43
|
-
|
|
44
|
-
- `nav=any` (or no value): no restriction in navigation (default)
|
|
45
|
-
- `nav=seq`: can only see pictures in same sequence
|
|
46
|
-
- `nav=none/pic`: can only see current picture, no navigation to other picture allowed
|
|
47
|
-
|
|
48
|
-
## :material-image: Picture settings
|
|
49
|
-
|
|
50
|
-
### :material-barcode: `pic`: picture ID
|
|
51
|
-
|
|
52
|
-
The currently selected picture ID. Example:
|
|
53
|
-
|
|
54
|
-
```urlencoded
|
|
55
|
-
pic=890b6268-7716-4e34-ada9-69985e6c1657
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### :material-barcode: `seq`: sequence ID
|
|
59
|
-
|
|
60
|
-
The currently selected sequence ID. Example:
|
|
61
|
-
|
|
62
|
-
```urlencoded
|
|
63
|
-
seq=b3bae33e-cba2-464f-a0d1-d9f80b1958b0
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### :material-arrow-all: `xyz`: picture position
|
|
67
|
-
|
|
68
|
-
The shown position in picture, following this format:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
x/y/z
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
With:
|
|
75
|
-
|
|
76
|
-
- `x`: the heading in degrees (0 = North, 90 = East, 180 = South, 270 = West)
|
|
77
|
-
- `y`: top/bottom position in degrees (-90 = bottom, 0 = front, 90 = top)
|
|
78
|
-
- `z`: zoom level (0 = minimum/wide view, 100 = maximum/full zoom)
|
|
79
|
-
|
|
80
|
-
Example:
|
|
81
|
-
|
|
82
|
-
```urlencoded
|
|
83
|
-
xyz=10/25/50
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### :material-tag-arrow-right: `xywh`: picture position (annotation format)
|
|
87
|
-
|
|
88
|
-
The position to show on picture at first load, in common annotation format.
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
x,y,w,h
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
With:
|
|
95
|
-
|
|
96
|
-
- `x`: the horizontal offset compared to original picture left border (in pixels)
|
|
97
|
-
- `y`: the vertical offset compared to original picture top border (in pixels)
|
|
98
|
-
- `w`: the area width (in pixels)
|
|
99
|
-
- `h`: the area height (in pixels)
|
|
100
|
-
|
|
101
|
-
Example:
|
|
102
|
-
|
|
103
|
-
```urlencoded
|
|
104
|
-
xywh=3520,1264,96,112
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### :label: `annot`: selected picture annotation
|
|
108
|
-
|
|
109
|
-
The annotation UUID to focus on at picture load. Only works in combination with `pic` parameter.
|
|
110
|
-
|
|
111
|
-
```urlencoded
|
|
112
|
-
annot=fe298d59-a9c6-4680-8e76-6efe82d97f46&pic=52c30227-c5fb-4536-bb13-8c36cabf22ea
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## :map: Map settings
|
|
116
|
-
|
|
117
|
-
### :fontawesome-solid-location-dot: `map`: map position and visibility
|
|
118
|
-
|
|
119
|
-
The `map` parameters handles both map visibility and position. It can take different values:
|
|
120
|
-
|
|
121
|
-
- `map=zoom/latitude/longitude`: for setting the map position (following [MapLibre GL JS hash format](https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/MapOptions/#hash)). It updates automatically when map is moved.
|
|
122
|
-
- no parameter set: shows the map of the whole world, or zoomed on instance area of interest.
|
|
123
|
-
|
|
124
|
-
Example:
|
|
125
|
-
|
|
126
|
-
```urlencoded
|
|
127
|
-
map=19.51/48.1204522/-1.7199004
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### :date: `date_from` and `date_to`: filter map data by date
|
|
131
|
-
|
|
132
|
-
Minimum and maximum capture date for pictures and sequences to show on map (if map is enabled), in ISO format:
|
|
133
|
-
|
|
134
|
-
```urlencoded
|
|
135
|
-
date_from=2020-01-01&date_to=2023-12-31
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### :material-rotate-360: `pic_type`: filter map data by picture type
|
|
139
|
-
|
|
140
|
-
The type of picture (360° or classic) to show on map (if map is enabled). Examples:
|
|
141
|
-
|
|
142
|
-
- `pic_type=flat` for classic pictures
|
|
143
|
-
- `pic_type=equirectangular` for 360° pictures
|
|
144
|
-
- Not set for showing both
|
|
145
|
-
|
|
146
|
-
### :camera: `camera`: filter map data by camera make and model
|
|
147
|
-
|
|
148
|
-
The camera make and model to filter shown pictures and sequences on map (if map is enabled). A fuzzy search is used to filter on map, but your string _should_ always start with camera make. Examples:
|
|
149
|
-
|
|
150
|
-
- `camera=gopro` will display all pictures taken with any _GoPro_ camera
|
|
151
|
-
- `camera=gopro%20max` will only show pictures taken with a _GoPro Max_ camera
|
|
152
|
-
- `camera=max` will not shown any picture on map, as it doesn't match any camera make
|
|
153
|
-
|
|
154
|
-
### :medal: `pic_score`: filter map data by quality score
|
|
155
|
-
|
|
156
|
-
The pictures quality level wanted for map display (if map is enabled). Values are `A`, `B`, `C`, `D`, `E` and can be used that way:
|
|
157
|
-
|
|
158
|
-
- `pic_score=A` for only best pictures
|
|
159
|
-
- `pic_score=ABC` for A, B or C-grade pictures
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### :material-crosshairs-gps: `gps`: filter map data by location precision
|
|
163
|
-
|
|
164
|
-
The pictures location precision wanted for map display (if map is enabled). Values are `1, 2, 3, 4, 5`, and can be used like:
|
|
165
|
-
|
|
166
|
-
- `gps=5` for pictures with highest precision (ranked 5 stars)
|
|
167
|
-
- `gps=1,2,3` for pictures with low to medium precision (ranked 1, 2 or 3 stars)
|
|
168
|
-
|
|
169
|
-
### :material-format-paint: `theme`: map colouring for pictures and sequences
|
|
170
|
-
|
|
171
|
-
The map theme to use for displaying pictures and sequences (if map is enabled). Available themes are:
|
|
172
|
-
|
|
173
|
-
- `theme=default` (or no setting defined): single color for display (no classification)
|
|
174
|
-
- `theme=age`: color based on picture/sequence age (red = recent, yellow = 2+ years old)
|
|
175
|
-
- `theme=type`: color based on camera type (orange = classic, green = 360°)
|
|
176
|
-
- `theme=score`: color based on quality score (green = best quality, yellow = worst)
|
|
177
|
-
- `theme=gps`: color based on location precision (green = best positioning, yellow = worst)
|
|
178
|
-
|
|
179
|
-
### :material-nature-people: `background`: map background
|
|
180
|
-
|
|
181
|
-
The map background to display (if map is enabled, and raster background configured). Available values are:
|
|
182
|
-
|
|
183
|
-
- `background=streets` (or no setting defined): classic streets map
|
|
184
|
-
- `background=aerial`: aerial imagery (only if raster background available)
|
|
185
|
-
|
|
186
|
-
### :octagonal_sign: `overlay`: map semantics overlays
|
|
187
|
-
|
|
188
|
-
The semantics overlay to enable by default (if map is enabled, with semantics layers associated). The value is the list of semantics overlays IDs, separated by a `,`. Example:
|
|
189
|
-
|
|
190
|
-
```urlencoded
|
|
191
|
-
overlay=tfsigns,other
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### :fontawesome-solid-user: `users`: filter map data by user
|
|
195
|
-
|
|
196
|
-
This parameter filters pictures and sequences shown on map to only keep those of concerned users. Authorized values are:
|
|
197
|
-
|
|
198
|
-
- __All users from local instance__ with value `default`
|
|
199
|
-
- __Single user UUID__ from local instance
|
|
200
|
-
- __All users from metacatalog__ with value `metacatalog` (only with Viewer and `metacatalog` option not set to `false`)
|
|
201
|
-
- __Single user UUID from metacatalog__, prefixed with `metacatalog_` (only with Viewer and `metacatalog` option not set to `false`)
|
|
202
|
-
|
|
203
|
-
Example:
|
|
204
|
-
|
|
205
|
-
```urlencoded
|
|
206
|
-
users=abcdefgh-1234-5678-9012-abcdefgh12345678
|
|
207
|
-
users=metacatalog_abcdefgh-1234-5678-9012-abcdefgh12345678
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### :fontawesome-solid-building-circle-arrow-right: `level`: indoor map level
|
|
211
|
-
|
|
212
|
-
__Only if Indoor maps display is enabled__ ([see the tutorial](./tutorials/indoor_maps.md))
|
|
213
|
-
|
|
214
|
-
This parameters selects the indoor map level to display on map load. This should correspond to a level available in selected area. Example:
|
|
215
|
-
|
|
216
|
-
```urlencoded
|
|
217
|
-
level=-1
|
|
218
|
-
```
|
package/docs/05_Compatibility.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Compatibility with STAC API
|
|
2
|
-
|
|
3
|
-
Panoramax viewer works best with a [Panoramax API](https://gitlab.com/panoramax/server/api), but is designed to be compatible with a wide range of [STAC API](https://github.com/radiantearth/stac-api-spec). Although, third-party STAC API needs the following requirements to work with our viewer.
|
|
4
|
-
|
|
5
|
-
## :octicons-search-16: Search endpoint
|
|
6
|
-
|
|
7
|
-
Your STAC API should offer a `/search` endpoint ([documentation](https://github.com/radiantearth/stac-api-spec/tree/main/item-search)).
|
|
8
|
-
|
|
9
|
-
## :fontawesome-regular-images: Collections and items
|
|
10
|
-
|
|
11
|
-
Collections should correspond to :fontawesome-regular-images: __pictures sequences__, and items corresponding to :fontawesome-regular-image: __individual pictures__.
|
|
12
|
-
|
|
13
|
-
Individual pictures should follow [STAC item specification](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md), plus some extensions:
|
|
14
|
-
|
|
15
|
-
- _Perspective imagery specification_ for its pictures and sequences metadata ([documentation](https://github.com/stac-extensions/perspective-imagery))
|
|
16
|
-
- _Tiled assets specification_ for smooth display of high-resolution pictures ([documentation](https://github.com/stac-extensions/tiled-assets))
|
|
17
|
-
|
|
18
|
-
??? info "List of support item metadata"
|
|
19
|
-
|
|
20
|
-
- `assets`
|
|
21
|
-
- [`roles`](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#asset-roles): `data`, `visual` and `thumbnail`
|
|
22
|
-
- `type`: `image/jpeg` or `image/webp`
|
|
23
|
-
- `href`
|
|
24
|
-
- `assets_templates`
|
|
25
|
-
- `tiles`
|
|
26
|
-
- `role`: `data`
|
|
27
|
-
- `href`
|
|
28
|
-
- `geometry`
|
|
29
|
-
- `collection`
|
|
30
|
-
- `id`
|
|
31
|
-
- `links`
|
|
32
|
-
- [`rel`](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#link-object): `prev`, `next`, `related`, `via`
|
|
33
|
-
- `type`: `application/geo+json` or `application/json`
|
|
34
|
-
- `id`
|
|
35
|
-
- `geometry`
|
|
36
|
-
- `datetime`
|
|
37
|
-
- `properties`
|
|
38
|
-
- `pers:interior_orientation`
|
|
39
|
-
- `field_of_view`
|
|
40
|
-
- `focal_length`
|
|
41
|
-
- `view:azimuth`
|
|
42
|
-
- `pers:roll`
|
|
43
|
-
- `pers:pitch`
|
|
44
|
-
- `datetime` or `datetimetz`
|
|
45
|
-
- `tiles:tile_matrix_sets`
|
|
46
|
-
- `geovisio`
|
|
47
|
-
- `type`: `TileMatrixSetType`
|
|
48
|
-
- `tileMatrix`
|
|
49
|
-
- `matrixHeight`
|
|
50
|
-
- `matrixWidth`
|
|
51
|
-
- `tileHeight`
|
|
52
|
-
- `tileWidth`
|
|
53
|
-
|
|
54
|
-
## :map: Vector tiles
|
|
55
|
-
|
|
56
|
-
If you want to use map in viewer, your STAC API should offer :map: vector tiles, through one of these ways:
|
|
57
|
-
|
|
58
|
-
- A [MapLibre Style JSON](https://maplibre.org/maplibre-style-spec/) file, advertised through landing page (`/api`) with a `xyz-style` link.
|
|
59
|
-
- A direct tiles URL, pointing to tiles in [MVT format](https://mapbox.github.io/vector-tile-spec/) and following layer structure described below. It must be advertised in landing page (`/api`) using [Web Map Links](https://github.com/stac-extensions/web-map-links) STAC extension (as `xyz` link).
|
|
60
|
-
|
|
61
|
-
### Layers
|
|
62
|
-
|
|
63
|
-
MVT Vector tiles must have the following layers:
|
|
64
|
-
|
|
65
|
-
| Name | Zooms | Mandatory | Properties |
|
|
66
|
-
|------|-------|:---------:|------------|
|
|
67
|
-
| `sequences` | All | ✅ | - `id`: sequence ID |
|
|
68
|
-
| `pictures` | >= 15 | ✅ | - `id`: picture ID<br />- `ts`: picture date/time<br />- `heading`: picture heading in degrees |
|
|
69
|
-
| `grid` | < 6 | ❌ | __Mandatory:__<br />- `id`: grid cell ID<br />- `nb_pictures`: amount of pictures<br />- `coef`: value from 0 to 1, relative quantity of available pictures<br />__Optional:__<br />- `nb_360_pictures`<br />- `coef_360_pictures`<br />- `nb_flat_pictures`<br />- `coef_flat_pictures`<br />(similar to `nb_pictures` and `coef` but separated by picture type) |
|
|
70
|
-
|
|
71
|
-
### Translation
|
|
72
|
-
|
|
73
|
-
If your vector tiles support multiple languages, you can set in your `style.json` the list of supported languages :
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"metadata": {
|
|
78
|
-
"panoramax:locales": ["fr", "en", "latin"]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The viewer will try to find the best matching `name:LANG` property according to user browser settings.
|
package/docs/09_Develop.md
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# Developing on the client
|
|
2
|
-
|
|
3
|
-
You want to work on our library and offer bug fixes or new features ? That's awesome ! 🤩
|
|
4
|
-
|
|
5
|
-
Here are some inputs about working with Panoramax web client code.
|
|
6
|
-
|
|
7
|
-
!!! note
|
|
8
|
-
|
|
9
|
-
If something seems missing or incomplete, don't hesitate to contact us by [email](mailto:panoramax@panoramax.fr) or using [an issue](https://gitlab.com/panoramax/clients/web-viewer/-/issues). We really want Panoramax to be a collaborative project, so everyone is welcome (see our [code of conduct](https://gitlab.com/panoramax/clients/web-viewer/-/blob/develop/CODE_OF_CONDUCT.md)).
|
|
10
|
-
|
|
11
|
-
## Architecture
|
|
12
|
-
|
|
13
|
-
The current code is split between various elements:
|
|
14
|
-
|
|
15
|
-
- **Core components**: a single functional entry, like [Viewer](./reference/components/core/Viewer.md) (map + picture), [Photo Viewer](./reference/components/core/PhotoViewer.md) (picture only), [Coverage Map](./reference/components/core/CoverageMap.md) or [Editor](./reference/components/core/Editor.md). They share parts of code in [Basic](./reference/components/core/Basic.md) class. They specialized the behaviour of components depending on the needs.
|
|
16
|
-
- **UI components, menus & widgets**: reusable web components, like [Map](./reference/components/ui/Map.md), [Photo](./reference/components/ui/Photo.md) or [Loader](./reference/components/ui/Loader.md). They are used in some views depending of the context.
|
|
17
|
-
- **Utils**: utility functions, split into various files for clarity.
|
|
18
|
-
|
|
19
|
-

|
|
20
|
-
|
|
21
|
-
The library is relies on various other libraries:
|
|
22
|
-
|
|
23
|
-
- [Lit](https://lit.dev/), for web components management
|
|
24
|
-
- [Photo Sphere Viewer](https://github.com/mistic100/Photo-Sphere-Viewer), for displaying classic and 360° pictures
|
|
25
|
-
- [Maplibre GL JS](https://github.com/maplibre/maplibre-gl-js), for displaying the map which shows sequences and pictures location
|
|
26
|
-
- [JS Library Boilerplate](https://github.com/hodgef/js-library-boilerplate), for having a ready-to-use development toolbox
|
|
27
|
-
|
|
28
|
-
## Good to know
|
|
29
|
-
|
|
30
|
-
### Components `z-index`
|
|
31
|
-
|
|
32
|
-
In order to offer a coherent overlay of widgets, we follow this general `z-index` ordering:
|
|
33
|
-
|
|
34
|
-
| Component type | Z-Index |
|
|
35
|
-
| --------------------------------- | :-----: |
|
|
36
|
-
| MapLibre GL & Photo Sphere Viewer | <= 110 |
|
|
37
|
-
| Widgets / Cornered Grid's corners | 120 |
|
|
38
|
-
| Togglable menus | 130 |
|
|
39
|
-
| Fullscreen loaders & popups | 200 |
|
|
40
|
-
|
|
41
|
-
### Parameters handling
|
|
42
|
-
|
|
43
|
-
!!! note
|
|
44
|
-
|
|
45
|
-
This concerns only __Viewer__ component. Editor & Coverage Map read input parameters only from Web Components attributes.
|
|
46
|
-
|
|
47
|
-
Viewer component can read parameters from 3 different sources:
|
|
48
|
-
|
|
49
|
-
- Web Component **attributes**, passed through DOM
|
|
50
|
-
- Browser **local storage**
|
|
51
|
-
- **URL search** parameters
|
|
52
|
-
|
|
53
|
-
This allows a flexible way to interact with viewer for users. Prioritization of parameters is managed by [InitParameters class](./reference/utils/InitParameters.md), URL parameters coming first, then Web component attributes, then local storage (and eventually some hard-coded defaults).
|
|
54
|
-
|
|
55
|
-
This means that, when developing, if you want to check if your attributes are well-defined, you may want to get rid of URL search parameters, as well as remove the `pnx-map-parameters` local storage item. Otherwise, they may not be read as they are lower priority than others.
|
|
56
|
-
|
|
57
|
-
### Third-party services URL
|
|
58
|
-
|
|
59
|
-
All third-party services URL (like geocoding API, OSM iD editor) are grouped into a dedicated `src/utils/services.js` file. You can easily change them to deploy a custom version of the viewer.
|
|
60
|
-
|
|
61
|
-
### Presets for semantics
|
|
62
|
-
|
|
63
|
-
The semantics system for sequences, pictures and annotations make use of **tagging presets**. These are JSON files hosted at [presets.panoramax.fr](https://presets.panoramax.fr/), they have their [dedicated Gitlab repository](https://gitlab.com/panoramax/server/tagging-presets).
|
|
64
|
-
|
|
65
|
-
In the viewer, they show up through icons and translated labels associated to pictures & annotations. If you want to change them, you have to edit them in Gitlab repository. Viewer automatically loads hosted files at start.
|
|
66
|
-
|
|
67
|
-
### Rendering on mobile
|
|
68
|
-
|
|
69
|
-
In order to improve performance, the 3D sphere used for projecting the picture on mobile has a lower amount of polygons, meaning a bit of distortions can appear on-screen. This is directly linked to [PSV Equirectangular adapter's resolution parameter](https://photo-sphere-viewer.js.org/guide/adapters/equirectangular.html#resolution).
|
|
70
|
-
|
|
71
|
-

|
|
72
|
-
|
|
73
|
-
### Widgets breakpoints
|
|
74
|
-
|
|
75
|
-
To make default display more adaptative, many places in the _Viewer_ code uses breakpoints to have different rendering:
|
|
76
|
-
|
|
77
|
-
- Display height: 400px
|
|
78
|
-
- Display width: 576px
|
|
79
|
-
- Shown in iframe or not
|
|
80
|
-
|
|
81
|
-
These breakpoints are both used in CSS (with media-queries) or in JS (`isWidthSmall, isHeightSmall, isInIframe`).
|
|
82
|
-
|
|
83
|
-
## Testing
|
|
84
|
-
|
|
85
|
-
We're trying to make Panoramax as reliable and secure as possible. To ensure this, we rely heavily on code testing. A variety of testing tools is made available:
|
|
86
|
-
|
|
87
|
-
- `npm start` : launches a dev web server on [localhost:3000](http://localhost:3000)
|
|
88
|
-
- `npm run test` : unit testing
|
|
89
|
-
- `npm run lint` : syntax checks
|
|
90
|
-
- `npm run coverage` : amount of tested code
|
|
91
|
-
|
|
92
|
-
If you're working on bug fixes or new features, please **make sure to add appropriate tests** to keep Panoramax level of quality.
|
|
93
|
-
|
|
94
|
-
### Example pictures
|
|
95
|
-
|
|
96
|
-
As Panoramax accepts all kind of picture, we have a large variety of troubles that can come to display them. Here is a list of very different images (various types, orientation, metadata) that can be useful to check if your rendering is working well:
|
|
97
|
-
|
|
98
|
-
| UUID | Type | Heading | Comment |
|
|
99
|
-
| -------------------------------------- | -------------- | ------- | -------------------------- |
|
|
100
|
-
| `5bada38c-7cbc-4c81-a4d1-e39480fbec0b` | flat landscape | SE | |
|
|
101
|
-
| `1d86cbbe-2293-4759-a4b6-23a815c49364` | flat portrait | SW | |
|
|
102
|
-
| `f21d15a7-7a48-4194-bef2-09f22db03225` | flat square | NW | roll/pitch |
|
|
103
|
-
| `b13976d5-fb07-44be-b6b6-2a2356a23cb8` | 360° | W | |
|
|
104
|
-
| `03f220b4-28b2-4104-bc64-bb9e41a8aa5d` | 360° | W | picture tags + annotations |
|
|
105
|
-
| `5d1800fd-44f6-446f-92b9-250f737c4b14` | 360° | NE | roll/pitch |
|
|
106
|
-
| `02b6dac1-6d6a-4568-9db4-f4b0219c03d3` | 360° | E | roll/pitch |
|
|
107
|
-
| `0552bbac-6054-41c1-b0d7-f06ffce7a56d` | 360° | SW | roll/pitch |
|
|
108
|
-
| `2f842858-2ada-4a25-a462-8d3bf256aca8` | H-cropped 360° | - | annotations |
|
|
109
|
-
| `66dbf066-cf13-4fe3-a32a-2210daaeb45d` | H-cropped 360° | ? | |
|
|
110
|
-
| `adf47cb2-cddd-4a8b-a5c9-f64248b62f90` | H-cropped 360° | SW | |
|
|
111
|
-
| `193245fa-3454-492a-b0fc-aa06feab772e` | 180° | SE | |
|
|
112
|
-
|
|
113
|
-
## Documentation
|
|
114
|
-
|
|
115
|
-
The documentation is a mix of:
|
|
116
|
-
|
|
117
|
-
- [JSDoc comments](https://jsdoc.app/about-getting-started) embed directly in source files, and exported in `docs/reference/` folder
|
|
118
|
-
- Higher-level docs as Markdown files, in `docs/` folder.
|
|
119
|
-
|
|
120
|
-
The JSDoc can be exported as Markdown using this command:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
npm run doc
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
And all documentation can be previewed or built using [Mkdocs](https://www.mkdocs.org/):
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
pip install mkdocs mkdocs-material
|
|
130
|
-
mkdocs serve
|
|
131
|
-
mkdocs build
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Online versions are available at:
|
|
135
|
-
|
|
136
|
-
- [docs.panoramax.fr](https://docs.panoramax.fr/web-viewer/) for **stable** version
|
|
137
|
-
- [viewer.geovisio.fr/docs](https://viewer.geovisio.fr/docs/) for **develop** version
|
|
138
|
-
|
|
139
|
-
## Make a release
|
|
140
|
-
|
|
141
|
-
See [dedicated documentation](./90_Releases.md).
|
package/docs/90_Releases.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Make a release
|
|
2
|
-
|
|
3
|
-
Panoramax JS uses [semantic versioning](https://semver.org/) for its release numbers.
|
|
4
|
-
|
|
5
|
-
!!! note
|
|
6
|
-
|
|
7
|
-
On versions < 3.0, a strong constraint was put to keep versions in sync between API and Viewer. Each component could have different `PATCH` versions, but compatibility __had to be__ ensured between `MAJOR.MINOR` versions. Since Viewer version >= 3.0, any STAC-compliant API should be supported by Viewer.
|
|
8
|
-
|
|
9
|
-
Run these commands in order to issue a new release:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
git checkout develop
|
|
13
|
-
|
|
14
|
-
vim package.json # Change version
|
|
15
|
-
vim package-lock.json # Change version
|
|
16
|
-
npm run doc
|
|
17
|
-
|
|
18
|
-
vim CHANGELOG.md # Replace unreleased to version number (and links at bottom)
|
|
19
|
-
|
|
20
|
-
git add *
|
|
21
|
-
git commit -m "Release x.x.x"
|
|
22
|
-
git tag -a x.x.x -m "Release x.x.x"
|
|
23
|
-
git push origin develop
|
|
24
|
-
git checkout main
|
|
25
|
-
git merge develop
|
|
26
|
-
git push origin main --tags
|
|
27
|
-
```
|