@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.
Files changed (341) hide show
  1. package/{src → build}/components/core/Basic.js +22 -16
  2. package/{src → build}/components/core/CoverageMap.js +19 -14
  3. package/{src → build}/components/core/Editor.js +16 -16
  4. package/{src → build}/components/core/PhotoViewer.js +30 -29
  5. package/{src → build}/components/core/Viewer.js +21 -20
  6. package/build/components/core/index.js +10 -0
  7. package/build/components/index.js +11 -0
  8. package/build/components/index_photoviewer.js +6 -0
  9. package/{src → build}/components/layout/BottomDrawer.js +4 -4
  10. package/{src → build}/components/layout/CorneredGrid.js +1 -1
  11. package/{src → build}/components/layout/Mini.js +5 -4
  12. package/{src → build}/components/layout/Tabs.js +1 -1
  13. package/build/components/layout/index.js +9 -0
  14. package/{src → build}/components/menus/LocationPrecisionDoc.js +4 -6
  15. package/{src → build}/components/menus/MapBackground.js +4 -6
  16. package/{src → build}/components/menus/MapFilters.js +16 -21
  17. package/{src → build}/components/menus/MapLayers.js +20 -24
  18. package/{src → build}/components/menus/MapLegend.js +3 -4
  19. package/{src → build}/components/menus/MiniPictureLegend.js +3 -4
  20. package/{src → build}/components/menus/PictureLegend.js +10 -15
  21. package/{src → build}/components/menus/PictureMetadata.js +12 -19
  22. package/{src → build}/components/menus/PlayerOptions.js +5 -7
  23. package/{src → build}/components/menus/QualityScoreDoc.js +3 -4
  24. package/{src → build}/components/menus/ReportForm.js +8 -9
  25. package/{src → build}/components/menus/SemanticsDoc.js +3 -4
  26. package/{src → build}/components/menus/SemanticsDownload.js +3 -3
  27. package/{src → build}/components/menus/SemanticsFilters.js +7 -8
  28. package/{src → build}/components/menus/SemanticsList.js +11 -18
  29. package/{src → build}/components/menus/SemanticsMetadata.js +8 -11
  30. package/{src → build}/components/menus/Share.js +6 -7
  31. package/build/components/menus/index.js +22 -0
  32. package/build/components/menus/index_photoviewer.js +11 -0
  33. package/{src → build}/components/styles.js +0 -2
  34. package/{src → build}/components/ui/AnnotationsSwitch.js +6 -8
  35. package/{src → build}/components/ui/Button.js +1 -1
  36. package/{src → build}/components/ui/ButtonGroup.js +2 -1
  37. package/{src → build}/components/ui/CopyButton.js +4 -6
  38. package/{src → build}/components/ui/Grade.js +5 -5
  39. package/{src → build}/components/ui/GradeFilter.js +3 -3
  40. package/{src → build}/components/ui/IconSwitch.js +1 -1
  41. package/{src → build}/components/ui/LinkButton.js +1 -1
  42. package/{src → build}/components/ui/ListGroup.js +3 -3
  43. package/{src → build}/components/ui/ListItem.js +1 -1
  44. package/{src → build}/components/ui/Loader.js +8 -7
  45. package/{src → build}/components/ui/Map.js +38 -26
  46. package/{src → build}/components/ui/MapMore.js +7 -7
  47. package/{src → build}/components/ui/Photo.js +29 -27
  48. package/{src → build}/components/ui/Popup.js +4 -4
  49. package/{src → build}/components/ui/QualityScore.js +4 -4
  50. package/{src → build}/components/ui/SearchBar.js +6 -7
  51. package/{src → build}/components/ui/SemanticsEditor.js +14 -15
  52. package/{src → build}/components/ui/SemanticsTable.js +4 -5
  53. package/{src → build}/components/ui/Switch.js +1 -1
  54. package/{src → build}/components/ui/TogglableGroup.js +4 -4
  55. package/build/components/ui/index.js +29 -0
  56. package/build/components/ui/index_photoviewer.js +21 -0
  57. package/{src → build}/components/ui/widgets/CopyCoordinates.js +5 -5
  58. package/{src → build}/components/ui/widgets/GeoSearch.js +10 -10
  59. package/{src → build}/components/ui/widgets/Legend.js +9 -8
  60. package/{src → build}/components/ui/widgets/LevelSelect.js +9 -7
  61. package/{src → build}/components/ui/widgets/MapFiltersButton.js +5 -5
  62. package/{src → build}/components/ui/widgets/MapLayersButton.js +5 -5
  63. package/{src → build}/components/ui/widgets/OSMEditors.js +8 -8
  64. package/{src → build}/components/ui/widgets/PictureLegendActions.js +4 -4
  65. package/{src → build}/components/ui/widgets/Player.js +6 -7
  66. package/{src → build}/components/ui/widgets/SemanticsFiltersButton.js +6 -7
  67. package/{src → build}/components/ui/widgets/Zoom.js +6 -6
  68. package/build/components/ui/widgets/index.js +16 -0
  69. package/build/components/ui/widgets/index_photoviewer.js +7 -0
  70. package/build/editor.html +94 -10
  71. package/{src → build}/img/arrow_triangle.svg +0 -1
  72. package/{src → build}/img/arrow_turn.svg +0 -1
  73. package/build/index.html +111 -1
  74. package/build/index.js +6 -95
  75. package/build/index_photoviewer.js +4 -0
  76. package/build/map.html +97 -1
  77. package/build/package.json +141 -0
  78. package/build/photo.html +85 -1
  79. package/build/servers.js +3 -4
  80. package/{src → build}/utils/API.js +33 -33
  81. package/{src → build}/utils/InitParameters.js +11 -9
  82. package/{src → build}/utils/MapStyleComposer.js +39 -37
  83. package/{src → build}/utils/PhotoAdapter.js +1 -0
  84. package/{src → build}/utils/PresetsManager.js +4 -4
  85. package/{src → build}/utils/SemanticsMapProtocol.js +3 -4
  86. package/{src → build}/utils/URLHandler.js +16 -14
  87. package/{src → build}/utils/geocoder.js +5 -5
  88. package/{src → build}/utils/i18n.js +21 -20
  89. package/build/utils/index.js +17 -0
  90. package/build/utils/index_photoviewer.js +14 -0
  91. package/{src → build}/utils/indoor.js +9 -5
  92. package/{src → build}/utils/map.js +15 -11
  93. package/{src → build}/utils/picture.js +22 -17
  94. package/{src → build}/utils/semantics.js +9 -5
  95. package/{src → build}/utils/utils.js +8 -4
  96. package/{src → build}/utils/widgets.js +2 -2
  97. package/build/viewer.html +120 -35
  98. package/build/viewer_indoor.html +90 -8
  99. package/build/widgets.html +410 -1
  100. package/package.json +81 -204
  101. package/.dockerignore +0 -7
  102. package/.gitlab-ci.yml +0 -78
  103. package/CHANGELOG.md +0 -853
  104. package/CODE_OF_CONDUCT.md +0 -134
  105. package/Dockerfile +0 -14
  106. package/build/index.css +0 -36
  107. package/build/index.css.map +0 -1
  108. package/build/index.js.map +0 -1
  109. package/build/photoviewer.css +0 -36
  110. package/build/photoviewer.css.map +0 -1
  111. package/build/photoviewer.js +0 -86
  112. package/build/photoviewer.js.map +0 -1
  113. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
  114. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
  115. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
  116. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
  117. package/config/env.js +0 -104
  118. package/config/getHttpsConfig.js +0 -69
  119. package/config/getPackageJson.js +0 -25
  120. package/config/jest/babelTransform.js +0 -29
  121. package/config/jest/cssTransform.js +0 -14
  122. package/config/jest/fileTransform.js +0 -40
  123. package/config/jest/mocks.js +0 -230
  124. package/config/modules.js +0 -134
  125. package/config/paths.js +0 -76
  126. package/config/pnpTs.js +0 -35
  127. package/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
  128. package/config/webpack.config.js +0 -825
  129. package/config/webpackDevServer.config.js +0 -131
  130. package/docs/03_URL_settings.md +0 -218
  131. package/docs/05_Compatibility.md +0 -83
  132. package/docs/09_Develop.md +0 -141
  133. package/docs/90_Releases.md +0 -27
  134. package/docs/images/class_diagram.drawio +0 -144
  135. package/docs/images/class_diagram.jpg +0 -0
  136. package/docs/images/comparative_3drender.jpg +0 -0
  137. package/docs/images/indoor_level.png +0 -0
  138. package/docs/images/screenshot.jpg +0 -0
  139. package/docs/index.md +0 -159
  140. package/docs/reference/components/core/Basic.md +0 -211
  141. package/docs/reference/components/core/CoverageMap.md +0 -220
  142. package/docs/reference/components/core/Editor.md +0 -252
  143. package/docs/reference/components/core/PhotoViewer.md +0 -320
  144. package/docs/reference/components/core/Viewer.md +0 -398
  145. package/docs/reference/components/layout/BottomDrawer.md +0 -35
  146. package/docs/reference/components/layout/CorneredGrid.md +0 -29
  147. package/docs/reference/components/layout/Mini.md +0 -45
  148. package/docs/reference/components/layout/Tabs.md +0 -46
  149. package/docs/reference/components/menus/LocationPrecisionDoc.md +0 -15
  150. package/docs/reference/components/menus/MapBackground.md +0 -32
  151. package/docs/reference/components/menus/MapFilters.md +0 -37
  152. package/docs/reference/components/menus/MapLayers.md +0 -15
  153. package/docs/reference/components/menus/MapLegend.md +0 -32
  154. package/docs/reference/components/menus/MiniPictureLegend.md +0 -15
  155. package/docs/reference/components/menus/PictureLegend.md +0 -45
  156. package/docs/reference/components/menus/PictureMetadata.md +0 -32
  157. package/docs/reference/components/menus/PlayerOptions.md +0 -15
  158. package/docs/reference/components/menus/QualityScoreDoc.md +0 -15
  159. package/docs/reference/components/menus/ReportForm.md +0 -15
  160. package/docs/reference/components/menus/SemanticsDoc.md +0 -15
  161. package/docs/reference/components/menus/SemanticsDownload.md +0 -15
  162. package/docs/reference/components/menus/SemanticsFilters.md +0 -33
  163. package/docs/reference/components/menus/SemanticsList.md +0 -97
  164. package/docs/reference/components/menus/SemanticsMetadata.md +0 -15
  165. package/docs/reference/components/menus/ShareMenu.md +0 -32
  166. package/docs/reference/components/ui/AnnotationsSwitch.md +0 -32
  167. package/docs/reference/components/ui/Button.md +0 -40
  168. package/docs/reference/components/ui/ButtonGroup.md +0 -36
  169. package/docs/reference/components/ui/CopyButton.md +0 -41
  170. package/docs/reference/components/ui/Grade.md +0 -32
  171. package/docs/reference/components/ui/GradeFilter.md +0 -42
  172. package/docs/reference/components/ui/IconSwitch.md +0 -53
  173. package/docs/reference/components/ui/LinkButton.md +0 -45
  174. package/docs/reference/components/ui/ListGroup.md +0 -22
  175. package/docs/reference/components/ui/ListItem.md +0 -39
  176. package/docs/reference/components/ui/Loader.md +0 -56
  177. package/docs/reference/components/ui/Map.md +0 -150
  178. package/docs/reference/components/ui/MapMore.md +0 -150
  179. package/docs/reference/components/ui/Photo.md +0 -495
  180. package/docs/reference/components/ui/Popup.md +0 -56
  181. package/docs/reference/components/ui/ProgressBar.md +0 -32
  182. package/docs/reference/components/ui/QualityScore.md +0 -45
  183. package/docs/reference/components/ui/SearchBar.md +0 -63
  184. package/docs/reference/components/ui/SemanticsEditor.md +0 -113
  185. package/docs/reference/components/ui/SemanticsTable.md +0 -32
  186. package/docs/reference/components/ui/Switch.md +0 -49
  187. package/docs/reference/components/ui/TogglableGroup.md +0 -39
  188. package/docs/reference/components/ui/widgets/CopyCoordinates.md +0 -32
  189. package/docs/reference/components/ui/widgets/GeoSearch.md +0 -36
  190. package/docs/reference/components/ui/widgets/Legend.md +0 -58
  191. package/docs/reference/components/ui/widgets/LevelSelect.md +0 -16
  192. package/docs/reference/components/ui/widgets/MapFiltersButton.md +0 -37
  193. package/docs/reference/components/ui/widgets/MapLayersButton.md +0 -15
  194. package/docs/reference/components/ui/widgets/OSMEditors.md +0 -15
  195. package/docs/reference/components/ui/widgets/PictureLegendActions.md +0 -32
  196. package/docs/reference/components/ui/widgets/Player.md +0 -34
  197. package/docs/reference/components/ui/widgets/SemanticsFiltersButton.md +0 -15
  198. package/docs/reference/components/ui/widgets/Zoom.md +0 -15
  199. package/docs/reference/utils/API.md +0 -389
  200. package/docs/reference/utils/InitParameters.md +0 -68
  201. package/docs/reference/utils/MapStyleComposer.md +0 -408
  202. package/docs/reference/utils/PanoraMapProtocol.md +0 -28
  203. package/docs/reference/utils/PresetsManager.md +0 -43
  204. package/docs/reference/utils/SemanticsMapProtocol.md +0 -43
  205. package/docs/reference/utils/URLHandler.md +0 -114
  206. package/docs/reference.md +0 -99
  207. package/docs/shortcuts.md +0 -11
  208. package/docs/tutorials/aerial_imagery.md +0 -21
  209. package/docs/tutorials/authentication.md +0 -10
  210. package/docs/tutorials/custom_widgets.md +0 -59
  211. package/docs/tutorials/indoor_maps.md +0 -50
  212. package/docs/tutorials/map_style.md +0 -83
  213. package/docs/tutorials/migrate_v4.md +0 -153
  214. package/docs/tutorials/migrate_v5.md +0 -103
  215. package/docs/tutorials/semantics_overlays.md +0 -74
  216. package/docs/tutorials/synced_coverage.md +0 -43
  217. package/mkdocs.yml +0 -131
  218. package/public/editor.html +0 -53
  219. package/public/index.html +0 -70
  220. package/public/map.html +0 -55
  221. package/public/photo.html +0 -43
  222. package/public/servers.js +0 -15
  223. package/public/viewer.html +0 -79
  224. package/public/viewer_indoor.html +0 -48
  225. package/public/widgets.html +0 -366
  226. package/scripts/build.js +0 -217
  227. package/scripts/doc.js +0 -79
  228. package/scripts/start.js +0 -172
  229. package/scripts/test.js +0 -52
  230. package/src/components/core/index.js +0 -12
  231. package/src/components/index.js +0 -13
  232. package/src/components/index_photoviewer.js +0 -8
  233. package/src/components/layout/index.js +0 -9
  234. package/src/components/menus/index.js +0 -22
  235. package/src/components/menus/index_photoviewer.js +0 -13
  236. package/src/components/ui/index.js +0 -29
  237. package/src/components/ui/index_photoviewer.js +0 -23
  238. package/src/components/ui/widgets/index.js +0 -16
  239. package/src/components/ui/widgets/index_photoviewer.js +0 -9
  240. package/src/index.js +0 -8
  241. package/src/index_photoviewer.js +0 -6
  242. package/src/utils/index.js +0 -17
  243. package/src/utils/index_photoviewer.js +0 -16
  244. package/tests/components/core/Basic.test.js +0 -168
  245. package/tests/components/core/BasicMock.js +0 -25
  246. package/tests/components/core/CoverageMap.test.js +0 -20
  247. package/tests/components/core/Editor.test.js +0 -20
  248. package/tests/components/core/PhotoViewer.test.js +0 -57
  249. package/tests/components/core/Viewer.test.js +0 -85
  250. package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +0 -96
  251. package/tests/components/core/__snapshots__/Viewer.test.js.snap +0 -188
  252. package/tests/components/ui/CopyButton.test.js +0 -52
  253. package/tests/components/ui/Loader.test.js +0 -55
  254. package/tests/components/ui/Map.test.js +0 -145
  255. package/tests/components/ui/Photo.test.js +0 -437
  256. package/tests/components/ui/Popup.test.js +0 -26
  257. package/tests/components/ui/QualityScore.test.js +0 -18
  258. package/tests/components/ui/SearchBar.test.js +0 -110
  259. package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +0 -33
  260. package/tests/components/ui/__snapshots__/Loader.test.js.snap +0 -56
  261. package/tests/components/ui/__snapshots__/Map.test.js.snap +0 -16
  262. package/tests/components/ui/__snapshots__/Photo.test.js.snap +0 -263
  263. package/tests/components/ui/__snapshots__/Popup.test.js.snap +0 -29
  264. package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +0 -11
  265. package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +0 -65
  266. package/tests/data/Map_geocoder_ban.json +0 -36
  267. package/tests/data/Map_geocoder_nominatim.json +0 -41
  268. package/tests/data/Viewer_pictures_1.json +0 -148
  269. package/tests/setupTests.js +0 -5
  270. package/tests/utils/API.test.js +0 -752
  271. package/tests/utils/InitParameters.test.js +0 -599
  272. package/tests/utils/MapStyleComposer.test.js +0 -697
  273. package/tests/utils/PresetsManager.test.js +0 -123
  274. package/tests/utils/URLHandler.test.js +0 -587
  275. package/tests/utils/__snapshots__/API.test.js.snap +0 -40
  276. package/tests/utils/__snapshots__/MapStyleComposer.test.js.snap +0 -767
  277. package/tests/utils/__snapshots__/URLHandler.test.js.snap +0 -21
  278. package/tests/utils/__snapshots__/geocoder.test.js.snap +0 -37
  279. package/tests/utils/__snapshots__/map.test.js.snap +0 -1249
  280. package/tests/utils/__snapshots__/picture.test.js.snap +0 -327
  281. package/tests/utils/__snapshots__/widgets.test.js.snap +0 -19
  282. package/tests/utils/geocoder.test.js +0 -37
  283. package/tests/utils/i18n.test.js +0 -111
  284. package/tests/utils/map.test.js +0 -200
  285. package/tests/utils/picture.test.js +0 -745
  286. package/tests/utils/semantics.test.js +0 -174
  287. package/tests/utils/utils.test.js +0 -358
  288. package/tests/utils/widgets.test.js +0 -31
  289. /package/{src → build}/components/core/Basic.css +0 -0
  290. /package/{src → build}/components/core/CoverageMap.css +0 -0
  291. /package/{src → build}/components/core/Editor.css +0 -0
  292. /package/{src → build}/components/core/PhotoViewer.css +0 -0
  293. /package/{src → build}/components/core/Viewer.css +0 -0
  294. /package/{src → build}/components/ui/ButtonGroup.css +0 -0
  295. /package/{src → build}/components/ui/Map.css +0 -0
  296. /package/{src → build}/components/ui/Photo.css +0 -0
  297. /package/{src → build}/components/ui/ProgressBar.js +0 -0
  298. /package/{src → build}/components/ui/widgets/GeoSearch.css +0 -0
  299. /package/{src → build}/components/ui/widgets/LevelSelect.css +0 -0
  300. /package/{src → build}/components/ui/widgets/Player.css +0 -0
  301. /package/{public → build}/favicon.ico +0 -0
  302. /package/{src → build}/img/arrow_360.svg +0 -0
  303. /package/{src → build}/img/arrow_flat.svg +0 -0
  304. /package/{src → build}/img/bg_aerial.jpg +0 -0
  305. /package/{src → build}/img/bg_streets.jpg +0 -0
  306. /package/{src → build}/img/loader_base.jpg +0 -0
  307. /package/{src → build}/img/logo_dead.svg +0 -0
  308. /package/{src → build}/img/marker.svg +0 -0
  309. /package/{src → build}/img/marker_blue.svg +0 -0
  310. /package/{src → build}/img/osm.svg +0 -0
  311. /package/{src → build}/img/panoramax.svg +0 -0
  312. /package/{src → build}/img/switch_big.svg +0 -0
  313. /package/{src → build}/img/switch_mini.svg +0 -0
  314. /package/{src → build}/img/wd.svg +0 -0
  315. /package/{src → build}/translations/ar.json +0 -0
  316. /package/{src → build}/translations/be.json +0 -0
  317. /package/{src → build}/translations/br.json +0 -0
  318. /package/{src → build}/translations/cy.json +0 -0
  319. /package/{src → build}/translations/da.json +0 -0
  320. /package/{src → build}/translations/de.json +0 -0
  321. /package/{src → build}/translations/en.json +0 -0
  322. /package/{src → build}/translations/eo.json +0 -0
  323. /package/{src → build}/translations/es.json +0 -0
  324. /package/{src → build}/translations/fi.json +0 -0
  325. /package/{src → build}/translations/fr.json +0 -0
  326. /package/{src → build}/translations/hu.json +0 -0
  327. /package/{src → build}/translations/it.json +0 -0
  328. /package/{src → build}/translations/ja.json +0 -0
  329. /package/{src → build}/translations/ko.json +0 -0
  330. /package/{src → build}/translations/nl.json +0 -0
  331. /package/{src → build}/translations/nn.json +0 -0
  332. /package/{src → build}/translations/pl.json +0 -0
  333. /package/{src → build}/translations/pt.json +0 -0
  334. /package/{src → build}/translations/pt_BR.json +0 -0
  335. /package/{src → build}/translations/sv.json +0 -0
  336. /package/{src → build}/translations/ti.json +0 -0
  337. /package/{src → build}/translations/tr.json +0 -0
  338. /package/{src → build}/translations/uk.json +0 -0
  339. /package/{src → build}/translations/zh_Hant.json +0 -0
  340. /package/{src → build}/utils/PanoraMapProtocol.js +0 -0
  341. /package/{src → build}/utils/services.js +0 -0
