@mapxus/mapxus-map-jp 10.0.0 → 10.1.0

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/dist/utils.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("@mapxus/mapxus-auth-jp"),R="10.0.0",v={version:R},c=v.version,D="https://map-api.mapxus.co.jp/bms",I=10,A=1;var m={value:()=>{}};function _(){for(var t=0,n=arguments.length,e={},i;t<n;++t){if(!(i=arguments[t]+"")||i in e||/[\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new u(e)}function u(t){this._=t}function w(t,n){return t.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0&&(i=e.slice(s+1),e=e.slice(0,s)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}u.prototype=_.prototype={constructor:u,on:function(t,n){var e=this._,i=w(t+"",e),s,o=-1,E=i.length;if(arguments.length<2){for(;++o<E;)if((s=(t=i[o]).type)&&(s=H(e[s],t.name)))return s;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<E;)if(s=(t=i[o]).type)e[s]=p(e[s],t.name,n);else if(n==null)for(s in e)e[s]=p(e[s],t.name,null);return this},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new u(t)},call:function(t,n){if((s=arguments.length-2)>0)for(var e=new Array(s),i=0,s,o;i<s;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,s=o.length;i<s;++i)o[i].value.apply(n,e)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],s=0,o=i.length;s<o;++s)i[s].value.apply(n,e)}};function H(t,n){for(var e=0,i=t.length,s;e<i;++e)if((s=t[e]).name===n)return s.value}function p(t,n,e){for(var i=0,s=t.length;i<s;++i)if(t[i].name===n){t[i]=m,t=t.slice(0,i).concat(t.slice(i+1));break}return e!=null&&t.push({name:n,value:e}),t}class l{static instance;_globalDispatcher;_httpSession;_theme=null;_isSDKInitialized=!1;constructor(){}static getInstance(){return l.instance||(l.instance=new l),l.instance}setGlobalDispatcher(n){this._globalDispatcher=n}getGlobalDispatcher(){return this._globalDispatcher}async getHttpSession(){return this._httpSession||(this.registerSDK(),this._httpSession=await h.HTTPSession.create(h.SDKName.MapSDK,h.base64Encode(`version-${c}`)),this._httpSession.setBaseURL(D),this._httpSession.setRetryConfig(3)),this._httpSession}registerSDK(){this._isSDKInitialized||(this._isSDKInitialized=!0,h.reportLog(`${h.SDKName.MapSDK} initialized`))}get theme(){return this._theme}setTheme(n){this._theme=n}clear(){this._httpSession.destroy(),this._globalDispatcher=null,l.instance=null}}const S=["unauthorized","initError"],a=globalThis,f=_(...S);l.getInstance().setGlobalDispatcher(f);a.MapxusMapEvents=a.MapxusMapEvents||{};a.MapxusMapEvents.on=function(t,n){return f.on(t,n),{off:()=>f.on(t,null)}};var r=(t=>(t.ENGLISH="en",t.CHINESE_SIMPLIFIED="zh-Hans",t.CHINESE_TRADITIONAL="zh-Hant",t.CHINESE_TRADITIONAL_TW="zh-Hant-TW",t.JAPANESE="ja",t.KOREAN="ko",t.FILIPINO="fil",t.INDONESIAN="id",t.PORTUGUESE="pt",t.THAI="th",t.VIETNAMESE="vi",t.ARABIC="ar",t))(r||{});function T(t){let n=null;return d(t)?n=r.ENGLISH:M(t)?n=r.CHINESE_SIMPLIFIED:K(t)?n=r.CHINESE_TRADITIONAL:L(t)?n=r.CHINESE_TRADITIONAL_TW:F(t)?n=r.JAPANESE:$(t)?n=r.KOREAN:b(t)?n=r.FILIPINO:z(t)?n=r.INDONESIAN:G(t)?n=r.PORTUGUESE:B(t)?n=r.THAI:P(t)?n=r.VIETNAMESE:C(t)&&(n=r.ARABIC),n}function d(t){return/^en(-(US|GB|AU))?$/.test(t)}function M(t){return/^zh(-(Hans|CN))?$/.test(t)}function K(t){return/^zh-(Hant|HK|MO)$/.test(t)}function L(t){return t==="zh-TW"}function F(t){return/^ja(-JP)?$/.test(t)}function $(t){return/^ko(-KR)?$/.test(t)}function b(t){return/^(fil|tl)(-PH)?$/.test(t)}function z(t){return/^id(-ID)?$/.test(t)}function G(t){return/^pt(-(BR|PT))?$/.test(t)}function B(t){return/^th(-TH)?$/.test(t)}function P(t){return/^vi(-VN)?$/.test(t)}function C(t){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(t)}const N="reserve_mapxus-level-fill",O="reserve_mapxus-shared-level-fill",U={convertBrowserLangToPresetLang:T,VERSION:c,OFFSET:I,PAGE:A,ERRORS:S,ASSISTANT_LAYER_INDOOR_FLOORS:N,ASSISTANT_LAYER_SHARED_FLOORS:O};exports.ASSISTANT_LAYER_INDOOR_FLOORS=N;exports.ASSISTANT_LAYER_SHARED_FLOORS=O;exports.ERRORS=S;exports.OFFSET=I;exports.PAGE=A;exports.VERSION=c;exports.convertBrowserLangToPresetLang=T;exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("d3-dispatch"),n=require("@mapxus/mapxus-auth-jp"),p="10.1.0",T={version:p},S=T.version,f="https://map-api.mapxus.co.jp/bms",l=10,E=1;class e{static instance;_globalDispatcher;_httpSession;_theme=null;_isSDKInitialized=!1;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}setGlobalDispatcher(s){this._globalDispatcher=s}getGlobalDispatcher(){return this._globalDispatcher}async getHttpSession(){return this._httpSession||(this.registerSDK(),this._httpSession=await n.HTTPSession.create(n.SDKName.MapSDK,n.base64Encode(`version-${S}`)),this._httpSession.setBaseURL(f),this._httpSession.setRetryConfig(3)),this._httpSession}registerSDK(){this._isSDKInitialized||(this._isSDKInitialized=!0,n.reportLog(`${n.SDKName.MapSDK} initialized`))}get theme(){return this._theme}setTheme(s){this._theme=s}clear(){this._httpSession.destroy(),this._globalDispatcher=null,e.instance=null}}const c=["unauthorized","initError"],r=globalThis,o=A.dispatch(...c);e.getInstance().setGlobalDispatcher(o);r.MapxusMapEvents=r.MapxusMapEvents||{};r.MapxusMapEvents.on=function(t,s){return o.on(t,s),{off:()=>o.on(t,null)}};var i=(t=>(t.ENGLISH="en",t.CHINESE_SIMPLIFIED="zh-Hans",t.CHINESE_TRADITIONAL="zh-Hant",t.CHINESE_TRADITIONAL_TW="zh-Hant-TW",t.JAPANESE="ja",t.KOREAN="ko",t.FILIPINO="fil",t.INDONESIAN="id",t.PORTUGUESE="pt",t.THAI="th",t.VIETNAMESE="vi",t.ARABIC="ar",t))(i||{});function I(t){let s=null;return u(t)?s=i.ENGLISH:N(t)?s=i.CHINESE_SIMPLIFIED:_(t)?s=i.CHINESE_TRADITIONAL:O(t)?s=i.CHINESE_TRADITIONAL_TW:R(t)?s=i.JAPANESE:D(t)?s=i.KOREAN:H(t)?s=i.FILIPINO:d(t)?s=i.INDONESIAN:M(t)?s=i.PORTUGUESE:m(t)?s=i.THAI:v(t)?s=i.VIETNAMESE:K(t)&&(s=i.ARABIC),s}function u(t){return/^en(-(US|GB|AU))?$/.test(t)}function N(t){return/^zh(-(Hans|CN))?$/.test(t)}function _(t){return/^zh-(Hant|HK|MO)$/.test(t)}function O(t){return t==="zh-TW"}function R(t){return/^ja(-JP)?$/.test(t)}function D(t){return/^ko(-KR)?$/.test(t)}function H(t){return/^(fil|tl)(-PH)?$/.test(t)}function d(t){return/^id(-ID)?$/.test(t)}function M(t){return/^pt(-(BR|PT))?$/.test(t)}function m(t){return/^th(-TH)?$/.test(t)}function v(t){return/^vi(-VN)?$/.test(t)}function K(t){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(t)}const h="reserve_mapxus-level-fill",a="reserve_mapxus-shared-level-fill",L={convertBrowserLangToPresetLang:I,VERSION:S,OFFSET:l,PAGE:E,ERRORS:c,ASSISTANT_LAYER_INDOOR_FLOORS:h,ASSISTANT_LAYER_SHARED_FLOORS:a};exports.ASSISTANT_LAYER_INDOOR_FLOORS=h;exports.ASSISTANT_LAYER_SHARED_FLOORS=a;exports.ERRORS=c;exports.OFFSET=l;exports.PAGE=E;exports.VERSION=S;exports.convertBrowserLangToPresetLang=I;exports.default=L;
package/es/index.d.ts CHANGED
@@ -43,231 +43,6 @@ export interface ISelectedHighlightStyle {
43
43
  lineOpacity?: number;
44
44
  lineOffset?: number;
45
45
  }
