@panoramax/web-viewer 5.0.0-develop-d7206514 → 5.0.0-develop-d26305dd

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 (152) hide show
  1. package/build/bundle.cjs +3399 -0
  2. package/build/bundle.cjs.map +1 -0
  3. package/build/bundle_photoviewer.cjs +2510 -0
  4. package/build/bundle_photoviewer.cjs.map +1 -0
  5. package/build/cjs/index.js +1 -1
  6. package/build/cjs/index_photoviewer.js +1 -1
  7. package/build/components/core/Basic.css +56 -0
  8. package/build/components/core/Basic.js +378 -0
  9. package/build/components/core/CoverageMap.css +10 -0
  10. package/build/components/core/CoverageMap.js +169 -0
  11. package/build/components/core/Editor.css +33 -0
  12. package/build/components/core/Editor.js +398 -0
  13. package/build/components/core/PhotoViewer.css +70 -0
  14. package/build/components/core/PhotoViewer.js +650 -0
  15. package/build/components/core/Viewer.css +130 -0
  16. package/build/components/core/Viewer.js +711 -0
  17. package/build/components/core/index.js +10 -0
  18. package/build/components/index.js +11 -0
  19. package/build/components/index_photoviewer.js +6 -0
  20. package/build/components/layout/BottomDrawer.js +258 -0
  21. package/build/components/layout/CorneredGrid.js +143 -0
  22. package/build/components/layout/Mini.js +121 -0
  23. package/build/components/layout/Tabs.js +140 -0
  24. package/build/components/layout/index.js +9 -0
  25. package/build/components/menus/LocationPrecisionDoc.js +42 -0
  26. package/build/components/menus/MapBackground.js +110 -0
  27. package/build/components/menus/MapFilters.js +567 -0
  28. package/build/components/menus/MapLayers.js +238 -0
  29. package/build/components/menus/MapLegend.js +68 -0
  30. package/build/components/menus/MiniPictureLegend.js +73 -0
  31. package/build/components/menus/PictureLegend.js +379 -0
  32. package/build/components/menus/PictureMetadata.js +380 -0
  33. package/build/components/menus/PlayerOptions.js +93 -0
  34. package/build/components/menus/QualityScoreDoc.js +42 -0
  35. package/build/components/menus/ReportForm.js +132 -0
  36. package/build/components/menus/SemanticsDoc.js +38 -0
  37. package/build/components/menus/SemanticsDownload.js +33 -0
  38. package/build/components/menus/SemanticsFilters.js +153 -0
  39. package/build/components/menus/SemanticsList.js +413 -0
  40. package/build/components/menus/SemanticsMetadata.js +368 -0
  41. package/build/components/menus/Share.js +105 -0
  42. package/build/components/menus/index.js +22 -0
  43. package/build/components/menus/index_photoviewer.js +11 -0
  44. package/build/components/styles.js +557 -0
  45. package/build/components/ui/AnnotationsSwitch.js +159 -0
  46. package/build/components/ui/Button.js +77 -0
  47. package/build/components/ui/ButtonGroup.css +59 -0
  48. package/build/components/ui/ButtonGroup.js +69 -0
  49. package/build/components/ui/CopyButton.js +110 -0
  50. package/build/components/ui/Grade.js +54 -0
  51. package/build/components/ui/GradeFilter.js +122 -0
  52. package/build/components/ui/IconSwitch.js +193 -0
  53. package/build/components/ui/LinkButton.js +67 -0
  54. package/build/components/ui/ListGroup.js +66 -0
  55. package/build/components/ui/ListItem.js +90 -0
  56. package/build/components/ui/Loader.js +203 -0
  57. package/build/components/ui/Map.css +63 -0
  58. package/build/components/ui/Map.js +853 -0
  59. package/build/components/ui/MapMore.js +175 -0
  60. package/build/components/ui/Photo.css +50 -0
  61. package/build/components/ui/Photo.js +1502 -0
  62. package/build/components/ui/Popup.js +145 -0
  63. package/build/components/ui/ProgressBar.js +104 -0
  64. package/build/components/ui/QualityScore.js +147 -0
  65. package/build/components/ui/SearchBar.js +374 -0
  66. package/build/components/ui/SemanticsEditor.js +191 -0
  67. package/build/components/ui/SemanticsTable.js +88 -0
  68. package/build/components/ui/Switch.js +139 -0
  69. package/build/components/ui/TogglableGroup.js +157 -0
  70. package/build/components/ui/index.js +29 -0
  71. package/build/components/ui/index_photoviewer.js +21 -0
  72. package/build/components/ui/widgets/CopyCoordinates.js +75 -0
  73. package/build/components/ui/widgets/GeoSearch.css +21 -0
  74. package/build/components/ui/widgets/GeoSearch.js +150 -0
  75. package/build/components/ui/widgets/Legend.js +190 -0
  76. package/build/components/ui/widgets/LevelSelect.css +51 -0
  77. package/build/components/ui/widgets/LevelSelect.js +143 -0
  78. package/build/components/ui/widgets/MapFiltersButton.js +114 -0
  79. package/build/components/ui/widgets/MapLayersButton.js +79 -0
  80. package/build/components/ui/widgets/OSMEditors.js +155 -0
  81. package/build/components/ui/widgets/PictureLegendActions.js +99 -0
  82. package/build/components/ui/widgets/Player.css +7 -0
  83. package/build/components/ui/widgets/Player.js +154 -0
  84. package/build/components/ui/widgets/SemanticsFiltersButton.js +65 -0
  85. package/build/components/ui/widgets/Zoom.js +84 -0
  86. package/build/components/ui/widgets/index.js +16 -0
  87. package/build/components/ui/widgets/index_photoviewer.js +7 -0
  88. package/build/esm/components/core/Basic.js +1 -1
  89. package/build/img/arrow_360.svg +14 -0
  90. package/build/img/arrow_flat.svg +11 -0
  91. package/build/img/arrow_triangle.svg +9 -0
  92. package/build/img/arrow_turn.svg +8 -0
  93. package/build/img/bg_aerial.jpg +0 -0
  94. package/build/img/bg_streets.jpg +0 -0
  95. package/build/img/loader_base.jpg +0 -0
  96. package/build/img/logo_dead.svg +91 -0
  97. package/build/img/marker.svg +17 -0
  98. package/build/img/marker_blue.svg +20 -0
  99. package/build/img/osm.svg +49 -0
  100. package/build/img/panoramax.svg +13 -0
  101. package/build/img/switch_big.svg +54 -0
  102. package/build/img/switch_mini.svg +48 -0
  103. package/build/img/wd.svg +1 -0
  104. package/build/index_photoviewer.js +4 -0
  105. package/build/package.json +148 -0
  106. package/build/servers.js +14 -0
  107. package/build/translations/ar.json +1 -0
  108. package/build/translations/be.json +257 -0
  109. package/build/translations/br.json +81 -0
  110. package/build/translations/cy.json +117 -0
  111. package/build/translations/da.json +300 -0
  112. package/build/translations/de.json +309 -0
  113. package/build/translations/en.json +294 -0
  114. package/build/translations/eo.json +235 -0
  115. package/build/translations/es.json +292 -0
  116. package/build/translations/fi.json +1 -0
  117. package/build/translations/fr.json +294 -0
  118. package/build/translations/hr.json +294 -0
  119. package/build/translations/hu.json +294 -0
  120. package/build/translations/it.json +306 -0
  121. package/build/translations/ja.json +182 -0
  122. package/build/translations/ko.json +1 -0
  123. package/build/translations/nl.json +305 -0
  124. package/build/translations/nn.json +1 -0
  125. package/build/translations/pl.json +169 -0
  126. package/build/translations/pt.json +296 -0
  127. package/build/translations/pt_BR.json +304 -0
  128. package/build/translations/sv.json +182 -0
  129. package/build/translations/ti.json +9 -0
  130. package/build/translations/tr.json +297 -0
  131. package/build/translations/uk.json +268 -0
  132. package/build/translations/zh_Hant.json +309 -0
  133. package/build/utils/API.js +928 -0
  134. package/build/utils/InitParameters.js +521 -0
  135. package/build/utils/MapStyleComposer.js +889 -0
  136. package/build/utils/PanoraMapProtocol.js +49 -0
  137. package/build/utils/PhotoAdapter.js +49 -0
  138. package/build/utils/PresetsManager.js +148 -0
  139. package/build/utils/SemanticsMapProtocol.js +144 -0
  140. package/build/utils/URLHandler.js +426 -0
  141. package/build/utils/geocoder.js +203 -0
  142. package/build/utils/i18n.js +128 -0
  143. package/build/utils/index.js +17 -0
  144. package/build/utils/index_photoviewer.js +14 -0
  145. package/build/utils/indoor.js +200 -0
  146. package/build/utils/map.js +788 -0
  147. package/build/utils/picture.js +507 -0
  148. package/build/utils/semantics.js +321 -0
  149. package/build/utils/services.js +148 -0
  150. package/build/utils/utils.js +433 -0
  151. package/build/utils/widgets.js +110 -0
  152. package/package.json +1 -1