@@ -1,13 +1,13 @@
1
- import { IndoorEqualSpritesURL } from "./services";
2
- import { createWebComp } from "./widgets";
1
+ import { IndoorEqualSpritesURL } from "./services.js";
2
+ import { createWebComp } from "./widgets.js";
3
3
 
4
4
  export const DISABLED_LEVEL = "-1000";
5
5
  const LEVEL_SEM_LAYER = "levels";
6
6
 
7
7
 
8
8
  export function isIndoorEqualAvailable() {
9
- /* eslint-disable no-undef */
10
9
  try {
10
+ // eslint-disable-next-line no-undef
11
11
  IndoorEqual;
12
12
  return true;
13
13
  }
@@ -28,12 +28,14 @@ export function initIndoorEqualOnMap(map, forceSwitchOn = false) {
28
28
  return;
29
29
  }
30
30
 
31
+ // eslint-disable-next-line no-undef
31
32
  map.indoorEqual = new IndoorEqual(map, map._options.indoor);
32
33
  map.addControl(map.indoorEqual);
33
34
  map.indoorEqual.loadSprite(IndoorEqualSpritesURL());
34
35
 
35
36
  // Override level refresh to keep "disabled" state after map move
36
37
  map.indoorEqual._refreshAfterLevelsUpdate = function() {
38
+ // eslint-disable-next-line eqeqeq
37
39
  if (!this.levels.includes(this.level) && this.level != DISABLED_LEVEL) {
38
40
  this.setLevel("0");
39
41
  }
@@ -58,7 +60,7 @@ export function initIndoorEqualOnMap(map, forceSwitchOn = false) {
58
60
  levels.add(f.properties.level.toString());
59
61
  }
60
62
  });