46
- export type TSelectedIndoorData = {
47
- venue: MapGeoJSONFeature;
48
- building: MapGeoJSONFeature;
49
- floor?: IFloor;
50
- } | {
51
- sharedFloor: ISharedFloor;
52
- venue: MapGeoJSONFeature;
53
- } | null;
54
- export type TFeatureMap = Map<string, MapGeoJSONFeature>;
55
- export interface ILayeredOptions {
56
- selectedVenueId: string | null;
57
- venueMap: TFeatureMap;
58
- buildingMap: TFeatureMap;
59
- sharedFloorMap: TFeatureMap;
60
- }
61
- export interface IDisplayedLevel {
62
- level: string;
63
- overlap: string[] | null;
64
- venueId: string;
65
- }
66
- export interface ILayeredData {
67
- displayedLevels: IDisplayedLevel[];
68
- selectedLevelIds: string[];
69
- alwaysDisplayedSharedLevelIds: string[];
70
- maskBuildingIds: string[];
71
- maskSharedFloorIds: string[];
72
- }
73
- declare class FloorsLayeredHandler {
74
- private _isMaskMode;
75
- private _hiddenBuildings;
76
- private _history;
77
- constructor(maskMode: boolean);
78
- getLayeredData(options: ILayeredOptions): ILayeredData;
79
- getHiddenBuildings(): string[];
80
- }
81
- declare class DragPanHandler {
82
- private _maplibre;
83
- private _isAnimated;
84
- private _bounds;
85
- private _boundsPadding;
86
- private _center;
87
- private _fitBoundsTimer;
88
- constructor(maplibre: maplibregl$1.Map, padding: number | PaddingOptions);
89
- setAnimated(animated: boolean): void;
90
- setBounds(bounds: LngLatBoundsLike | null): void;
91
- getBounds(): LngLatBoundsLike | null;
92
- setCenter(lnglat: LngLatLike | null): void;
93
- fitBounds(): Promise<unknown>;
94
- panToCenter(): void;
95
- }
96
- export declare class Indoor extends TinyEmitter {
97
- private _map;
98
- private _features;
99
- private _allVenuesMap;
100
- private _allBuildingsMap;
101
- private _allSharedLevelsMap;
102
- private _curBuildingId;
103
- private _curBuildingFeature;
104
- private _curSharedLevelId;
105
- private _floor;
106
- private _sharedFloor;
107
- private _outdoorMapShown;
108
- private _originIndoorLayers;
109
- private _outdoorLayers;
110
- private _curVenueId;
111
- private _curVenueFeature;
112
- private _selectedHighlightStyle;
113
- private _upperLayers;
114
- private _commonPoiLayers;
115
- private _sectionFillLineLayers;
116
- private _sectionSymbolLayers;
117
- private _middleLayers;
118
- private _lowerLayers;
119
- private _excludedPoisInMiddle;
120
- private _dispatch;
121
- private readonly _startWithIndoorView;
122
- private _indoorMapLoaded;
123
- private _isSelectSharedFloor;
124
- private readonly _isMaskMode;
125
- private _upperLevels;
126
- private _middleLevels;
127
- private _lowerLevels;
128
- private _featureIncomplete;
129
- private _fitBounds;
130
- private _dragPan;
131
- private _history;
132
- private _maskBuildings;
133
- private _maskSharedFloors;
134
- private _enableIndoorClickSelection;
135
- private _enableOutdoorClickSelection;
136
- private _zIndexHistory;
137
- private _floorSwitchScope;
138
- private _isDestroyed;
139
- private _abortQueryFeature;
140
- private _debounceRendering;
141
- layeredHandler: FloorsLayeredHandler;
142
- dragPanHandler: DragPanHandler;
143
- constructor(props: {
144
- map: maplibregl$1.Map;
145
- fitBounds: boolean;
146
- boundsPadding: number | PaddingOptions;
147
- maskNonSelectedAreas: boolean;
148
- startWithIndoorView: boolean;
149
- outdoorMapShown: boolean;
150
- enableIndoorClickSelection: boolean;
151
- enableOutdoorClickSelection: boolean;
152
- floorSwitchScope: FloorSwitchScope;
153
- selectedHighlightStyle?: ISelectedHighlightStyle;
154
- });
155
- destroy(): void;
156
- /**
157
- * @deprecated
158
- * Set whether to allow exiting building.
159
- * @param allow
160
- */
161
- setAllowOutdoorSwitch(allow: boolean): this;
162
- /**
163
- * @deprecated
164
- * Set whether to allow switching building.
165
- * @param allow
166
- */
167
- setAllowBuildingSwitch(allow: boolean): this;
168
- setAllowIndoorClickSelect(allow: boolean): void;
169
- setAllowOutdoorClickSelect(allow: boolean): void;
170
- setFloorSwitchScope(scope: FloorSwitchScope): void;
171
- /**
172
- * Get the current floor's information.
173
- */
174
- get floor(): IFloor | ISharedFloor | null;
175
- /**
176
- * Get the current building's information.
177
- * @returns {MapGeoJSONFeature | null}
178
- */
179
- get building(): MapGeoJSONFeature | null;
180
- /**
181
- * Get the current venue's information.
182
- * @returns {MapGeoJSONFeature | null}
183
- */
184
- get venue(): MapGeoJSONFeature | null;
185
- /**
186
- * Get the geo features of bbox.
187
- */
188
- get features(): MapGeoJSONFeature[];
189
- /**
190
- * Get features from bbox by id.
191
- * @param id
192
- * @param options
193
- */
194
- getFeaturesById(id: string, options?: {
195
- layerIds?: string[];
196
- filter?: (feature: MapGeoJSONFeature) => boolean;
197
- }): MapGeoJSONFeature[];
198
- /**
199
- * Switch floor by ordinal.
200
- * @param ordinal
201
- */
202
- switchFloorByOrdinal(ordinal: string | null): Promise<void>;
203
- setOutdoorMapShown(shown: boolean): void;
204
- /**
205
- * Set the style of the selected floor border. If set to null, the border will be invisible.
206
- * @param style {ISelectedHighlightStyle | null}
207
- */
208
- setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): void;
209
- /**
210
- * Listen for the indoor map state, including the changes of venue, building and floor.
211
- * @param listener
212
- */
213
- onMapChange(listener: (params: {
214
- venue: MapGeoJSONFeature | null;
215
- building: MapGeoJSONFeature | null;
216
- floor: IFloor;
217
- }) => void): {
218
- unsubscribe: VoidFunction;
219
- };
220
- /**
221
- * Select a building feature
222
- * @param feature {MapGeoJSONFeature | null}
223
- * @param options {floorId?: string, dragPan?: boolean}
224
- */
225
- selectBuilding(feature: MapGeoJSONFeature | null, options?: {
226
- floorId?: string;
227
- featureIncomplete?: boolean;
228
- }): Promise<void>;
229
- selectSharedFloor(sharedFloor: ISharedFloor, venue: MapGeoJSONFeature, options?: {
230
- featureIncomplete?: boolean;
231
- }): Promise<void>;
232
- updateCustomLayers(): void;
233
- updateRendering(): void;
234
- panToBuildingCenter(): Promise<void>;
235
- panToVenueCenter(): Promise<void>;
236
- private _waitForFeatureLoaded;
237
- setDragPan(dragPan: boolean | "restrict"): void;
238
- setFitBounds(fitBounds: boolean): void;
239
- queryIndoorFeaturesByClickPoint(point: PointLike): Promise<TSelectedIndoorData>;
240
- selectByClickMap(data: TSelectedIndoorData): Promise<void>;
241
- private _bindMaplibreEventListeners;
242
- private _clear;
243
- private _getIndoorFeatures;
244
- private _getBuildingFloorByOrdinal;
245
- private _isCurrentFeature;
246
- private _setOutdoorVisibility;
247
- private _addReserveFloorLayers;
248
- private _addBuildingMaskLayer;
249
- private _updateUnselectedMask;
250
- private _addSelectedHighlightLayers;
251
- private _filterSelectedHighlight;
252
- private _copyOverlapLayers;
253
- private _copySharedFloorBackgroundLayers;
254
- private _updateFeatures;
255
- private _calExcludedPoisInMiddle;
256
- private _updateSelectedFeatures;
257
- private _layerFloors;
258
- private _layerSelectedLevels;
259
- private _layerUnselectedLevels;
260
- private _filterLayers;
261
- private _filterIndoorLayers;
262
- private _queryVenueFeature;
263
- private _getBuildingDisplayedOrdinal;
264
- private _updateFloorState;
265
- private _checkAndPanToBuilding;
266
- private _queryVisibleFeature;
267
- private _queryRenderedFeatures;
268
- private _dispatchIndoorMapLoaded;
269
- private _changeOtherVenuesHistory;
270
- }
271
46
  export interface ILocation {
272
47
  lat: number;
273
48
  lon: number;
@@ -511,6 +286,223 @@ export interface IMapChangeEvent {
511
286
  building: MapGeoJSONFeature | null;
512
287
  floor: IFloor | ISharedFloor | null;
513
288
  }
289
+ export type TFeatureMap = Map<string, MapGeoJSONFeature>;
290
+ export interface ILayeredOptions {
291
+ selectedVenueId: string | null;
292
+ venueMap: TFeatureMap;
293
+ buildingMap: TFeatureMap;
294
+ sharedFloorMap: TFeatureMap;
295
+ }
296
+ export interface IDisplayedLevel {
297
+ level: string;
298
+ overlap: string[] | null;
299
+ venueId: string;
300
+ }
301
+ export interface ILayeredData {
302
+ displayedLevels: IDisplayedLevel[];
303
+ selectedLevelIds: string[];
304
+ alwaysDisplayedSharedLevelIds: string[];
305
+ maskBuildingIds: string[];
306
+ maskSharedFloorIds: string[];
307
+ }
308
+ declare class FloorsLayeredHandler {
309
+ private _isMaskMode;
310
+ private _hiddenBuildings;
311
+ private _history;
312
+ constructor(maskMode: boolean);
313
+ getLayeredData(options: ILayeredOptions): ILayeredData;
314
+ getHiddenBuildings(): string[];
315
+ }
316
+ declare class DragPanHandler {
317
+ private _maplibre;
318
+ private _isAnimated;
319
+ private _bounds;
320
+ private _boundsPadding;
321
+ private _center;
322
+ private _fitBoundsTimer;
323
+ constructor(maplibre: maplibregl$1.Map, padding: number | PaddingOptions);
324
+ setAnimated(animated: boolean): void;
325
+ setBounds(bounds: LngLatBoundsLike | null): void;
326
+ getBounds(): LngLatBoundsLike | null;
327
+ setCenter(lnglat: LngLatLike | null): void;
328
+ fitBounds(): Promise<unknown>;
329
+ panToCenter(): void;
330
+ }
331
+ export declare class Indoor extends TinyEmitter {
332
+ private _map;
333
+ private _features;
334
+ private _allVenuesMap;
335
+ private _allBuildingsMap;
336
+ private _allSharedLevelsMap;
337
+ private _curBuildingId;
338
+ private _curBuildingFeature;
339
+ private _curSharedLevelId;
340
+ private _floor;
341
+ private _sharedFloor;
342
+ private _outdoorMapShown;
343
+ private _originIndoorLayers;
344
+ private _outdoorLayers;
345
+ private _curVenueId;
346
+ private _curVenueFeature;
347
+ private _selectedHighlightStyle;
348
+ private _upperLayers;
349
+ private _commonPoiLayers;
350
+ private _sectionFillLineLayers;
351
+ private _sectionSymbolLayers;
352
+ private _middleLayers;
353
+ private _lowerLayers;
354
+ private _excludedPoisInMiddle;
355
+ private _dispatch;
356
+ private readonly _startWithIndoorView;
357
+ private _indoorMapLoaded;
358
+ private _isSelectSharedFloor;
359
+ private readonly _isMaskMode;
360
+ private _upperLevels;
361
+ private _middleLevels;
362
+ private _lowerLevels;
363
+ private _featureIncomplete;
364
+ private _fitBounds;
365
+ private _dragPan;
366
+ private _history;
367
+ private _maskBuildings;
368
+ private _maskSharedFloors;
369
+ private _enableIndoorClickSelection;
370
+ private _enableOutdoorClickSelection;
371
+ private _zIndexHistory;
372
+ private _floorSwitchScope;
373
+ private _isDestroyed;
374
+ private _abortQueryFeature;
375
+ private _debounceRendering;
376
+ layeredHandler: FloorsLayeredHandler;
377
+ dragPanHandler: DragPanHandler;
378
+ constructor(props: {
379
+ map: maplibregl$1.Map;
380
+ fitBounds: boolean;
381
+ boundsPadding: number | PaddingOptions;
382
+ maskNonSelectedAreas: boolean;
383
+ startWithIndoorView: boolean;
384
+ outdoorMapShown: boolean;
385
+ enableIndoorClickSelection: boolean;
386
+ enableOutdoorClickSelection: boolean;
387
+ floorSwitchScope: FloorSwitchScope;
388
+ selectedHighlightStyle?: ISelectedHighlightStyle;
389
+ });
390
+ destroy(): void;
391
+ /**
392
+ * @deprecated
393
+ * Set whether to allow exiting building.
394
+ * @param allow
395
+ */
396
+ setAllowOutdoorSwitch(allow: boolean): this;
397
+ /**
398
+ * @deprecated
399
+ * Set whether to allow switching building.
400
+ * @param allow
401
+ */
402
+ setAllowBuildingSwitch(allow: boolean): this;
403
+ setAllowIndoorClickSelect(allow: boolean): void;
404
+ setAllowOutdoorClickSelect(allow: boolean): void;
405
+ setFloorSwitchScope(scope: FloorSwitchScope): void;
406
+ /**
407
+ * Get the current floor's information.
408
+ */
409
+ get floor(): IFloor | ISharedFloor | null;
410
+ /**
411
+ * Get the current building's information.
412
+ * @returns {MapGeoJSONFeature | null}
413
+ */
414
+ get building(): MapGeoJSONFeature | null;
415
+ /**
416
+ * Get the current venue's information.
417
+ * @returns {MapGeoJSONFeature | null}
418
+ */
419
+ get venue(): MapGeoJSONFeature | null;
420
+ /**
421
+ * Get the geo features of bbox.
422
+ */
423
+ get features(): MapGeoJSONFeature[];
424
+ /**
425
+ * Get features from bbox by id.
426
+ * @param id
427
+ * @param options
428
+ */
429
+ getFeaturesById(id: string, options?: {
430
+ layerIds?: string[];
431
+ filter?: (feature: MapGeoJSONFeature) => boolean;
432
+ }): MapGeoJSONFeature[];
433
+ /**
434
+ * Switch floor by ordinal.
435
+ * @param ordinal
436
+ */
437
+ switchFloorByOrdinal(ordinal: string | null): Promise<void>;
438
+ setOutdoorMapShown(shown: boolean): void;
439
+ /**
440
+ * Set the style of the selected floor border. If set to null, the border will be invisible.
441
+ * @param style {ISelectedHighlightStyle | null}
442
+ */
443
+ setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): void;
444
+ /**
445
+ * Listen for the indoor map state, including the changes of venue, building and floor.
446
+ * @param listener
447
+ */
448
+ onMapChange(listener: (params: {
449
+ venue: MapGeoJSONFeature | null;
450
+ building: MapGeoJSONFeature | null;
451
+ floor: IFloor;
452
+ }) => void): {
453
+ unsubscribe: VoidFunction;
454
+ };
455
+ /**
456
+ * Select a building feature
457
+ * @param feature {MapGeoJSONFeature | null}
458
+ * @param options {floorId?: string, dragPan?: boolean}
459
+ */
460
+ selectBuilding(feature: MapGeoJSONFeature | null, options?: {
461
+ floorId?: string;
462
+ featureIncomplete?: boolean;
463
+ }): Promise<void>;
464
+ selectSharedFloor(sharedFloor: ISharedFloor, venue: MapGeoJSONFeature, options?: {
465
+ featureIncomplete?: boolean;
466
+ }): Promise<void>;
467
+ updateCustomLayers(): void;
468
+ updateRendering(): void;
469
+ panToBuildingCenter(): Promise<void>;
470
+ panToVenueCenter(): Promise<void>;
471
+ private _waitForFeatureLoaded;
472
+ setDragPan(dragPan: boolean | "restrict"): void;
473
+ setFitBounds(fitBounds: boolean): void;
474
+ selectByClickMap(data: IMapClickEvent): Promise<void>;
475
+ queryIndoorInfoByPoint(point: PointLike): IMapClickEvent;
476
+ private _bindMaplibreEventListeners;
477
+ private _clear;
478
+ private _getIndoorFeatures;
479
+ private _getBuildingFloorByOrdinal;
480
+ private _isCurrentFeature;
481
+ private _setOutdoorVisibility;
482
+ private _addReserveFloorLayers;
483
+ private _addBuildingMaskLayer;
484
+ private _updateUnselectedMask;
485
+ private _addSelectedHighlightLayers;
486
+ private _filterSelectedHighlight;
487
+ private _copyOverlapLayers;
488
+ private _copySharedFloorBackgroundLayers;
489
+ private _updateFeatures;
490
+ private _calExcludedPoisInMiddle;
491
+ private _updateSelectedFeatures;
492
+ private _layerFloors;
493
+ private _layerSelectedLevels;
494
+ private _layerUnselectedLevels;
495
+ private _filterLayers;
496
+ private _filterIndoorLayers;
497
+ private _queryVenueFeature;
498
+ private _getBuildingDisplayedOrdinal;
499
+ private _updateFloorState;
500
+ private _checkAndPanToBuilding;
501
+ private _queryVisibleFeature;
502
+ private _queryRenderedFeatures;
503
+ private _dispatchIndoorMapLoaded;
504
+ private _changeOtherVenuesHistory;
505
+ }
514
506
  export declare class BuildingFilterControl implements IControl {
515
507
  private _map;
516
508
  private _maplibre;
@@ -849,10 +841,7 @@ declare class Map$1 implements IMapxusMap {
849
841
  private _dispatch;
850
842
  private _fitBounds;
851
843
  private _history;
852
- private _debounceHTTPErrorHandler;
853
844
  private _transformRequestHandler;
854
- private _tokenRefreshingPromise;
855
- private _cancelTokenChangedListener;
856
845
  isDestroyed: boolean;
857
846
  /** @deprecated Use "outdoorClickSelection" instead */
858
847
  switchOutdoor: SwitchOutdoorHandler;
@@ -864,13 +853,17 @@ declare class Map$1 implements IMapxusMap {
864
853
  floorSelector: FloorSelectorHandler;
865
854
  constructor(options: IMapOption);
866
855
  /**
867
- * This function will be called once the indoor source loaded.
856
+ * Set a callback that fires once indoor map has finished rendering.
868
857
  * @param callback
869
858
  */
870
859
  renderComplete(callback: VoidFunction): void;
860
+ /**
861
+ * Set a callback that fires once map instance is destroyed.
862
+ * @param callback
863
+ */
871
864
  destroyed(callback: VoidFunction): void;
872
865
  /**
873
- * For transforming the request parameters of style resources before the map makes a request. Should be called before map.renderComplete().
866
+ * Transform the request options of style resources.
874
867
  * @param handler {maplibregl.RequestTransformFunction}
875
868
  */
876
869
  setTransformRequest(handler: maplibregl$1.RequestTransformFunction): void;
@@ -913,6 +906,18 @@ declare class Map$1 implements IMapxusMap {
913
906
  * @param shown
914
907
  */
915
908
  setOutdoorMapShown(shown: boolean): void;
909
+ /**
910
+ * Query indoor features and coordinate by screen point.
911
+ * @param point
912
+ * @returns
913
+ */
914
+ queryIndoorInfoByPoint(point: PointLike): IMapClickEvent;
915
+ /**
916
+ * @deprecated Use "queryIndoorInfoByPoint()" instead.
917
+ * Query indoor features by screen point({x, y}).
918
+ * @param point
919
+ * @returns
920
+ */
916
921
  queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
917
922
  /**
918
923
  * Get features from bbox by coordinates [and ordinal].
@@ -1268,6 +1273,19 @@ export declare class RoutePainter {
1268
1273
  private _updateLayers;
1269
1274
  private _filterRouteOpacity;
1270
1275
  }
1276
+ export declare enum FeatureType {
1277
+ Poi = "POI"
1278
+ }
1279
+ export interface ICategoryTree {
1280
+ category: string;
1281
+ child: ICategoryTree[];
1282
+ description: string | null;
1283
+ featureType: FeatureType;
1284
+ id: string;
1285
+ parents: string[];
1286
+ title: TMultilingualString;
1287
+ }
1288
+ export type TCategoryTreesResponse = IResponse<ICategoryTree[]>;
1271
1289
  export interface IVenueInlineSharedFloor extends IFloorBase, IMapServices {
1272
1290
  name: IMultilingualName;
1273
1291
  refBuilding: Array<string>;
@@ -1612,7 +1630,6 @@ export declare class Poi {
1612
1630
  private _queryIndoorFeaturesByFloor;
1613
1631
  }
1614
1632
  export declare class VenuesService {
1615
- private _api;
1616
1633
  constructor();
1617
1634
  /**
1618
1635
  * Search venues by ids.
@@ -1639,7 +1656,6 @@ export declare class VenuesService {
1639
1656
  private _filterVenueProperties;
1640
1657
  }
1641
1658
  export declare class BuildingsService {
1642
- private _api;
1643
1659
  constructor();
1644
1660
  /**
1645
1661
  * Search buildings by id[s].
@@ -1670,8 +1686,6 @@ export declare class BuildingsService {
1670
1686
  private _filterBuildingProperties;
1671
1687
  }
1672
1688
  export declare class PoisService {
1673
- private _poisApi;
1674
- private _categoriesGroupApi;
1675
1689
  constructor();
1676
1690
  /**
1677
1691
  * Search POIs by id[s].
@@ -1718,6 +1732,7 @@ export declare class PoisService {
1718
1732
  */
1719
1733
  searchByCategory(options: TSearchByCategoryOptions): Promise<TPoiResponse<TPoi | TSharedPoi>>;
1720
1734
  /**
1735
+ * @deprecated Use CategoryService.searchCategories() instead.
1721
1736
  * Search poi categories by venue id, building id, or floor id.
1722
1737
  * @param {TSearchCategoriesOptions} options
1723
1738
  */
@@ -1726,7 +1741,6 @@ export declare class PoisService {
1726
1741
  private _filterPoiProperties;
1727
1742
  }
1728
1743
  export declare class RouteService {
1729
- private _api;
1730
1744
  constructor();
1731
1745
  /**
1732
1746
  * Search the route of two or more points.
@@ -1734,6 +1748,15 @@ export declare class RouteService {
1734
1748
  */
1735
1749
  search(options: IRouteSearchOptions): Promise<IResponse<IResponseRoute>>;
1736
1750
  }
1751
+ export declare class CategoryService {
1752
+ constructor();
1753
+ /**
1754
+ * Search poi categories by venue id, building id, or floor id.
1755
+ * @param {TSearchCategoriesOptions} options
1756
+ */
1757
+ searchCategories(options: TSearchCategoriesOptions): Promise<TCategoriesResponse>;
1758
+ searchCategoryTrees(featureType: FeatureType): Promise<TCategoryTreesResponse>;
1759
+ }
1737
1760
  export interface IMapxusLib {
1738
1761
  Map: typeof Map$1;
1739
1762
  /** @deprecated */
@@ -1757,6 +1780,7 @@ export interface IMapxusLib {
1757
1780
  BuildingsService: typeof BuildingsService;
1758
1781
  PoisService: typeof PoisService;
1759
1782
  RouteService: typeof RouteService;
1783
+ CategoryService: typeof CategoryService;
1760
1784
  }
1761
1785
  declare const mapxusLib: IMapxusLib;
1762
1786