@@ -0,0 +1,128 @@
1
+ import T_be from "../translations/be.json" with { type: "json" };
2
+ import T_da from "../translations/da.json" with { type: "json" };
3
+ import T_de from "../translations/de.json" with { type: "json" };
4
+ import T_en from "../translations/en.json" with { type: "json" };
5
+ import T_eo from "../translations/eo.json" with { type: "json" };
6
+ import T_es from "../translations/es.json" with { type: "json" };
7
+ import T_fr from "../translations/fr.json" with { type: "json" };
8
+ import T_hr from "../translations/hr.json" with { type: "json" };
9
+ import T_hu from "../translations/hu.json" with { type: "json" };
10
+ import T_it from "../translations/it.json" with { type: "json" };
11
+ import T_ja from "../translations/ja.json" with { type: "json" };
12
+ import T_nl from "../translations/nl.json" with { type: "json" };
13
+ import T_pl from "../translations/pl.json" with { type: "json" };
14
+ import T_pt from "../translations/pt.json" with { type: "json" };
15
+ import T_pt_BR from "../translations/pt_BR.json" with { type: "json" };
16
+ import T_sv from "../translations/sv.json" with { type: "json" };
17
+ import T_tr from "../translations/tr.json" with { type: "json" };
18
+ import T_uk from "../translations/uk.json" with { type: "json" };
19
+ import T_zh_Hant from "../translations/zh_Hant.json" with { type: "json" };
20
+
21
+ const FALLBACK_LOCALE = "en";
22
+ const TRANSLATIONS = {
23
+ "be": T_be, "da": T_da, "de": T_de, "eo": T_eo, "en": T_en, "es": T_es, "fr": T_fr,
24
+ "hr": T_hr, "hu": T_hu, "it": T_it, "ja": T_ja, "nl": T_nl, "pl": T_pl, "pt": T_pt, "pt-br": T_pt_BR,
25
+ "sv": T_sv, "tr": T_tr, "uk": T_uk, "zh-hant": T_zh_Hant, "zh": T_zh_Hant,
26
+ };
27
+
28
+ /**
29
+ * Find best matching language regarding of list of supported languages and browser accepted languages
30
+ * @param {str[]} supportedTranslations List of supported languages
31
+ * @param {str} fallback The fallback language
32
+ * @returns The best matching language (in lowercase)
33
+ * @private
34
+ */
35
+ export function autoDetectLocale(supportedTranslations, fallback) {
36
+ supportedTranslations = supportedTranslations.map(k => k.toLowerCase());
37
+
38
+ for (const navigatorLang of window.navigator.languages) {
39
+ let language = navigatorLang.toLowerCase();
40
+ // Convert browser code to weblate code
41
+ switch (language) {
42
+ case "zh-tw":
43
+ case "zh-hk":
44
+ case "zh-mo":
45
+ language = "zh-hant";
46
+ break;
47
+ case "zh-cn":
48
+ case "zh-sg":
49
+ language = "zh-hans";
50
+ break;
51
+ default:
52
+ if (language.length > 2 && !supportedTranslations.includes(language)) {
53
+ language = navigatorLang.substring(0, 2);
54
+ }
55
+ break;
56
+ }
57
+ const pair = supportedTranslations.find((pair) => pair === language);
58
+ if (pair) {
59
+ return pair;
60
+ }
61
+ }
62
+ return fallback;
63
+ }
64
+
65
+ /**
66
+ * Get text labels translations in given language
67
+ *
68
+ * @param {string} [lang] The language code (fr, en) (defaults to browser preferences)
69
+ * @returns {object} Translations in given language, with fallback to english
70
+ * @private
71
+ */
72
+ export function getTranslations(lang = "") {
73
+ const myTr = JSON.parse(JSON.stringify(T_en));
74
+ let preferedTr;
75
+
76
+ // No specific lang set -> use browser lang
77
+ if(!lang) {
78
+ lang = autoDetectLocale(Object.keys(TRANSLATIONS), FALLBACK_LOCALE);
79
+ }
80
+
81
+ // Lang exists -> send it
82
+ if(TRANSLATIONS[lang] && lang !== "en") {
83
+ preferedTr = TRANSLATIONS[lang];
84
+ }
85
+
86
+ // Look for primary lang
87
+ if(lang.length > 2) {
88
+ const primaryLang = lang.substring(0, 2);
89
+ if(TRANSLATIONS[primaryLang]) { preferedTr = TRANSLATIONS[primaryLang]; }
90
+ }
91
+
92
+ // Merge labels to avoid missing ones
93
+ if(preferedTr) {
94
+ Object.entries(preferedTr).forEach(([k1, k2]) => {
95
+ Object.entries(k2).forEach(([k2, k3]) => {
96
+ // eslint-disable-next-line eqeqeq
97
+ if(Array.isArray(k3)) { k3 = k3.filter(v => v != null); }
98
+ myTr[k1][k2] = k3;
99
+ });
100
+ });
101
+ }
102
+
103
+ myTr.PREF_LANG = lang;
104
+
105
+ return myTr;
106
+ }
107
+
108
+
109
+ /**
110
+ * Get best matching label based on user language
111
+ * @param {object} labels The key->value list of labels
112
+ * @param {string} [lang] The language code (fr, en) (defaults to browser preferences)
113
+ * @returns {string} The best matching label
114
+ */
115
+ export function getBestLabel(labels, lang) {
116
+ // All to lowercase to avoid matching issues
117
+ lang = lang ? lang.toLowerCase() : null;
118
+ labels = Object.fromEntries(Object.entries(labels).map(([k,v]) => [k.toLowerCase(), v]));
119
+
120
+ // No specific lang set -> use browser lang
121
+ if(!lang) {
122
+ lang = autoDetectLocale(Object.keys(labels), FALLBACK_LOCALE);
123
+ }
124
+
125
+ if(labels[lang]) { return labels[lang]; }
126
+ else if(lang.length > 2 && labels[lang.substring(0,2)]) { return labels[lang.substring(0,2)]; }
127
+ else { return labels[FALLBACK_LOCALE] || ""; }
128
+ }
@@ -0,0 +1,17 @@
1
+ import * as geocoder from "./geocoder.js";
2
+ import * as i18n from "./i18n.js";
3
+ import * as indoor from "./indoor.js";
4
+ import * as map from "./map.js";
5
+ import * as picture from "./picture.js";
6
+ import * as semantics from "./semantics.js";
7
+ import * as services from "./services.js";
8
+ import * as utils from "./utils.js";
9
+ import * as widgets from "./widgets.js";
10
+
11
+ export { geocoder, i18n, indoor, map, picture, semantics, services, utils, widgets };
12
+ export {default as API} from "./API.js";
13
+ export {default as InitParameters} from "./InitParameters.js";
14
+ export {default as MapStyleComposer} from "./MapStyleComposer.js";
15
+ export {default as PhotoAdapter} from "./PhotoAdapter.js";
16
+ export {default as PresetsManager} from "./PresetsManager.js";
17
+ export {default as URLHandler} from "./URLHandler.js";
@@ -0,0 +1,14 @@
1
+ // Lightweight export for PhotoViewer
2
+ import * as i18n from "./i18n.js";
3
+ import * as picture from "./picture.js";
4
+ import * as semantics from "./semantics.js";
5
+ import * as services from "./services.js";
6
+ import * as utils from "./utils.js";
7
+ import * as widgets from "./widgets.js";
8
+
9
+ export { i18n, picture, semantics, services, utils, widgets };
10
+ export {default as API} from "./API.js";
11
+ export {default as InitParameters} from "./InitParameters.js";
12
+ export {default as PhotoAdapter} from "./PhotoAdapter.js";
13
+ export {default as PresetsManager} from "./PresetsManager.js";
14
+ export {default as URLHandler} from "./URLHandler.js";
@@ -0,0 +1,200 @@
1
+ import { IndoorEqualSpritesURL } from "./services.js";
2
+ import { createWebComp } from "./widgets.js";
3
+
4
+ export const DISABLED_LEVEL = "-1000";
5
+ const LEVEL_SEM_LAYER = "levels";
6
+
7
+
8
+ export function isIndoorEqualAvailable() {
9
+ try {
10
+ // eslint-disable-next-line no-undef
11
+ IndoorEqual;
12
+ return true;
13
+ }
14
+ catch(e) {
15
+ return false;
16
+ }
17
+ }
18
+
19
+ /**
20
+ * Enables indoor= plugin on MapLibre
21
+ * @param {Map} map The MapLibre map
22
+ * @param {boolean} [forceSwitchOn=false] Set to true to skip init options check for default visibility
23
+ */
24
+ export function initIndoorEqualOnMap(map, forceSwitchOn = false) {
25
+ if(map._options.indoor) {
26
+ if(isIndoorEqualAvailable()) {
27
+ if(!forceSwitchOn && map._options.indoor.visible === false) {
28
+ return;
29
+ }
30
+
31
+ // eslint-disable-next-line no-undef
32
+ map.indoorEqual = new IndoorEqual(map, map._options.indoor);
33
+ map.addControl(map.indoorEqual);
34
+ map.indoorEqual.loadSprite(IndoorEqualSpritesURL());
35
+
36
+ // Override level refresh to keep "disabled" state after map move
37
+ map.indoorEqual._refreshAfterLevelsUpdate = function() {
38
+ // eslint-disable-next-line eqeqeq
39
+ if (!this.levels.includes(this.level) && this.level != DISABLED_LEVEL) {
40
+ this.setLevel("0");
41
+ }
42
+ };
43
+
44
+ // Override updateLevels to take into account pictures levels
45
+ const SEM_SRC_ID = "sem-"+LEVEL_SEM_LAYER;
46
+ map.indoorEqual._updateLevels = function() {
47
+ if(
48
+ this.map.getSource(this.source.sourceId)
49
+ && this.map.isSourceLoaded(this.source.sourceId)
50
+ && this.map.getSource(SEM_SRC_ID)
51
+ && this.map.isSourceLoaded(SEM_SRC_ID)
52
+ ) {
53
+ let levels = new Set();
54
+
55
+ // Read levels from indoor= tiles
56
+ this.map.querySourceFeatures(this.source.sourceId, { sourceLayer: "area" })
57
+ .forEach(f => {
58
+ if(f.properties.class === "level") { return; }
59
+ if(f.properties.level !== undefined) {
60
+ levels.add(f.properties.level.toString());
61
+ }
62
+ });
63
+
64
+ // Read levels from Panoramax tiles
65
+ this.map.querySourceFeatures(SEM_SRC_ID, { sourceLayer: "layer" })
66
+ .forEach(f => {
67
+ if(f.properties["osm|level"] !== undefined) {
68
+ levels.add(f.properties["osm|level"].toString());
69
+ }
70
+ });
71
+
72
+ // If at least one level exist, add floor just to be sure it's always present
73
+ if(levels.size > 0) { levels.add("0"); }
74
+
75
+ if(levels.symmetricDifference(new Set(this.levels)).size !== 0) {
76
+ this.levels = [...levels].sort((a, b) => parseFloat(a) - parseFloat(b)).reverse();
77
+ this._emitLevelsChange();
78
+ this._refreshAfterLevelsUpdate();
79
+ }
80
+ }
81
+ };
82
+
83
+ // Store features IDs by level
84
+ map._indoorFeaturesIDs = { pictures: {}, sequences: {} };
85
+ map.on("sourcedata", LEVEL_SEM_LAYER, e => {
86
+ if(e.sourceId === SEM_SRC_ID) {
87
+ e.features.forEach(f => {
88
+ if(!map._indoorFeaturesIDs.pictures[f.properties["osm|level"]]) {
89
+ map._indoorFeaturesIDs.pictures[f.properties["osm|level"]] = new Set();
90
+ }
91
+ if(!map._indoorFeaturesIDs.sequences[f.properties["osm|level"]]) {
92
+ map._indoorFeaturesIDs.sequences[f.properties["osm|level"]] = new Set();
93
+ }
94
+ map._indoorFeaturesIDs.pictures[f.properties["osm|level"]].add(f.properties.picid);
95
+ map._indoorFeaturesIDs.sequences[f.properties["osm|level"]].add(f.properties.seqid);
96
+ });
97
+ updateIndoorLevelFilteringThrottled();
98
+ }
99
+ });
100
+
101
+ // Create semantic overlay layer for loading with-level pictures
102
+ const postMapLoad = () => {
103
+ map.addSemanticOverlay?.(
104
+ LEVEL_SEM_LAYER,
105
+ "\"semantics.osm|level\" IS NOT NULL",
106
+ {
107
+ type: "circle",
108
+ layout: { visibility: "visible" },
109
+ paint: { "circle-opacity": 0 }
110
+ }
111
+ );
112
+
113
+ // Load level from component/URL if any
114
+ if(forceSwitchOn && map._parent._initParams?.getMapPostInit()?.level === DISABLED_LEVEL) {
115
+ map.indoorEqual.setLevel("0");
116
+ }
117
+ else if(![null, undefined, ""].includes(map._parent._initParams?.getMapPostInit()?.level)) {
118
+ map.indoorEqual.setLevel(map._parent._initParams?.getMapPostInit()?.level);
119
+ }
120
+ };
121
+ // Wait for map load, done with loop due to an issue with styleload event not sent properly
122
+ if(map.isStyleLoaded()) { postMapLoad(); }
123
+ else {
124
+ const waitForStyle = setInterval(() => {
125
+ if(map.isStyleLoaded()) {
126
+ postMapLoad();
127
+ clearInterval(waitForStyle);
128
+ }
129
+ }, 250);
130
+ }
131
+
132
+ // Add map widget for level select
133
+ map._parent.grid.appendChild(createWebComp("pnx-level-select", {
134
+ slot: "bottom-right",
135
+ _parent: map._parent,
136
+ class: "pnx-only-map pnx-print-hidden",
137
+ }));
138
+
139
+ // Filter indoor pictures based on selected level
140
+ let updateIndoorLevelFilteringThrottler;
141
+ const updateIndoorLevelFiltering = () => {
142
+ // Disabled = show everything
143
+ if(map.indoorEqual.level === DISABLED_LEVEL) {
144
+ map.restrictVisibleFeatures("hide", "pictures", []);
145
+ map.restrictVisibleFeatures("hide", "sequences", []);
146
+ }
147
+ // Ground level = hide all other levels features
148
+ else if(map.indoorEqual.level === "0") {
149
+ // Pictures
150
+ const nonGroundPics = new Set();
151
+ Object.entries(map._indoorFeaturesIDs.pictures).forEach(([lvl, features]) => {
152
+ // eslint-disable-next-line eqeqeq
153
+ if(lvl != "0") { features.forEach(f => nonGroundPics.add(f)); }
154
+ });
155
+ map.restrictVisibleFeatures("hide", "pictures", [...nonGroundPics]);
156
+
157
+ // Sequences
158
+ let nonGroundSeqs = new Set();
159
+ Object.entries(map._indoorFeaturesIDs.sequences).forEach(([lvl, features]) => {
160
+ // eslint-disable-next-line eqeqeq
161
+ if(lvl != "0") {
162
+ nonGroundSeqs = nonGroundSeqs.union(features);
163
+ }
164
+ });
165
+ if(map._indoorFeaturesIDs.sequences["0"]) { nonGroundSeqs = nonGroundSeqs.difference(map._indoorFeaturesIDs.sequences["0"]); } // To skip multi-level sequences
166
+ map.restrictVisibleFeatures("hide", "sequences", [...nonGroundSeqs]);
167
+ }
168
+ // Other level = show only appropriate level features
169
+ else {
170
+ map.restrictVisibleFeatures(
171
+ "keep",
172
+ "pictures",
173
+ map._indoorFeaturesIDs.pictures[map.indoorEqual.level]
174
+ ? [...map._indoorFeaturesIDs.pictures[map.indoorEqual.level]]
175
+ : []
176
+ );
177
+ map.restrictVisibleFeatures(
178
+ "keep",
179
+ "sequences",
180
+ map._indoorFeaturesIDs.sequences[map.indoorEqual.level]
181
+ ? [...map._indoorFeaturesIDs.sequences[map.indoorEqual.level]]
182
+ : []
183
+ );
184
+ }
185
+ };
186
+ const updateIndoorLevelFilteringThrottled = () => {
187
+ if(updateIndoorLevelFilteringThrottler) {
188
+ clearTimeout(updateIndoorLevelFilteringThrottler);
189
+ updateIndoorLevelFilteringThrottler = undefined;
190
+ }
191
+ updateIndoorLevelFilteringThrottler = setTimeout(updateIndoorLevelFiltering, 250);
192
+ };
193
+
194
+ map.indoorEqual.on("levelchange", updateIndoorLevelFilteringThrottled);
195
+ }
196
+ else {
197
+ console.error("The indoor= plugin is not enabled. Please add the maplibre-gl-indoorequal before calling 'indoor' option of Panoramax Viewer.");
198
+ }
199
+ }
200
+ }