61
-
63
+
62
64
  // Read levels from Panoramax tiles
63
65
  this.map.querySourceFeatures(SEM_SRC_ID, { sourceLayer: "layer" })
64
66
  .forEach(f => {
@@ -66,7 +68,7 @@ export function initIndoorEqualOnMap(map, forceSwitchOn = false) {
66
68
  levels.add(f.properties["osm|level"].toString());
67
69
  }
68
70
  });
69
-
71
+
70
72
  // If at least one level exist, add floor just to be sure it's always present
71
73
  if(levels.size > 0) { levels.add("0"); }
72
74
 
@@ -147,6 +149,7 @@ export function initIndoorEqualOnMap(map, forceSwitchOn = false) {
147
149
  // Pictures
148
150
  const nonGroundPics = new Set();
149
151
  Object.entries(map._indoorFeaturesIDs.pictures).forEach(([lvl, features]) => {
152
+ // eslint-disable-next-line eqeqeq
150
153
  if(lvl != "0") { features.forEach(f => nonGroundPics.add(f)); }
151
154
  });
152
155
  map.restrictVisibleFeatures("hide", "pictures", [...nonGroundPics]);
@@ -154,6 +157,7 @@ export function initIndoorEqualOnMap(map, forceSwitchOn = false) {
154
157
  // Sequences
155
158
  let nonGroundSeqs = new Set();
156
159
  Object.entries(map._indoorFeaturesIDs.sequences).forEach(([lvl, features]) => {
160
+ // eslint-disable-next-line eqeqeq
157
161
  if(lvl != "0") {
158
162
  nonGroundSeqs = nonGroundSeqs.union(features);
159
163
  }
@@ -1,6 +1,10 @@
1
- import LoaderImg from "../img/marker.svg";
2
- import { COLORS, QUALITYSCORE_RES_FLAT_VALUES, QUALITYSCORE_RES_360_VALUES, QUALITYSCORE_GPS_VALUES, QUALITYSCORE_POND_RES, QUALITYSCORE_POND_GPS } from "./utils";
3
- import { isNullId, QUALITYSCORE_VALUES, GPS_VALUES } from "./utils";
1
+ import {
2
+ COLORS, GPS_VALUES, QUALITYSCORE_GPS_VALUES,
3
+ QUALITYSCORE_POND_GPS, QUALITYSCORE_POND_RES, QUALITYSCORE_RES_360_VALUES,
4
+ QUALITYSCORE_RES_FLAT_VALUES, QUALITYSCORE_VALUES, isNullId
5
+ } from "./utils.js";
6
+
7
+ const LoaderImg = new URL("../img/marker.svg", import.meta.url).href;
4
8
 
5
9
  export const RASTER_LAYER_ID = "pnx-aerial";
6
10
 
@@ -233,7 +237,7 @@ export function isNullCoordinates(c) {
233
237
 
234
238
  /**
235
239
  * Is given layer a label layer.
236
- *
240
+ *
237
241
  * This is useful for inserting new vector layer before labels in MapLibre.
238
242
  * @param {object} l The layer to check
239
243
  * @returns {boolean} True if it's a label layer
@@ -421,7 +425,7 @@ export function mapFiltersToLayersFilters(filters, hasGridStats = false, feature
421
425
 
422
426
  if(filters.camera && filters.camera !== "") {
423
427
  mapFilters.camera = filters.camera;
424
- // low/high model hack : to enable fuzzy filtering of camera make and model
428
+ // Low/high model hack : to enable fuzzy filtering of camera make and model
425
429
  const lowModel = filters.camera.toLowerCase().trim() + " ";
426
430
  const highModel = filters.camera.toLowerCase().trim() + "zzzzzzzzzzzzzzzzzzzz";
427
431
  const collator = ["collator", { "case-sensitive": false, "diacritic-sensitive": false } ];
@@ -520,7 +524,7 @@ export function switchCoefValue(expr, newCoefVal) {
520
524
  /**
521
525
  * Creates links between map and photo elements.
522
526
  * This enable interactions like click on map showing picture.
523
- *
527
+ *
524
528
  * @param {CoreView} parent The view containing both Photo and Map elements
525
529
  * @private
526
530
  */
@@ -617,7 +621,7 @@ export function linkMapAndPhoto(parent) {
617
621
  */
618
622
  export function initMapKeyboardHandler(parent) {
619
623
  parent.map.keyboard.keydown = function(e) {
620
- if (e.altKey || e.ctrlKey || e.metaKey) return;
624
+ if (e.altKey || e.ctrlKey || e.metaKey) {return;}
621
625
 
622
626
  // Custom keys
623
627
  switch(e.key) {
@@ -630,23 +634,23 @@ export function initMapKeyboardHandler(parent) {
630
634
  case "9":
631
635
  parent.psv.goToNextPicture();
632
636
  return;
633
-
637
+
634
638
  case "PageDown":
635
639
  case "3":
636
640
  parent.psv.goToPrevPicture();
637
641
  return;
638
-
642
+
639
643
  case "Home":
640
644
  case "7":
641
645
  e.stopPropagation();
642
646
  parent._toggleFocus();
643
647
  return;
644
-
648
+
645
649
  case "End":
646
650
  case "1":
647
651
  parent.mini.toggleAttribute("collapsed");
648
652
  return;
649
-
653
+
650
654
  case " ":
651
655
  case "0":
652
656
  parent.psv.toggleSequencePlaying();
@@ -1,7 +1,7 @@
1
- import ArrowTriangleSVG from "../img/arrow_triangle.svg";
2
- import ArrowTurnSVG from "../img/arrow_turn.svg";
3
- import { svgToPSVLink, COLORS, getDistance, getSimplifiedAngle, getArrow } from "./utils";
1
+ import { COLORS, getArrow, getDistance, getSimplifiedAngle, svgToPSVLink } from "./utils.js";
4
2
 
3
+ const ArrowTriangleSVG = await fetch(new URL("../img/arrow_triangle.svg", import.meta.url).href).then(res => res.text());
4
+ const ArrowTurnSVG = await fetch(new URL("../img/arrow_turn.svg", import.meta.url).href).then(res => res.text());
5
5
  const ArrowTriangle = svgToPSVLink(ArrowTriangleSVG, "white");
6
6
  const ArrowTurn = svgToPSVLink(ArrowTurnSVG, COLORS.NEXT);
7
7
 
@@ -33,7 +33,8 @@ export function getExifFloat(val) {
33
33
 
34
34
  // Try a direct cast to float
35
35
  try { return parseFloat(val); }
36
- catch(e) {} // eslint-disable-line no-empty
36
+
37
+ catch(e) {}
37
38
 
38
39
  // Unrecognized
39
40
  return undefined;
@@ -51,7 +52,7 @@ export function getGPSPrecision(picture) {
51
52
  let quality = null;
52
53
  const gpsHPosError = picture?.properties?.["quality:horizontal_accuracy"] || getExifFloat(picture?.properties?.exif?.["Exif.GPSInfo.GPSHPositioningError"]);
53
54
  const gpsDop = getExifFloat(picture?.properties?.exif?.["Exif.GPSInfo.GPSDOP"]);
54
-
55
+
55
56
  if(gpsHPosError !== undefined) {
56
57
  quality = `${gpsHPosError} m`;
57
58
  }
@@ -101,7 +102,7 @@ export function getSphereCorrection(picture) {
101
102
  // Check if yaw is applicable: different from photo direction
102
103
  if(Math.round(dir) === Math.round(yaw) && yaw > 0) {
103
104
  console.warn("Picture with UUID", picture.id, "has same GPS Image direction and Yaw, could cause rendering issues");
104
- // yaw = 0;
105
+ // Yaw = 0;
105
106
  }
106
107
 
107
108
  // Pitch
@@ -167,6 +168,7 @@ export function getCroppedPanoData(picture, img) {
167
168
  croppedHeight: parseInt(sad[1]) - parseInt(va[3]) - parseInt(va[1]),
168
169
  };
169
170
  }
171
+
170
172
  catch(e) {
171
173
  console.warn("Invalid pers:interior_orientation values for cropped panorama "+picture.id);
172
174
  }
@@ -188,6 +190,7 @@ export function getCroppedPanoData(picture, img) {
188
190
  if(res.croppedWidth > res.fullWidth) { res.fullWidth = res.croppedWidth; }
189
191
  if(res.croppedHeight > res.fullHeight) { res.fullHeight = res.croppedHeight; }
190
192
  }
193
+
191
194
  catch(e) {
192
195
  console.warn("Invalid XMP.GPano values for cropped panorama "+picture.id);
193
196
  }
@@ -200,6 +203,7 @@ export function getCroppedPanoData(picture, img) {
200
203
  (!res.fullWidth && !res.croppedWidth && res.fullHeight && !res.croppedHeight)
201
204
  || (res.fullWidth && !res.croppedWidth && !res.fullHeight && !res.croppedHeight)
202
205
  || (res.fullWidth && !res.croppedWidth && res.fullHeight && !res.croppedHeight)
206
+ // eslint-disable-next-line eqeqeq
203
207
  || (res.fullWidth == res.croppedWidth && res.fullHeight == res.croppedHeight)
204
208
  ) {
205
209
  res = {};
@@ -224,7 +228,7 @@ export function getCroppedPanoData(picture, img) {
224
228
 
225
229
  /**
226
230
  * Compare function to retrieve most appropriate picture in a single direction.
227
- *
231
+ *
228
232
  * @param {number[]} picPos The picture [x,y] position
229
233
  * @returns {function} A compare function for sorting
230
234
  * @private
@@ -232,13 +236,13 @@ export function getCroppedPanoData(picture, img) {
232
236
  export function sortPicturesInDirection(picPos) {
233
237
  return (a,b) => {
234
238
  // Two prev/next links = no sort
235
- if(a.rel != "related" && b.rel != "related") { return 0; }
239
+ if(a.rel !== "related" && b.rel !== "related") { return 0; }
236
240
  // First is prev/next link = goes first
237
- else if(a.rel != "related") { return -1; }
241
+ else if(a.rel !== "related") { return -1; }
238
242
  // Second is prev/next link = goes first
239
- else if(b.rel != "related") { return 1; }
243
+ else if(b.rel !== "related") { return 1; }
240
244
  // Two related links same day = nearest goes first
241
- else if(a.date == b.date) { return getDistance(picPos, a.geometry.coordinates) - getDistance(picPos, b.geometry.coordinates); }
245
+ else if(a.date === b.date) { return getDistance(picPos, a.geometry.coordinates) - getDistance(picPos, b.geometry.coordinates); }
242
246
  // Two related links at different day = recent goes first
243
247
  else { return b.date.localeCompare(a.date); }
244
248
  };
@@ -287,7 +291,7 @@ export function getNodeCaption(metadata, t) {
287
291
  caption.producer = [];
288
292
  Object.values(producersDeduped).forEach(pv => {
289
293
  const deflt = pv[0];
290
- const better = pv.find(v => v.toLowerCase() != v);
294
+ const better = pv.find(v => v.toLowerCase() !== v);
291
295
  caption.producer.push(better || deflt);
292
296
  });
293
297
  }
@@ -310,7 +314,7 @@ export function getNodeCaption(metadata, t) {
310
314
 
311
315
  /**
312
316
  * Transforms a GeoJSON feature from the STAC API into a PSV node.
313
- *
317
+ *
314
318
  * @param {object} f The API GeoJSON feature
315
319
  * @param {object} t The labels translations container
316
320
  * @param {boolean} [fastInternet] True if Internet speed is high enough for loading HD flat pictures
@@ -320,6 +324,7 @@ export function getNodeCaption(metadata, t) {
320
324
  * @private
321
325
  */
322
326
  export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=null, urlCleaner=(u => u)) {
327
+ // eslint-disable-next-line eqeqeq
323
328
  const isHorizontalFovDefined = f.properties?.["pers:interior_orientation"]?.["field_of_view"] != null;
324
329
  let horizontalFov = isHorizontalFovDefined ? parseInt(f.properties["pers:interior_orientation"]["field_of_view"]) : 70;
325
330
  const is360 = horizontalFov === 360;
@@ -426,7 +431,7 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
426
431
  origInstance,
427
432
  properties: f.properties,
428
433
  };
429
-
434
+
430
435
  return node;
431
436
  }
432
437
 
@@ -457,7 +462,7 @@ export function filterRelatedPicsLinks(metadata, customFilter = null) {
457
462
 
458
463
  for(let direction in picSurroundings) {
459
464
  const picsInDirection = picSurroundings[direction];
460
- if(picsInDirection.length == 0) { continue; }
465
+ if(picsInDirection.length === 0) { continue; }
461
466
  picsInDirection.sort(sortPicturesInDirection(picPos));
462
467
  filteredLinks.push(picsInDirection.shift());
463
468
  }
@@ -485,7 +490,7 @@ export function filterRelatedPicsLinks(metadata, customFilter = null) {
485
490
  */
486
491
  export function getHashTags(metadata) {
487
492
  if(!metadata?.properties?.semantics) { return []; }
488
-
493
+
489
494
  // Find hashtag entry in semantics
490
495
  const hashtagsTags = metadata.properties.semantics.filter(kv => kv.key === "hashtags");
491
496
  const readHashTags = [];
@@ -500,4 +505,4 @@ export function getHashTags(metadata) {
500
505
  */
501
506
  export function hasAnnotations(metadata) {
502
507
  return metadata?.properties?.annotations?.length > 0;
503
- }
508
+ }
@@ -1,8 +1,9 @@
1
1
  import { html } from "lit";
2
- import logoOsm from "../img/osm.svg";
3
- import logoWd from "../img/wd.svg";
4
- import { OSMWikiURL, WikidataURL, PanoramaxPresetsURL, OSMURL, WikidataAPIURL } from "./services";
5
- import { getBestLabel } from "./i18n";
2
+ import { OSMURL, OSMWikiURL, PanoramaxPresetsURL, WikidataAPIURL, WikidataURL } from "./services.js";
3
+ import { getBestLabel } from "./i18n.js";
4
+
5
+ const logoOsm = new URL("../img/osm.svg", import.meta.url).href;
6
+ const logoWd = new URL("../img/wd.svg", import.meta.url).href;
6
7
 
7
8
 
8
9
  // List of [ Overlay ID, API filter, Maplibre Style, Sprites ]
@@ -172,6 +173,7 @@ export function decodeBasicTag(tag) {
172
173
  const firstEqual = (tag || "").lastIndexOf("=");
173
174
  if(firstEqual < 0) { return null; }
174
175
 
176
+
175
177
  const key = decodeKey(tag.substring(0, firstEqual));
176
178
  if(key.subkey.indexOf("=") >= 0) { return null; }
177
179
 
@@ -247,11 +249,13 @@ export function computeDiffTags(prev = [], next = []) {
247
249
 
248
250
  // Look for new values
249
251
  (next || [])
252
+ // eslint-disable-next-line eqeqeq
250
253
  .filter(nt => prev.find(pt => pt.key == nt.key && pt.value == nt.value) === undefined)
251
254
  .forEach(t => res.push({key: t.key, value: t.value, action: "add"}));
252
255
 
253
256
  // Look for prev values missing in next
254
257
  (prev || [])
258
+ // eslint-disable-next-line eqeqeq
255
259
  .filter(pt => next.find(nt => pt.key == nt.key && pt.value == nt.value) === undefined)
256
260
  .forEach(t => res.push({key: t.key, value: t.value, action: "delete"}));
257
261
 
@@ -272,7 +276,7 @@ export function groupByPrefix(tags) {
272
276
  // First pass: analyze tags, separate by prefix
273
277
  tags.forEach(tag => {
274
278
  if(tag.action === "delete") { return; }
275
-
279
+
276
280
  const decodedKey = decodeKey(tag.key);
277
281
 
278
282
  // Put apart qualifiers, to later insert on tags themselves
@@ -1,4 +1,4 @@
1
- import { InternetFastTestFile, InternetFastThreshold } from "./services";
1
+ import { InternetFastTestFile, InternetFastThreshold } from "./services.js";
2
2
 
3
3
  export const DISABLE_ANNOTATIONS_PARAM = "pnx-disable-annotations";
4
4
  export const BASE_PANORAMA_ID = "geovisio-fake-id-0";
@@ -10,7 +10,7 @@ export const COLORS = {
10
10
  NEXT: "#ffab40",
11
11
 
12
12
  QUALI_1: "#00695C", // 360
13
- QUALI_2: "#fd8d3c", // flat
13
+ QUALI_2: "#fd8d3c", // Flat
14
14
 
15
15
  PALETTE_1: "#fecc5c", // Oldest
16
16
  PALETTE_2: "#fd8d3c",
@@ -100,14 +100,15 @@ export function getDistance(from, to) {
100
100
  */
101
101
  export function svgToPSVLink(svg, fillColor) {
102
102
  try {
103
- const svgStr = atob(svg.replace(/^data:image\/svg\+xml;base64,/, ""));
104
- const svgXml = (new DOMParser()).parseFromString(svgStr, "image/svg+xml").childNodes[0];
103
+ if(!svg.startsWith("<svg")) { throw new Error(); }
104
+ const svgXml = (new DOMParser()).parseFromString(svg, "image/svg+xml").childNodes[0];
105
105
  const btn = document.createElement("button");
106
106
  btn.appendChild(svgXml);
107
107
  btn.classList.add("pnx-psv-tour-arrows", "pnx-print-hidden");
108
108
  btn.style.color = fillColor;
109
109
  return btn;
110
110
  }
111
+
111
112
  catch(e) {
112
113
  const img = document.createElement("img");
113
114
  img.src = svg;
@@ -306,6 +307,7 @@ export function josmBboxParameters(meta) {
306
307
  export function isInIframe() {
307
308
  try {
308
309
  return window.self !== window.top;
310
+
309
311
  } catch(e) {
310
312
  return true;
311
313
  }
@@ -326,6 +328,7 @@ export function isInternetFast() {
326
328
  return Promise.resolve(speed >= InternetFastThreshold());
327
329
  }
328
330
  // Fallback for other browsers
331
+
329
332
  catch(e) {
330
333
  try {
331
334
  // Check if test has been done before and stored
@@ -353,6 +356,7 @@ export function isInternetFast() {
353
356
  });
354
357
  }
355
358
  // Fallback for browser blocking third-party downloads or sessionStorage
359
+
356
360
  catch(e) {
357
361
  return Promise.resolve(false);
358
362
  }
@@ -1,6 +1,6 @@
1
1
  import { icon } from "@fortawesome/fontawesome-svg-core";
2
2
  import { setCustomIconLoader } from "iconify-icon";
3
- import { TemakiIconURL } from "./services";
3
+ import { TemakiIconURL } from "./services.js";
4
4
 
5
5
 
6
6
  /**
@@ -52,7 +52,7 @@ export function createWebComp(tag, props = {}) {
52
52
  export function listenForMenuClosure(me, callback) {
53
53
  // Other menu opened
54
54
  me._parent?.addEventListener("menu-opened", e => {
55
- if(e.detail.menu != me) { callback(); }
55
+ if(e.detail.menu !== me) { callback(); }
56
56
  });
57
57
 
58
58
  // Map click
package/build/viewer.html CHANGED
@@ -1,36 +1,121 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><title>Panoramax Web Viewer</title><style>#viewer{position:relative;width:95%;margin:2.5%;height:400px}#viewer.fullpage{position:fixed;top:0;bottom:0;left:0;right:0;height:unset;width:unset;margin:0}</style><script defer="defer" src="index.js"></script><link href="index.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><pnx-viewer id="viewer" class="fullpage" map-options='{
2
- raster: {
3
- type: "raster",
4
- tiles: [
5
- "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}"
6
- ],
7
- minzoom: 0,
8
- maxzoom: 19,
9
- attribution: "&copy; IGN",
10
- tileSize: 256
11
- },
12
- basemaps: {
13
- "OSM Topo": "https://tile-vect.openstreetmap.fr/styles/topo/style.json",
14
- "OSM FR": "https://a.tile.openstreetmap.fr/osmfr/{z:19}/{x}/{y}.png",
15
- osmbzh: {
16
- sources: {
17
- "osmbzh": {
18
- "type": "raster",
19
- "tiles": ["https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png"],
20
- "tileSize": 256,
21
- "minzoom": 0,
22
- "maxzoom": 19,
23
- "attribution": "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> & <a href=\"http://www.openstreetmap.bzh/\">Breton OpenStreetMap Team</a>",
24
- }
25
- },
26
- "layers": [
27
- {
28
- "id": "osmbzh",
29
- "type": "raster",
30
- "source": "osmbzh",
31
- "metadata": {"name": "OSM e brezhoneg"}
32
- }
33
- ]
34
- }
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
6
+ <title>Panoramax Web Viewer</title>
7
+ <style>
8
+ #viewer {
9
+ position: relative;
10
+ width: 95%;
11
+ margin: 2.5%;
12
+ height: 400px;
13
+ }
14
+ #viewer.fullpage {
15
+ position: fixed;
16
+ top: 0;
17
+ bottom: 0;
18
+ left: 0;
19
+ right: 0;
20
+ height: unset;
21
+ width: unset;
22
+ margin: 0;
35
23
  }
36
- }'></pnx-viewer><script src="./servers.js"></script><script>var viewer=document.getElementById("viewer");server===servers.meta&&viewer.setAttribute("metacatalog","false"),viewer.setAttribute("endpoint",server)</script></body></html>
24
+ </style>
25
+
26
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/maplibre-gl@5.21.1/dist/maplibre-gl.css" />
27
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/core@5.14.1/index.css" />
28
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/virtual-tour-plugin@5.14.1/index.css" />
29
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/gallery-plugin@5.14.1/index.css" />
30
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/markers-plugin@5.14.1/index.css" />
31
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/atkinson-hyperlegible-next/index.css" />
32
+ </head>
33
+ <body>
34
+ <script type="importmap">
35
+ {
36
+ "imports": {
37
+ "@fortawesome/fontawesome-svg-core": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-svg-core@6.7.2/index.mjs",
38
+ "@fortawesome/free-regular-svg-icons": "https://cdn.jsdelivr.net/npm/@fortawesome/free-regular-svg-icons@6.7.2/index.mjs",
39
+ "@fortawesome/free-solid-svg-icons": "https://cdn.jsdelivr.net/npm/@fortawesome/free-solid-svg-icons@6.7.2/index.mjs",
40
+ "@maplibre/vt-pbf": "https://cdn.jsdelivr.net/npm/@maplibre/vt-pbf@4.3.0/dist/index.es.js",
41
+ "@mapbox/vector-tile": "https://cdn.jsdelivr.net/npm/@mapbox/vector-tile@2.0.4/index.js",
42
+ "@photo-sphere-viewer/core": "https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/core@5.14.1/index.module.js",
43
+ "@photo-sphere-viewer/equirectangular-tiles-adapter": "https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/equirectangular-tiles-adapter@5.14.1/index.module.js",
44
+ "@photo-sphere-viewer/gallery-plugin": "https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/gallery-plugin@5.14.1/index.module.js",
45
+ "@photo-sphere-viewer/markers-plugin": "https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/markers-plugin@5.14.1/index.module.js",
46
+ "@photo-sphere-viewer/compass-plugin": "https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/compass-plugin@5.14.1/index.module.js",
47
+ "@photo-sphere-viewer/virtual-tour-plugin": "https://cdn.jsdelivr.net/npm/@photo-sphere-viewer/virtual-tour-plugin@5.14.1/index.module.js",
48
+ "geojson-vt": "https://cdn.jsdelivr.net/npm/geojson-vt@4.0.2/src/index.js",
49
+ "iconify-icon": "https://cdn.jsdelivr.net/npm/iconify-icon@3.0.2/dist/iconify-icon.mjs",
50
+ "json5": "https://cdn.jsdelivr.net/npm/json5@2.2.3/dist/index.min.mjs",
51
+ "lit": "https://cdn.jsdelivr.net/npm/lit@3.3.2/index.js",
52
+ "lit/": "https://cdn.jsdelivr.net/npm/lit@3.3.2/",
53
+ "lit-html": "https://cdn.jsdelivr.net/npm/lit-html@3.3.2/lit-html.js",
54
+ "lit-html/": "https://cdn.jsdelivr.net/npm/lit-html@3.3.2/",
55
+ "lit-element/": "https://cdn.jsdelivr.net/npm/lit-element@4.2.2/",
56
+ "maplibre-gl": "https://cdn.jsdelivr.net/npm/maplibre-gl@5.21.1/dist/maplibre-gl.js",
57
+ "pmtiles": "https://cdn.jsdelivr.net/npm/pmtiles@4.4.0/dist/esm/index.js",
58
+ "query-selector-shadow-dom": "https://cdn.jsdelivr.net/npm/query-selector-shadow-dom@1.0.0/dist/querySelectorShadowDom.js",
59
+ "@panoramax/web-viewer": "./src/index.js",
60
+ "@lit/reactive-element": "https://cdn.jsdelivr.net/npm/@lit/reactive-element@2.1.2/reactive-element.js",
61
+ "@mapbox/point-geometry": "https://cdn.jsdelivr.net/npm/@mapbox/point-geometry@1.1.0/index.js",
62
+ "fflate": "https://cdn.jsdelivr.net/npm/fflate@0.8.2/esm/browser.js",
63
+ "pbf": "https://cdn.jsdelivr.net/npm/pbf@4.0.1/index.js",
64
+ "three": "https://cdn.jsdelivr.net/npm/three@0.179.1/build/three.module.js"
65
+ }
66
+ }
67
+ </script>
68
+ <noscript>
69
+ You need to enable JavaScript to run this app.
70
+ </noscript>
71
+
72
+ <pnx-viewer
73
+ id="viewer"
74
+ class="fullpage"
75
+ map-options='{
76
+ raster: {
77
+ type: "raster",
78
+ tiles: [
79
+ "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}"
80
+ ],
81
+ minzoom: 0,
82
+ maxzoom: 19,
83
+ attribution: "&copy; IGN",
84
+ tileSize: 256
85
+ },
86
+ basemaps: {
87
+ "OSM Topo": "https://tile-vect.openstreetmap.fr/styles/topo/style.json",
88
+ "OSM FR": "https://a.tile.openstreetmap.fr/osmfr/{z:19}/{x}/{y}.png",
89
+ osmbzh: {
90
+ sources: {
91
+ "osmbzh": {
92
+ "type": "raster",
93
+ "tiles": ["https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png"],
94
+ "tileSize": 256,
95
+ "minzoom": 0,
96
+ "maxzoom": 19,
97
+ "attribution": "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> & <a href=\"http://www.openstreetmap.bzh/\">Breton OpenStreetMap Team</a>",
98
+ }
99
+ },
100
+ "layers": [
101
+ {
102
+ "id": "osmbzh",
103
+ "type": "raster",
104
+ "source": "osmbzh",
105
+ "metadata": {"name": "OSM e brezhoneg"}
106
+ }
107
+ ]
108
+ }
109
+ }
110
+ }'
111
+ ></pnx-viewer>
112
+
113
+ <script type="module" src="./index.js"></script>
114
+ <script src="./servers.js"></script>
115
+ <script>
116
+ var viewer = document.getElementById("viewer");
117
+ if(server === servers.meta) { viewer.setAttribute("metacatalog", "false"); }
118
+ viewer.setAttribute("endpoint", server);
119
+ </script>
120
+ </body>
121
+ </html>