@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
package/docs/reference.md
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# API reference overview
|
|
2
|
-
|
|
3
|
-
All of components and classes are grouped in the imported library named `Panoramax`.
|
|
4
|
-
|
|
5
|
-
## `components.core`
|
|
6
|
-
|
|
7
|
-
Main web components:
|
|
8
|
-
|
|
9
|
-
- [Basic](./reference/components/core/Basic.md) : base class for other components, embedding shared logic.
|
|
10
|
-
- [CoverageMap](./reference/components/core/CoverageMap.md) : map showing Panoramax data availability.
|
|
11
|
-
- [Editor](./reference/components/core/Editor.md) : photo and map display for editing purposes.7
|
|
12
|
-
- [PhotoViewer](./reference/components/core/PhotoViewer.md) : the classic photo-only viewer.
|
|
13
|
-
- [Viewer](./reference/components/core/Viewer.md) : the photo and map viewer.
|
|
14
|
-
|
|
15
|
-
## `components.layout`
|
|
16
|
-
|
|
17
|
-
Layout helpers:
|
|
18
|
-
|
|
19
|
-
- [BottomDrawer](./reference/components/layout/BottomDrawer.md) : a mobile-like drawer from screen bottom.
|
|
20
|
-
- [CorneredGrid](./reference/components/layout/CorneredGrid.md) : corner-oriented layout over a background component.
|
|
21
|
-
- [Mini](./reference/components/layout/Mini.md) : reduced and collapsable mini component.
|
|
22
|
-
- [Tabs](./reference/components/layout/Tabs.md) : tabbed content manager.
|
|
23
|
-
|
|
24
|
-
## `components.menus`
|
|
25
|
-
|
|
26
|
-
All-in-one, ready-to-use menus for complex operations. Note that they don't embed a container (like popup or panel) to be reusable in any situation.
|
|
27
|
-
|
|
28
|
-
- [LocationPrecisionDoc](./reference/components/menus/LocationPrecisionDoc.md) : details about location precision filter.
|
|
29
|
-
- [MapBackground](./reference/components/menus/MapBackground.md) : change map background.
|
|
30
|
-
- [MapFilters](./reference/components/menus/MapFilters.md) : set map filters.
|
|
31
|
-
- [MapLayers](./reference/components/menus/MapLayers.md) : change map theme and background.
|
|
32
|
-
- [MapLegend](./reference/components/menus/MapLegend.md) : display map sources and Panoramax info.
|
|
33
|
-
- [MiniPictureLegend](./reference/components/menus/PictureLegend.md) : display date of a picture when it's shown reduced.
|
|
34
|
-
- [PictureLegend](./reference/components/menus/PictureLegend.md) : display date, author and info for a picture.
|
|
35
|
-
- [PictureMetadata](./reference/components/menus/PictureMetadata.md) : display full details about a picture.
|
|
36
|
-
- [PlayerOptions](./reference/components/menus/PlayerOptions.md) : speed and constrast settings for play sequence feature.
|
|
37
|
-
- [QualityScoreDoc](./reference/components/menus/QualityScoreDoc.md) : details about quality score computation.
|
|
38
|
-
- [ReportForm](./reference/components/menus/ReportForm.md) : picture issue reporting form.
|
|
39
|
-
- [SemanticsDoc](./reference/components/menus/SemanticsDoc.md) : short documentation on what area semantics.
|
|
40
|
-
- [SemanticsDownload](./reference/components/menus/SemanticsDownload.md) : short documentation on where to download semantics data.
|
|
41
|
-
- [SemanticsFilters](./reference/components/menus/SemanticsFilters.md) : list of semantics overlays to show/hide on map.
|
|
42
|
-
- [SemanticsList](./reference/components/menus/SemanticsList.md) : selected picture list of semantics (tags and annotations).
|
|
43
|
-
- [SemanticsMetadata](./reference/components/menus/SemanticsMetadata.md) : display full details about a picture semantics.
|
|
44
|
-
- [ShareMenu](./reference/components/menus/ShareMenu.md) : links and iframe sharing.
|
|
45
|
-
|
|
46
|
-
## `components.ui`
|
|
47
|
-
|
|
48
|
-
Basic UI components:
|
|
49
|
-
|
|
50
|
-
- [AnnotationsSwitch](./reference/components/ui/AnnotationsSwitch.md) : a switch button for showing/hiding picture annotations.
|
|
51
|
-
- [Button](./reference/components/ui/Button.md) : a simple button.
|
|
52
|
-
- [ButtonGroup](./reference/components/ui/ButtonGroup.md) : button bar.
|
|
53
|
-
- [CopyButton](./reference/components/ui/CopyButton.md) : a copy-to-clipboard button.
|
|
54
|
-
- [Grade](./reference/components/ui/Grade.md) : a 5-star rating display.
|
|
55
|
-
- [GradeFilter](./reference/components/ui/GradeFilter.md) : a 5-star rating input selector.
|
|
56
|
-
- [IconSwitch](./reference/components/ui/IconSwitch.md) : a switch button.
|
|
57
|
-
- [LinkButton](./reference/components/ui/LinkButton.md) : a link button.
|
|
58
|
-
- [ListGroup](./reference/components/ui/ListGroup.md) : a menu-like list of buttons and links.
|
|
59
|
-
- [ListItem](./reference/components/ui/ListItem.md) : a Material Design-like list entry.
|
|
60
|
-
- [Loader](./reference/components/ui/Loader.md) : the fullscreen initial loader.
|
|
61
|
-
- [Map](./reference/components/ui/Map.md) : the browseable map (MapLibre GL).
|
|
62
|
-
- [MapMore](./reference/components/ui/MapMore.md) : advanced version of the browseable map.
|
|
63
|
-
- [Photo](./reference/components/ui/Photo.md) : the picture display (Photo Sphere Viewer).
|
|
64
|
-
- [Popup](./reference/components/ui/Popup.md) : an overlaying popup/modal.
|
|
65
|
-
- [ProgressBar](./reference/components/ui/ProgressBar.md) : a progress bar.
|
|
66
|
-
- [QualityScore](./reference/components/ui/QualityScore.md) : a A/B/C/D/E grade display and input.
|
|
67
|
-
- [SearchBar](./reference/components/ui/SearchBar.md) : a search bar.
|
|
68
|
-
- [SemanticsEditor](./reference/components/ui/SemanticsEditor.md) : input field for editing semantic tags of a picture/annotation.
|
|
69
|
-
- [SemanticsTable](./reference/components/ui/SemanticsTable.md) : table for showing complete semantic tags of a picture/annotation.
|
|
70
|
-
- [Switch](./reference/components/ui/Switch.md) : on/off switch button.
|
|
71
|
-
- [TogglableGroup](./reference/components/ui/TogglableGroup.md) : an helper for showing a menu on button click.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## `components.ui.widgets`
|
|
75
|
-
|
|
76
|
-
More complex UI components (but not menus):
|
|
77
|
-
|
|
78
|
-
- [CopyCoordinates](./reference/components/ui/widgets/CopyCoordinates.md) : a copy-to-clipboard button for coordinates, with many format options.
|
|
79
|
-
- [GeoSearch](./reference/components/ui/widgets/GeoSearch.md) : a geocoder search bar with GPS location tool.
|
|
80
|
-
- [Legend](./reference/components/ui/widgets/Legend.md) : a togglable map/picture legend.
|
|
81
|
-
- [LevelSelect](./reference/components/ui/widgets/LevelSelect.md) : level selector (only with MapLibre indoor= plugin).
|
|
82
|
-
- [MapFiltersButton](./reference/components/ui/widgets/MapFiltersButton.md) : a togglable map filters button & menu.
|
|
83
|
-
- [MapLayersButton](./reference/components/ui/widgets/MapLayersButton.md) : a togglable map layers button & menu.
|
|
84
|
-
- [OSMEditors](./reference/components/ui/widgets/OSMEditors.md) : shortcuts for OpenStreetMap editing tools.
|
|
85
|
-
- [PictureLegendActions](./reference/components/ui/widgets/PictureLegendActions.md) : various actions from picture legend.
|
|
86
|
-
- [Player](./reference/components/ui/widgets/Player.md) : the previous/next/play/pause toolbar.
|
|
87
|
-
- [SemanticsFiltersButton](./reference/components/ui/widgets/SemanticsFiltersButton.md) : a togglable semantics overlays button & menu.
|
|
88
|
-
- [Zoom](./reference/components/ui/widgets/Zoom.md) : the +/- zoom toolbar.
|
|
89
|
-
|
|
90
|
-
## `utils`
|
|
91
|
-
|
|
92
|
-
General helpers outside of single component scope:
|
|
93
|
-
|
|
94
|
-
- [API](./reference/utils/API.md) : the Panoramax API helper (many get & post HTTP helpers).
|
|
95
|
-
- [InitParameters](./reference/utils/InitParameters.md) : helper for merging URL and component parameters.
|
|
96
|
-
- [MapStyleComposer](./reference/utils/MapStyleComposer.md) : the Map style helper for simpler layer management.
|
|
97
|
-
- [PresetsManager](./reference/utils/PresetsManager.md) : the semantics attributes presets manager.
|
|
98
|
-
- [SemanticsMapProtocol](./reference/utils/SemanticsMapProtocol.md) : MapLibre protocol for loading semantics overlays.
|
|
99
|
-
- [URLHandler](./reference/utils/URLHandler.md) : the window URL manager (changes query part).
|
package/docs/shortcuts.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Keyboard shortcuts
|
|
2
|
-
|
|
3
|
-
All interactions with the viewer can be done using the mouse, and some can be also done using keyboard.
|
|
4
|
-
|
|
5
|
-
* __Arrows__ (or 2/4/8/6 on keypad): move inside the picture, or move the map
|
|
6
|
-
* __Page up/down__ (or 3/9 on keypad) : go to next or previous picture in sequence
|
|
7
|
-
* __+ / -__ : zoom picture or map in or out
|
|
8
|
-
* __*__ (or 5 on keypad) : move picture or map to its center
|
|
9
|
-
* __Home / ↖️__ (or 7 on keypad) : switch map and picture as main shown component
|
|
10
|
-
* __End__ (or 1 on keypad) : hide minimized map or picture
|
|
11
|
-
* __Space__ : play or pause current sequence
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Adding aerial imagery
|
|
2
|
-
|
|
3
|
-
In complement of classic _streets_ rendering, you can add an aerial imagery as map background. This is possible using a WMS or WMTS service, and setting configuration as following (this example uses the French IGN aerial imagery):
|
|
4
|
-
|
|
5
|
-
```html
|
|
6
|
-
<pnx-viewer
|
|
7
|
-
endpoint="https://panoramax.ign.fr/api"
|
|
8
|
-
map-options='{
|
|
9
|
-
raster: {
|
|
10
|
-
type: "raster",
|
|
11
|
-
tiles: [
|
|
12
|
-
"https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&STYLE=normal&FORMAT=image/jpeg&TILEMATRIXSET=PM_0_19&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}"
|
|
13
|
-
],
|
|
14
|
-
minzoom: 0,
|
|
15
|
-
maxzoom: 19,
|
|
16
|
-
attribution: "© IGN",
|
|
17
|
-
tileSize: 256
|
|
18
|
-
}
|
|
19
|
-
}'
|
|
20
|
-
></pnx-viewer>
|
|
21
|
-
```
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Authentication against API
|
|
2
|
-
|
|
3
|
-
If the STAC API you're using needs some kind of authentication, you can pass it through any core component options. Parameter `fetch-options` allows you to set custom parameters for the [JS fetch function](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters), like the `credentials` setting. For example:
|
|
4
|
-
|
|
5
|
-
```html
|
|
6
|
-
<pnx-viewer
|
|
7
|
-
endpoint="https://your-secured-stac.fr/api"
|
|
8
|
-
fetch-options='{ "credentials": "include" }'
|
|
9
|
-
/>
|
|
10
|
-
```
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Manage custom widgets
|
|
2
|
-
|
|
3
|
-
The viewer allows you to manage finely its widgets, you can either add or replace all widgets offered by the viewer.
|
|
4
|
-
|
|
5
|
-
We use internally [slots](https://developer.mozilla.org/docs/Web/HTML/Element/slot) to make this possible. Each corner of the viewer is identified uniquely, so you can add in the exact place you'd like. This is in a similar fashion to MapLibre GL or Leaflet widgets management.
|
|
6
|
-
|
|
7
|
-
!!! note
|
|
8
|
-
|
|
9
|
-
This is only available for __Viewer__ & __Photo Viewer__ components, not for _Coverage Map_ or _Editor_.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Add a new widget
|
|
13
|
-
|
|
14
|
-
Let's say you want to add a custom widget without removing existing viewer ones. You can insert your element inside of the viewer markup:
|
|
15
|
-
|
|
16
|
-
```html
|
|
17
|
-
<pnx-viewer
|
|
18
|
-
endpoint="https://panoramax.openstreetmap.fr/"
|
|
19
|
-
>
|
|
20
|
-
<p slot="top-right">My custom text</p>
|
|
21
|
-
</pnx-viewer>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
The magic happens here thanks to the `slop="top-right"` attribute on your element. You can use any corner you like (`top-left`, `top`, `top-right`, `bottom-left`, `bottom`, `bottom-right`), and add several elements on a same corner (they will stack depending of existing CSS styles).
|
|
25
|
-
|
|
26
|
-
## Replace all widgets
|
|
27
|
-
|
|
28
|
-
For finer control, you may want to get rid of all existing widgets before adding your own ones. This is also possible by setting `widgets="false"` attribute on the viewer:
|
|
29
|
-
|
|
30
|
-
```html
|
|
31
|
-
<pnx-viewer
|
|
32
|
-
endpoint="https://panoramax.openstreetmap.fr/"
|
|
33
|
-
widgets="false"
|
|
34
|
-
>
|
|
35
|
-
<p slot="top-right">My custom text</p>
|
|
36
|
-
</pnx-viewer>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Note that this keeps only the _Mini_ map/picture display (in bottom-left corner).
|
|
40
|
-
|
|
41
|
-
!!! note
|
|
42
|
-
|
|
43
|
-
If you don't need map at all, you can also use the [Photo Viewer](../reference/components/core/PhotoViewer.md) component, which is a picture display without any map.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Reuse default widgets
|
|
47
|
-
|
|
48
|
-
You may also want to reuse differently existing widgets. Note that all of them are listed in the [API reference](../reference.md). Just insert them as slotted components inside the viewer:
|
|
49
|
-
|
|
50
|
-
```html
|
|
51
|
-
<pnx-viewer
|
|
52
|
-
endpoint="https://panoramax.openstreetmap.fr/"
|
|
53
|
-
widgets="false"
|
|
54
|
-
>
|
|
55
|
-
<pnx-widget-zoom slot="top-right" />
|
|
56
|
-
</pnx-viewer>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Note that parent variables (`_parent` and `_t`) are automatically passed through by the viewer, no need to add it manually.
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Indoor mapping support
|
|
2
|
-
|
|
3
|
-
For some use cases (touristic venues, emergency response, public transit...), it can be interesting to offer __Indoor mapping support__ in your viewer. Panoramax offers this through two complementary datasets:
|
|
4
|
-
|
|
5
|
-
- __Panoramax Semantics__, with the `osm|level=n` tag. Add it on your selected pictures or sequences this tag through _Tags_ editor or `semantics` API.
|
|
6
|
-
- __OpenStreetMap [Simple Indoor Tagging](https://wiki.openstreetmap.org/wiki/Simple_Indoor_Tagging)__, the tag model to map building indoors. We rely on [indoor=](https://indoorequal.org) stack for map display.
|
|
7
|
-
|
|
8
|
-

|
|
9
|
-
|
|
10
|
-
To offer indoor maps in Panoramax viewer, you have to:
|
|
11
|
-
|
|
12
|
-
- Make sure __proper indoor mapping is available in OpenStreetMap__, check [indoor=](https://indoorequal.org/) map to see covered maps. If missing, you can contribute to OpenStreetMap, or get help from [community](https://www.openstreetmap.org/communities) or [professionals](https://fposm.fr/) to add your own building in OSM.
|
|
13
|
-
- Enable [maplibre-gl-indoorequal](https://indoorequal.com/doc/maplibre-gl-indoorequal) plugin in your web page:
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<script src="https://unpkg.com/maplibre-gl-indoorequal@1.3.0/dist/maplibre-gl-indoorequal.umd.min.js"></script>
|
|
17
|
-
<link href="https://unpkg.com/maplibre-gl-indoorequal@1.3.0/maplibre-gl-indoorequal.css" rel="stylesheet" />
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
- Set `indoor` parameters in your Panoramax Viewer, based on [maplibre-gl-indoorequal's constructor options](https://indoorequal.com/doc/maplibre-gl-indoorequal/api#parameters):
|
|
21
|
-
|
|
22
|
-
```html
|
|
23
|
-
<pnx-viewer
|
|
24
|
-
id="viewer"
|
|
25
|
-
map-options='{
|
|
26
|
-
indoor: {
|
|
27
|
-
apiKey: "GET YOURS @ https://indoorequal.com/",
|
|
28
|
-
heatmap: false
|
|
29
|
-
}
|
|
30
|
-
}'
|
|
31
|
-
></pnx-viewer>
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
!!! note
|
|
35
|
-
You can rely on any _indoor=_ server by changing `url` parameter.
|
|
36
|
-
|
|
37
|
-
Note that you can avoid systematic API calls to Indoor= and Panoramax semantics APIs by enabling indoor maps, but making if not visible by default:
|
|
38
|
-
|
|
39
|
-
```html
|
|
40
|
-
<pnx-viewer
|
|
41
|
-
id="viewer"
|
|
42
|
-
map-options='{
|
|
43
|
-
indoor: {
|
|
44
|
-
apiKey: "GET YOURS @ https://indoorequal.com/",
|
|
45
|
-
heatmap: false,
|
|
46
|
-
visible: false
|
|
47
|
-
}
|
|
48
|
-
}'
|
|
49
|
-
></pnx-viewer>
|
|
50
|
-
```
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Change map background style
|
|
2
|
-
|
|
3
|
-
All components can be configured to use a different map background than the default one. By default, an OpenStreetMap France classic style if offered. Changing the style is done by passing a `map-style` parameter on viewer setup. It should follow the [MapLibre Style specification](https://maplibre.org/maplibre-style-spec/) and be passed as an object, or an URL to such style:
|
|
4
|
-
|
|
5
|
-
```html
|
|
6
|
-
<pnx-viewer
|
|
7
|
-
endpoint="https://api.panoramax.xyz/api"
|
|
8
|
-
map-style="https://my.tiles.provider/basic.json"
|
|
9
|
-
/>
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Note that we also support PMTiles (for a simpler tile hosting), so your style file can contain vector source defined like this:
|
|
13
|
-
|
|
14
|
-
```html
|
|
15
|
-
<pnx-viewer
|
|
16
|
-
endpoint="https://api.panoramax.xyz/api"
|
|
17
|
-
map-style='{
|
|
18
|
-
"sources": {
|
|
19
|
-
"protomaps": {
|
|
20
|
-
"type": "vector",
|
|
21
|
-
"url": "pmtiles://https://example.com/example.pmtiles",
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
...
|
|
25
|
-
}'
|
|
26
|
-
/>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
And you can also customize the map attribution, especially if your style JSON doesn't contain any by default, for example:
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<pnx-viewer
|
|
33
|
-
endpoint="https://api.panoramax.xyz/api"
|
|
34
|
-
map-style="https://my.tiles.provider/basic.json"
|
|
35
|
-
map-options='{
|
|
36
|
-
"attributionControl": { "customAttribution": "© IGN" }
|
|
37
|
-
}'
|
|
38
|
-
/>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Aerial imagery
|
|
42
|
-
|
|
43
|
-
If you'd like to offer aerial imagery along classic map style, check out [Adding aerial imagery](./aerial_imagery.md) documentation.
|
|
44
|
-
|
|
45
|
-
## Complementary backgrounds
|
|
46
|
-
|
|
47
|
-
If you'd like to have many more basemaps, it's possible using `map-options.basemaps` parameters. In there, you can add as many basemaps as wanted. You can defined them using either [MapLibre Style object](https://maplibre.org/maplibre-style-spec/) or an URL to a style JSON or direct TMS endpoint definition.
|
|
48
|
-
|
|
49
|
-
Here's a full example of possible definitions:
|
|
50
|
-
|
|
51
|
-
```html
|
|
52
|
-
<pnx-viewer
|
|
53
|
-
id="viewer"
|
|
54
|
-
class="fullpage"
|
|
55
|
-
map-options='{
|
|
56
|
-
basemaps: {
|
|
57
|
-
"JSON Style URL": "https://tile-vect.openstreetmap.fr/styles/topo/style.json",
|
|
58
|
-
"TMS URL": "https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",
|
|
59
|
-
"TMS URL with maxzoom": "https://a.tile.openstreetmap.fr/osmfr/{z:19}/{x}/{y}.png",
|
|
60
|
-
maplibrestyle: {
|
|
61
|
-
sources: {
|
|
62
|
-
"osmbzh": {
|
|
63
|
-
"type": "raster",
|
|
64
|
-
"tiles": ["https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png"],
|
|
65
|
-
"tileSize": 256,
|
|
66
|
-
"minzoom": 0,
|
|
67
|
-
"maxzoom": 19,
|
|
68
|
-
"attribution": "© <a href=\"...\">Custom attribution</a>",
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"layers": [
|
|
72
|
-
{
|
|
73
|
-
"id": "osmbzh",
|
|
74
|
-
"type": "raster",
|
|
75
|
-
"source": "osmbzh",
|
|
76
|
-
"metadata": {"name": "Custom title to display"}
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}'
|
|
82
|
-
></pnx-viewer>
|
|
83
|
-
```
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# Migration from v3 to v4
|
|
2
|
-
|
|
3
|
-
The version 4 of _Panoramax Web Viewer_ has seen major changes, migrating from custom code to Web Components. This requires you to change a few things compared to version 3.
|
|
4
|
-
|
|
5
|
-
!!! note
|
|
6
|
-
|
|
7
|
-
If at some point you're lost or need help, you can contact us through [issues](https://gitlab.com/panoramax/clients/web-viewer/-/issues) or by [email](mailto:panoramax@panoramax.fr).
|
|
8
|
-
|
|
9
|
-
## 🪄 Initializing components
|
|
10
|
-
|
|
11
|
-
The way you create a component (viewer, editor, coverage map) is different :
|
|
12
|
-
|
|
13
|
-
=== "v4"
|
|
14
|
-
|
|
15
|
-
Now, you have to create a HTML-like component and pass attributes.
|
|
16
|
-
|
|
17
|
-
```html
|
|
18
|
-
<pnx-viewer id="myviewer" endpoint="https://api.panoramax.xyz/api" />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
You can then access it in JS to manage it.
|
|
22
|
-
|
|
23
|
-
```js
|
|
24
|
-
let myviewer = document.getElementById("myviewer");
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Also note that custom MapLibre style must be passed as `map-style` attribute.
|
|
28
|
-
|
|
29
|
-
=== "v3"
|
|
30
|
-
|
|
31
|
-
Before, you created a `div` with ID, then passed it to JS class.
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
let myViewer = new Panoramax.Viewer("viewer", "https://api.panoramax.xyz/api");
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
And MapLibre style was passed as a `style` property in option object.
|
|
38
|
-
|
|
39
|
-
## ⏯️ Widgets options
|
|
40
|
-
|
|
41
|
-
Viewer widgets options are managed quite differently in version 4:
|
|
42
|
-
|
|
43
|
-
- You can disable all widgets with `widgets="false" map-options="false"` options
|
|
44
|
-
- You can add or replace widgets using web component slots (insert your own widgets as child of viewer)
|
|
45
|
-
|
|
46
|
-
This allows to do things like:
|
|
47
|
-
|
|
48
|
-
```html
|
|
49
|
-
<pnx-viewer
|
|
50
|
-
endpoint="https://panoramax.openstreetmap.fr/"
|
|
51
|
-
widgets="false"
|
|
52
|
-
>
|
|
53
|
-
<p slot="top-right">My custom text</p>
|
|
54
|
-
</pnx-viewer>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
This offers more flexibility, check out [how to manage custom widgets in dedicated documentation](./custom_widgets.md).
|
|
58
|
-
|
|
59
|
-
## 🏷️ Class & packages names
|
|
60
|
-
|
|
61
|
-
Many stuff was moved around, and have a bit different naming. Main classes should be called directly by their web component name:
|
|
62
|
-
|
|
63
|
-
| v3 class | v4 web component |
|
|
64
|
-
|----------|------------------|
|
|
65
|
-
| `Panoramax.Viewer` | `<pnx-viewer>` |
|
|
66
|
-
| `Panoramax.Editor` | `<pnx-editor>` |
|
|
67
|
-
| `Panoramax.StandaloneMap` | `<pnx-coverage-map>` |
|
|
68
|
-
|
|
69
|
-
A new main component is available, named __Photo Viewer__ (`<pnx-photo-viewer>`) for showing up only picture (without map).
|
|
70
|
-
|
|
71
|
-
And source code is split into more packages:
|
|
72
|
-
|
|
73
|
-
* `Panoramax.components` : everything you can see graphically
|
|
74
|
-
* `.core` : Viewer, Editor, Coverage Map and Basic (common code)
|
|
75
|
-
* `.layout` : helper classes for layout
|
|
76
|
-
* `.menus` : complex menus (map filters, picture metadata...)
|
|
77
|
-
* `.ui` : re-usable small graphical components
|
|
78
|
-
* `.ui.widgets` : specialized small graphical components (button + menu, extended search bar...)
|
|
79
|
-
* `Panoramax.utils` : helper classes and functions
|
|
80
|
-
|
|
81
|
-
## 👂 Events
|
|
82
|
-
|
|
83
|
-
Many events names were changed, and some of them moved to sub-components.
|
|
84
|
-
|
|
85
|
-
| v3 class | v3 event name | v4 class | v4 event name |
|
|
86
|
-
|----------|-----------------------------------|------------------------|---------------|
|
|
87
|
-
| CoreView | `map:background-changed` | components.ui.Map | `background-changed` |
|
|
88
|
-
| CoreView | `map:picture-click` | components.ui.Map | `picture-click` |
|
|
89
|
-
| CoreView | `map:sequence-hover` | components.ui.Map | `sequence-hover` |
|
|
90
|
-
| CoreView | `map:sequence-click` | components.ui.Map | `sequence-click` |
|
|
91
|
-
| CoreView | `map:users-changed` | components.ui.Map | `users-changed` |
|
|
92
|
-
| CoreView | `psv:picture-loaded` | components.ui.Photo | `picture-loaded` |
|
|
93
|
-
| CoreView | `psv:picture-loading` | components.ui.Photo | `picture-loading` |
|
|
94
|
-
| CoreView | `psv:picture-preview-started` | components.ui.Photo | `picture-preview-started` |
|
|
95
|
-
| CoreView | `psv:picture-preview-stopped` | components.ui.Photo | `picture-preview-stopped` |
|
|
96
|
-
| CoreView | `psv:picture-tiles-loaded` | components.ui.Photo | `picture-tiles-loaded` |
|
|
97
|
-
| CoreView | `psv:view-rotated` | components.ui.Photo | `view-rotated` |
|
|
98
|
-
| CoreView | `psv:transition-duration-changed` | components.ui.Photo | `transition-duration-changed` |
|
|
99
|
-
| Viewer | `filters-changed` | components.ui.MapMore | `filters-changed` |
|
|
100
|
-
| Viewer | `focus-changed` | components.core.Viewer | `focus-changed` |
|
|
101
|
-
| Viewer | `josm-live-enabled` | ❌ Removed | |
|
|
102
|
-
| Viewer | `josm-live-disabled` | ❌ Removed | |
|
|
103
|
-
| Viewer | `pictures-navigation-changed` | components.ui.Photo | `pictures-navigation-changed` |
|
|
104
|
-
| Viewer | `sequence-playing` | components.ui.Photo | `sequence-playing` |
|
|
105
|
-
| Viewer | `sequence-stopped` | components.ui.Photo | `sequence-stopped` |
|
|
106
|
-
|
|
107
|
-
To listen to these events, you can use `map` and `psv` properties of your component.
|
|
108
|
-
|
|
109
|
-
```js
|
|
110
|
-
myviewer.addEventListener("focus-changed", e => console.log(e));
|
|
111
|
-
myviewer.psv.addEventListener("sequence-playing", e => console.log(e));
|
|
112
|
-
|
|
113
|
-
// Note that MapLibre uses on/once functions for events
|
|
114
|
-
myviewer.map.on("picture-click", e => console.log(e));
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
To make use of these sub-components events easier, note that you can also call them from parent component using the property name as a prefix. For example:
|
|
118
|
-
|
|
119
|
-
```js
|
|
120
|
-
// Transfers listener to map sub-component
|
|
121
|
-
myviewer.addEventListener("map:moveend", e => console.log(e));
|
|
122
|
-
|
|
123
|
-
// Works for any sub-component, like URL Handler or PSV
|
|
124
|
-
myviewer.addEventListener("urlHandler:url-changed", e => console.log(e));
|
|
125
|
-
myviewer.addEventListener("psv:picture-loaded", e => console.log(e));
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
To know more about available events per component, please refer [to their individual API page](../reference.md).
|
|
129
|
-
|
|
130
|
-
## ⚙️ Functions
|
|
131
|
-
|
|
132
|
-
Many functions were changed as well, in order to reduce source files size and make things more logical. You can find [all API reference in this doc](../reference.md), here's a summary:
|
|
133
|
-
|
|
134
|
-
| v3 | v4 |
|
|
135
|
-
|---------------------|---------------------|
|
|
136
|
-
| `Viewer.refreshPSV` | `(components.ui).Photo.forceRefresh` |
|
|
137
|
-
| `Viewer`'s play/stop/toggle sequence | Gone to `(components.ui).Photo` |
|
|
138
|
-
| `Viewer`'s get/set pictures navigation | Gone to `(components.ui).Photo` |
|
|
139
|
-
| `Viewer.toggleJOSMLive` | Made private in `(components.ui.widgets).Share` |
|
|
140
|
-
| `Viewer`'s set/toggle focus/unfocused | Managed through `(components.core).Viewer` `focus` attribute and `mini` property |
|
|
141
|
-
| `Viewer.setFilters` | `(components.ui).MapMore` |
|
|
142
|
-
|
|
143
|
-
## 🌍 URL parameters
|
|
144
|
-
|
|
145
|
-
URL parameters are now managed in the URL _search_ part (everything after the `?`), whereas in version 3 it was managed through _hash_ part (everything after the `#`). To ensure long-term compatibility, you may just replace the `#` in your URL by `?`. Here's an example of these new URL:
|
|
146
|
-
|
|
147
|
-
```urlencoded
|
|
148
|
-
https://panoramax.ign.fr/?background=streets&focus=map&map=9/48.6659/2.3237&speed=250
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## 🪛 Initialization parameters
|
|
152
|
-
|
|
153
|
-
Parameters passed to __Viewer__ are more finely read, they can come from Web Component itself (attributes), browser local storage or URL search parameters. URL ones are read first, then local storage, and finally component attributes. This can be misleading while you develop, [read more about this on Develop documentation](../09_Develop.md#parameters-handling).
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Migrate from v4 to v5
|
|
2
|
-
|
|
3
|
-
The version 5 of _Panoramax Web Viewer_ has a major rework of its map layers management. This requires you to change a few things compared to version 4.
|
|
4
|
-
|
|
5
|
-
!!! note
|
|
6
|
-
|
|
7
|
-
If at some point you're lost or need help, you can contact us through [issues](https://gitlab.com/panoramax/clients/web-viewer/-/issues) or by [email](mailto:panoramax@panoramax.fr).
|
|
8
|
-
|
|
9
|
-
## 🗺️ MapStyleComposer
|
|
10
|
-
|
|
11
|
-
The new [MapStyleComposer](../reference/utils/MapStyleComposer.md) helper allows a more comprehensive management of map layers. Its new features includes:
|
|
12
|
-
|
|
13
|
-
- Ability to switch between more __basemaps__
|
|
14
|
-
- Switch between many __Panoramax endpoints__ in the same map, preserving filters & themes during the switch
|
|
15
|
-
- Inject custom __data layers__ on top of Panoramax layers (`dataOverlays`), or between basemaps and Panoramax layers (`dataUnderlays`)
|
|
16
|
-
- More independent loading of layers, Panoramax endpoint can be loaded before/after basemaps for example
|
|
17
|
-
|
|
18
|
-
This class replaces a lot of existing code from `Map, MapMore, API` classes. So, you have a few changes to implement.
|
|
19
|
-
|
|
20
|
-
### 🪛 Web component parameters
|
|
21
|
-
|
|
22
|
-
#### `metacatalog`
|
|
23
|
-
|
|
24
|
-
On [Viewer](../reference/components/core/Viewer.md), pictures and sequences from our metacatalog ([explore.panoramax.fr](https://explore.panoramax.fr)) are shown by default. This behaviour can be changed by setting `metacatalog` to:
|
|
25
|
-
|
|
26
|
-
- `metacatalog="false"` to only display your API data (previous behaviour)
|
|
27
|
-
- `metacatalog="https://another-metacatalog.org"` to use another server than public metacatalog
|
|
28
|
-
|
|
29
|
-
#### `users` ➡️ `endpoint-to-use` / `user`
|
|
30
|
-
|
|
31
|
-
The `users` parameter has been removed from all core components. Instead, for __Viewer__, you can select by default which Panoramax _endpoint_ should be used. It's either your local API, metacatalog, or a single user from or another server. This is done using `endpoint-to-use` parameter:
|
|
32
|
-
|
|
33
|
-
- `endpoint-to-use="default"` for your local API
|
|
34
|
-
- `endpoint-to-use="metacatalog"` for metacatalog (if not set to `metacatalog="false"`)
|
|
35
|
-
- `endpoint-to-use="890b6268-7716-4e34-ada9-69985e6c1657"` for any specific user UUID (from your local API)
|
|
36
|
-
- `endpoint-to-use="metacatalog_890b6268-7716-4e34-ada9-69985e6c1657"` for any specific user UUID from metacatalog
|
|
37
|
-
|
|
38
|
-
For __CoverageMap__, `users` parameter is replaced by `user`, and only can take a single user UUID at a time.
|
|
39
|
-
|
|
40
|
-
### 👂 Events
|
|
41
|
-
|
|
42
|
-
Various events have been changed in favor of _MapStyleComposer_ ones:
|
|
43
|
-
|
|
44
|
-
| v4 class | v4 event type | v5 class | v5 event type |
|
|
45
|
-
|----------|----------------------|------------------|---------------------|
|
|
46
|
-
| Map | `background-changed` | MapStyleComposer | `basemap-changed` |
|
|
47
|
-
| Map | `users-changed` | MapStyleComposer | `panoramax-changed` |
|
|
48
|
-
| MapMore | `filters-changed` | MapStyleComposer | `filters-changed` |
|
|
49
|
-
|
|
50
|
-
Also note that new events are available on MapStyleComposer for finer management:
|
|
51
|
-
|
|
52
|
-
- `basemap-added`
|
|
53
|
-
- `basemap-changed`
|
|
54
|
-
- `dataunderlay-added`
|
|
55
|
-
- `dataunderlay-changed`
|
|
56
|
-
- `panoramax-added`
|
|
57
|
-
- `panoramax-changed`
|
|
58
|
-
- `theme-changed`
|
|
59
|
-
- `filters-changed`
|
|
60
|
-
- `dataoverlay-added`
|
|
61
|
-
- `dataoverlay-changed`
|
|
62
|
-
|
|
63
|
-
### ⚙️ Functions
|
|
64
|
-
|
|
65
|
-
Several functions have been moved as well to _MapStyleComposer_:
|
|
66
|
-
|
|
67
|
-
| v4 class | v4 function | v5 class | v5 function | v5 property |
|
|
68
|
-
|----------|---------------------------|------------------|---------------------------|-------------|
|
|
69
|
-
| Map | `hasTwoBackgrounds` | MapStyleComposer | `hasManyBasemaps` | |
|
|
70
|
-
| Map | `getBackground` | MapStyleComposer | | `basemap` |
|
|
71
|
-
| Map | `setBackground` | MapStyleComposer | `switchBasemap` | |
|
|
72
|
-
| Map | `getVisibleUsers` | MapStyleComposer | | `panoramax` |
|
|
73
|
-
| Map | `onceLayerReady` | MapStyleComposer | `waitFor` | |
|
|
74
|
-
| Map | `setVisibleUsers` | MapStyleComposer | `switchPanoramaxEndpoint` | |
|
|
75
|
-
| Map | `filterUserLayersContent` | MapStyleComposer | `setPanoramaxFilters` | |
|
|
76
|
-
| Map | `reloadLayersStyles` | MapStyleComposer | `updateMapStyle` | |
|
|
77
|
-
| Map | `setVisibleUsers` | MapStyleComposer | `switchPanoramaxEndpoint` | |
|
|
78
|
-
| API | `getMapStyle` | MapStyleComposer | `getMapStyle` | |
|
|
79
|
-
| API | `getUserMapStyle` | MapStyleComposer | `getMapStyle` | |
|
|
80
|
-
|
|
81
|
-
## ⏯️ Viewer
|
|
82
|
-
|
|
83
|
-
In order to make a smoother management of loading data from both local API and metacatalog, _Viewer_ now has two API managers in its properties: `api` (classic) and `apiMC` (metacatalog). In most of the cases, you may want to replace explicit calls to local API to call to function `getAPI` in order to get the right API based on map settings.
|
|
84
|
-
|
|
85
|
-
=== "v5"
|
|
86
|
-
|
|
87
|
-
```js
|
|
88
|
-
// Get the currently selected API
|
|
89
|
-
let api = viewer.getAPI();
|
|
90
|
-
|
|
91
|
-
// For explicit use of local API
|
|
92
|
-
let apiLocal = viewer.api;
|
|
93
|
-
|
|
94
|
-
// For explicit use of metacatalog API
|
|
95
|
-
let apiMC = viewer.apiMC;
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
=== "v4"
|
|
99
|
-
|
|
100
|
-
```js
|
|
101
|
-
// Only local API was available
|
|
102
|
-
let apiLocal = viewer.api;
|
|
103
|
-
```
|