@mapxus/mapxus-map-jp 9.0.0 → 9.2.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/index.css +1 -200
- package/dist/index.umd.js +27 -2
- package/dist/utils.cjs +13 -0
- package/es/context-DcBNN51L.mjs +8294 -0
- package/es/index.d.ts +525 -364
- package/es/index.mjs +7316 -2
- package/es/utils/index.mjs +36 -2
- package/package.json +16 -5
- package/dist/index.umd.js.LICENSE.txt +0 -14
- package/es/index.mjs.LICENSE.txt +0 -14
- package/es/utils/index.mjs.LICENSE.txt +0 -14
- package/lib/index.cjs +0 -2
- package/lib/index.cjs.LICENSE.txt +0 -14
- package/lib/utils/index.cjs +0 -2
- package/lib/utils/index.cjs.LICENSE.txt +0 -14
package/es/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
|
-
import { EventEmitter } from 'events';
|
|
5
4
|
import { GeoJsonProperties, LineString, Point } from 'geojson';
|
|
6
5
|
import maplibregl$1 from 'maplibre-gl';
|
|
7
|
-
import { ControlPosition, ExpressionSpecification, FilterSpecification, IControl, LngLat, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike
|
|
6
|
+
import { ControlPosition, ExpressionSpecification, FilterSpecification, IControl, LngLat, LngLatBoundsLike, LngLatLike, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike } from 'maplibre-gl';
|
|
7
|
+
import { TinyEmitter } from 'tiny-emitter';
|
|
8
8
|
|
|
9
9
|
export declare enum PresetLanguage {
|
|
10
10
|
ENGLISH = "en",
|
|
@@ -21,15 +21,27 @@ export declare enum PresetLanguage {
|
|
|
21
21
|
ARABIC = "ar"
|
|
22
22
|
}
|
|
23
23
|
export declare enum ThemeType {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
/** @deprecated **/
|
|
25
|
+
CHRISTMAS = "christmas_mims2_v1",
|
|
26
|
+
/** @deprecated **/
|
|
27
|
+
HALLOWEEN = "halloween_mims2_v1",
|
|
28
|
+
/** @deprecated **/
|
|
29
|
+
MAPPY_BEE = "mappybee_mims2_v2",
|
|
30
|
+
/** @deprecated **/
|
|
31
|
+
MAPXUS = "mapxus_mims2_v1",
|
|
32
|
+
/** @deprecated **/
|
|
33
|
+
LANDS_D = "lands_d_mims2_v1",
|
|
34
|
+
/** @deprecated **/
|
|
35
|
+
COMMON = "common_mims2_v1",
|
|
30
36
|
/** @deprecated MAPXUS_V2 will be removed soon, please use MAPXUS_DEFAULT instead. */
|
|
31
37
|
MAPXUS_V2 = "mapxus_v2",
|
|
32
|
-
MAPXUS_DEFAULT = "
|
|
38
|
+
MAPXUS_DEFAULT = "mapxus_v8",
|
|
39
|
+
ROSE_TEA = "rose_tea",
|
|
40
|
+
PEAR_SORBET = "pear_sorbet",
|
|
41
|
+
CITY_WALK = "city_walk",
|
|
42
|
+
MOCHA_MOUSSE = "mocha_mousse",
|
|
43
|
+
SECTION_DISPLAY_BY_COLOR = "mapxus_v7_with_section_v2",
|
|
44
|
+
SECTION_DISPLAY_BY_CATEGORY = "mapxus_v7_with_section_v3"
|
|
33
45
|
}
|
|
34
46
|
export declare enum AccessControlOrigin {
|
|
35
47
|
Access = "access_control",
|
|
@@ -41,14 +53,31 @@ export interface IBbox {
|
|
|
41
53
|
minLat: number;
|
|
42
54
|
minLon: number;
|
|
43
55
|
}
|
|
56
|
+
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
57
|
+
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
44
58
|
export type TMultilingualString = Partial<Record<PresetLanguage, string>>;
|
|
45
59
|
export interface IMultilingualName extends TMultilingualString {
|
|
46
60
|
default: string;
|
|
47
61
|
}
|
|
48
|
-
export
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
export interface IFloor {
|
|
63
|
+
code: string;
|
|
64
|
+
id: string;
|
|
65
|
+
ordinal: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ISharedFloor {
|
|
68
|
+
id: string;
|
|
69
|
+
ordinal: string;
|
|
70
|
+
name: IMultilingualName;
|
|
71
|
+
}
|
|
72
|
+
export interface IFloorSelectorStyle {
|
|
73
|
+
fontColor?: string;
|
|
74
|
+
activeFontColor?: string;
|
|
75
|
+
backgroundColor?: string;
|
|
76
|
+
activeBackgroundColor?: string;
|
|
77
|
+
itemSize?: number;
|
|
78
|
+
itemCount?: number;
|
|
79
|
+
defaultFolded?: boolean;
|
|
80
|
+
}
|
|
52
81
|
export interface ILocation {
|
|
53
82
|
lat: number;
|
|
54
83
|
lon: number;
|
|
@@ -58,6 +87,66 @@ export type TResponseResult<T> = AxiosPromise<{
|
|
|
58
87
|
message: string;
|
|
59
88
|
result: T;
|
|
60
89
|
}>;
|
|
90
|
+
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
91
|
+
housenumber: string;
|
|
92
|
+
street: string;
|
|
93
|
+
}>;
|
|
94
|
+
export interface IBuildingBasicInfo {
|
|
95
|
+
address: IMultilingualAddress;
|
|
96
|
+
bbox: IBbox;
|
|
97
|
+
city?: string;
|
|
98
|
+
country: string;
|
|
99
|
+
description: TMultilingualString;
|
|
100
|
+
labelCenter: ILocation;
|
|
101
|
+
name: IMultilingualName;
|
|
102
|
+
region: string;
|
|
103
|
+
type: string;
|
|
104
|
+
}
|
|
105
|
+
export interface IBusinessInfo {
|
|
106
|
+
appUrl?: {
|
|
107
|
+
android?: string;
|
|
108
|
+
ios?: string;
|
|
109
|
+
};
|
|
110
|
+
businessStatus?: {
|
|
111
|
+
status: "OPEN" | "TEMPORARILY_CLOSED";
|
|
112
|
+
};
|
|
113
|
+
email?: string;
|
|
114
|
+
icon?: string;
|
|
115
|
+
openingHours?: string;
|
|
116
|
+
phone?: string;
|
|
117
|
+
photos?: Array<IPhotoSpec>;
|
|
118
|
+
publicData?: string[];
|
|
119
|
+
totalPhotoCount?: number;
|
|
120
|
+
website?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface IMapServices {
|
|
123
|
+
signalMap: boolean;
|
|
124
|
+
visualMap: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface IFloorBase {
|
|
127
|
+
id: string;
|
|
128
|
+
ordinal: number;
|
|
129
|
+
}
|
|
130
|
+
export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
|
|
131
|
+
code: string;
|
|
132
|
+
}
|
|
133
|
+
export interface IBuilding extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
134
|
+
buildingId: string;
|
|
135
|
+
buildingName: IMultilingualName;
|
|
136
|
+
buildingOutlineId: number;
|
|
137
|
+
defaultFloor?: string;
|
|
138
|
+
floors: IBuildingInlineFloor[];
|
|
139
|
+
groundFloor: string;
|
|
140
|
+
isPrivate: "yes" | "no";
|
|
141
|
+
organization: string;
|
|
142
|
+
venueId: string;
|
|
143
|
+
venueName: IMultilingualName;
|
|
144
|
+
}
|
|
145
|
+
export interface IResponseBuildings {
|
|
146
|
+
buildings: IBuilding[];
|
|
147
|
+
total: number;
|
|
148
|
+
}
|
|
149
|
+
export type TPromiseBuildings = TResponseResult<IResponseBuildings>;
|
|
61
150
|
export declare enum DistanceSearchType {
|
|
62
151
|
POINT = "Point",
|
|
63
152
|
POLYGON = "Polygon"
|
|
@@ -74,6 +163,12 @@ export declare enum PoisSortBy {
|
|
|
74
163
|
ABSOLUTE_DISTANCE = "AbsoluteDistance",
|
|
75
164
|
ACTUAL_DISTANCE = "ActualDistance"
|
|
76
165
|
}
|
|
166
|
+
export interface ISection {
|
|
167
|
+
category: string;
|
|
168
|
+
id: string;
|
|
169
|
+
sectionName: IMultilingualName;
|
|
170
|
+
correlationId?: string;
|
|
171
|
+
}
|
|
77
172
|
export interface IPoiCommonOptions {
|
|
78
173
|
accessibilityDetail: IMultilingualName;
|
|
79
174
|
category: string[];
|
|
@@ -84,6 +179,7 @@ export interface IPoiCommonOptions {
|
|
|
84
179
|
name: IMultilingualName;
|
|
85
180
|
osmRefId: number;
|
|
86
181
|
poiId: string;
|
|
182
|
+
sections?: ISection[];
|
|
87
183
|
venueId: string;
|
|
88
184
|
}
|
|
89
185
|
export interface IPoiFloor {
|
|
@@ -163,89 +259,29 @@ export interface IOrientationSharedPoi extends ISharedPoiFloor, IOrientationPoiC
|
|
|
163
259
|
}
|
|
164
260
|
export type TOrientationPoi = IOrientationNormalPoi | IOrientationSharedPoi;
|
|
165
261
|
export type TPromiseOrientationPois = TResponseResult<TOrientationPoi[]>;
|
|
166
|
-
export interface IBuildingBasicInfo {
|
|
167
|
-
address: IMultilingualAddress;
|
|
168
|
-
bbox: IBbox;
|
|
169
|
-
city?: string;
|
|
170
|
-
country: string;
|
|
171
|
-
description: TMultilingualString;
|
|
172
|
-
labelCenter: ILocation;
|
|
173
|
-
name: IMultilingualName;
|
|
174
|
-
region: string;
|
|
175
|
-
type: string;
|
|
176
|
-
}
|
|
177
|
-
export interface IBusinessInfo {
|
|
178
|
-
appUrl?: {
|
|
179
|
-
android?: string;
|
|
180
|
-
ios?: string;
|
|
181
|
-
};
|
|
182
|
-
businessStatus?: {
|
|
183
|
-
status: "OPEN" | "TEMPORARILY_CLOSED";
|
|
184
|
-
};
|
|
185
|
-
email?: string;
|
|
186
|
-
icon?: string;
|
|
187
|
-
openingHours?: string;
|
|
188
|
-
phone?: string;
|
|
189
|
-
photos?: Array<IPhotoSpec>;
|
|
190
|
-
publicData?: string[];
|
|
191
|
-
totalPhotoCount?: number;
|
|
192
|
-
website?: string;
|
|
193
|
-
}
|
|
194
|
-
export interface IMapServices {
|
|
195
|
-
signalMap: boolean;
|
|
196
|
-
visualMap: boolean;
|
|
197
|
-
}
|
|
198
|
-
export interface IFloorBase {
|
|
199
|
-
id: string;
|
|
200
|
-
ordinal: number;
|
|
201
|
-
}
|
|
202
|
-
export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
|
|
203
|
-
code: string;
|
|
204
|
-
}
|
|
205
|
-
export interface IBuilding extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
206
|
-
buildingId: string;
|
|
207
|
-
buildingName: IMultilingualName;
|
|
208
|
-
buildingOutlineId: number;
|
|
209
|
-
defaultFloor?: string;
|
|
210
|
-
floors: IBuildingInlineFloor[];
|
|
211
|
-
groundFloor: string;
|
|
212
|
-
isPrivate: "yes" | "no";
|
|
213
|
-
organization: string;
|
|
214
|
-
venueId: string;
|
|
215
|
-
venueName: IMultilingualName;
|
|
216
|
-
}
|
|
217
|
-
export interface IResponseBuildings {
|
|
218
|
-
buildings: IBuilding[];
|
|
219
|
-
total: number;
|
|
220
|
-
}
|
|
221
|
-
export type TPromiseBuildings = TResponseResult<IResponseBuildings>;
|
|
222
|
-
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
223
|
-
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
224
|
-
export interface IFloor {
|
|
225
|
-
code: string;
|
|
226
|
-
id: string;
|
|
227
|
-
ordinal: string;
|
|
228
|
-
}
|
|
229
|
-
export interface ISharedFloor {
|
|
230
|
-
id: string;
|
|
231
|
-
ordinal: string;
|
|
232
|
-
name: IMultilingualName;
|
|
233
|
-
}
|
|
234
|
-
export interface IFloorSelectorStyle {
|
|
235
|
-
fontColor?: string;
|
|
236
|
-
activeFontColor?: string;
|
|
237
|
-
backgroundColor?: string;
|
|
238
|
-
activeBackgroundColor?: string;
|
|
239
|
-
itemSize?: number;
|
|
240
|
-
itemCount?: number;
|
|
241
|
-
defaultFolded?: boolean;
|
|
242
|
-
}
|
|
243
262
|
export interface IMapClickEvent {
|
|
244
263
|
coordinate: LngLat;
|
|
245
264
|
building: MapGeoJSONFeature | null;
|
|
246
265
|
venue: MapGeoJSONFeature | null;
|
|
247
266
|
floor: IFloor | ISharedFloor | null;
|
|
248
267
|
}
|
|
268
|
+
export interface IPoiClickEvent {
|
|
269
|
+
coordinate: LngLat;
|
|
270
|
+
poi: MapGeoJSONFeature;
|
|
271
|
+
venue: MapGeoJSONFeature | null;
|
|
272
|
+
floor: IFloor | ISharedFloor | null;
|
|
273
|
+
building?: MapGeoJSONFeature | null;
|
|
274
|
+
sections?: ISection[];
|
|
275
|
+
}
|
|
276
|
+
export interface IPointClickEvent {
|
|
277
|
+
coordinate: LngLat;
|
|
278
|
+
point: PointLike;
|
|
279
|
+
}
|
|
280
|
+
export interface IMapChangeEvent {
|
|
281
|
+
venue: MapGeoJSONFeature | null;
|
|
282
|
+
building: MapGeoJSONFeature | null;
|
|
283
|
+
floor: IFloor | ISharedFloor | null;
|
|
284
|
+
}
|
|
249
285
|
export interface ISelectedHighlightStyle {
|
|
250
286
|
lineWidth?: number;
|
|
251
287
|
lineColor?: string;
|
|
@@ -301,22 +337,26 @@ export interface IMapOtherOptions {
|
|
|
301
337
|
*/
|
|
302
338
|
maskNonSelectedAreas?: boolean;
|
|
303
339
|
/**
|
|
340
|
+
* @deprecated use "fitBounds" instead.
|
|
304
341
|
* @description Whether the boundary of the selected building fits the screen, default is false.
|
|
305
342
|
* Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
|
|
306
343
|
* When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
|
|
307
344
|
*/
|
|
308
345
|
fitBuildingBounds?: boolean;
|
|
346
|
+
fitBounds?: boolean;
|
|
309
347
|
/**
|
|
310
348
|
* @description The amount of padding in pixels to add to the given bounds, default is 30.
|
|
311
349
|
* Requires 'fitBuildingBounds' to be 'true'.
|
|
312
350
|
* Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
|
|
313
351
|
*/
|
|
314
|
-
boundsPadding?: number |
|
|
352
|
+
boundsPadding?: number | maplibregl$1.PaddingOptions;
|
|
315
353
|
language?: PresetLanguage;
|
|
316
354
|
/** @description Auto Select Building by panning building to map center, default is false. */
|
|
317
355
|
autoSelectBuilding?: boolean;
|
|
318
356
|
transformRequest?: maplibregl$1.RequestTransformFunction | null;
|
|
319
357
|
mapxusLogoEnabled?: boolean;
|
|
358
|
+
enableIndoorClickSelection?: boolean;
|
|
359
|
+
enableOutdoorClickSelection?: boolean;
|
|
320
360
|
}
|
|
321
361
|
export interface IMapAccessWithAppId {
|
|
322
362
|
appId: string;
|
|
@@ -353,17 +393,6 @@ export interface IMarkerOptions {
|
|
|
353
393
|
export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
|
|
354
394
|
featureId: number;
|
|
355
395
|
}
|
|
356
|
-
export interface IPoiClickEvent {
|
|
357
|
-
coordinate: LngLat;
|
|
358
|
-
poi: MapGeoJSONFeature;
|
|
359
|
-
building: MapGeoJSONFeature | null;
|
|
360
|
-
venue: MapGeoJSONFeature | null;
|
|
361
|
-
floor: IFloor | ISharedFloor | null;
|
|
362
|
-
}
|
|
363
|
-
export interface IPointClickEvent {
|
|
364
|
-
coordinate: LngLat;
|
|
365
|
-
point: PointLike;
|
|
366
|
-
}
|
|
367
396
|
export interface ITokenInfo {
|
|
368
397
|
"app:name": string;
|
|
369
398
|
auth_time: number;
|
|
@@ -612,7 +641,13 @@ export interface ISearchByBuildingOptions extends IBuildingSpec, ISearchByKeywor
|
|
|
612
641
|
}
|
|
613
642
|
export interface ISearchByVenueOptions extends IVenueSpec, ISearchByKeywordsOptions, IOrderSpec {
|
|
614
643
|
}
|
|
644
|
+
/** @deprecated */
|
|
615
645
|
export type TSearchByFloorOptions = (IFloorSpec & ISearchByKeywordsOptions & IOrderSpec) | (ISharedFloorSpec & ISearchByKeywordsOptions & IOrderSpec);
|
|
646
|
+
export type TSearchByFloorsOptions = ({
|
|
647
|
+
floorIds: string[];
|
|
648
|
+
} & ISearchByKeywordsOptions & IOrderSpec) | ({
|
|
649
|
+
sharedFloorIds: string[];
|
|
650
|
+
} & ISearchByKeywordsOptions & IOrderSpec);
|
|
616
651
|
export type TSearchByOrientationOptions = (IOrdinalSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IFloorSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IBuildingSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec);
|
|
617
652
|
export type TSearchCategoriesOptions = IVenueSpec | IBuildingSpec | IFloorSpec | ISharedFloorSpec | (IBoundsSpec & IKeywordSpec);
|
|
618
653
|
export interface IPoiSearchCustomizedOptions {
|
|
@@ -633,7 +668,10 @@ export interface IPoiSearchCustomizedOptions {
|
|
|
633
668
|
distance?: number;
|
|
634
669
|
category?: string;
|
|
635
670
|
excludedCategories?: string | string[];
|
|
671
|
+
/** @deprecated */
|
|
636
672
|
floorId?: string;
|
|
673
|
+
floorIds?: string[];
|
|
674
|
+
sharedFloorIds?: string[];
|
|
637
675
|
buildingId?: string;
|
|
638
676
|
venueId?: string;
|
|
639
677
|
keywords?: string;
|
|
@@ -643,16 +681,266 @@ export interface IPoiSearchCustomizedOptions {
|
|
|
643
681
|
offset?: number;
|
|
644
682
|
page?: number;
|
|
645
683
|
}
|
|
646
|
-
export
|
|
647
|
-
|
|
684
|
+
export declare class BuildingFilterControl implements IControl {
|
|
685
|
+
private _map;
|
|
686
|
+
private _maplibre;
|
|
687
|
+
private _buildingId;
|
|
688
|
+
private _features;
|
|
689
|
+
private _$container;
|
|
690
|
+
private _$listContainer;
|
|
691
|
+
private _$buildingList;
|
|
692
|
+
private _listHeight;
|
|
693
|
+
private _language;
|
|
694
|
+
private _visible;
|
|
695
|
+
private _position;
|
|
696
|
+
private _isMobileMode;
|
|
697
|
+
private _isListShown;
|
|
698
|
+
constructor(map: any, buildingSelectorEnabled?: boolean);
|
|
699
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
700
|
+
onRemove(): void;
|
|
701
|
+
get position(): ControlPosition;
|
|
702
|
+
get enabled(): boolean;
|
|
703
|
+
getDefaultPosition(): ControlPosition;
|
|
704
|
+
setVisibility(isVisible: boolean): void;
|
|
705
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
706
|
+
private _bindEvents;
|
|
707
|
+
private _init;
|
|
708
|
+
private _refresh;
|
|
709
|
+
private _load;
|
|
710
|
+
private _buildingFilterIconCreate;
|
|
711
|
+
private _buildingNameListCreate;
|
|
712
|
+
private _buildingNameListUpdate;
|
|
713
|
+
private _buildingNameListClean;
|
|
714
|
+
private _setBuildingListHeight;
|
|
715
|
+
private _buildingNameCreate;
|
|
716
|
+
private _toggleList;
|
|
717
|
+
private _buildingNameClickEvent;
|
|
718
|
+
private _bindMouseOnEvents;
|
|
719
|
+
private _bindMobileTouchEvents;
|
|
720
|
+
private _$showLayout;
|
|
721
|
+
private _$hideLayout;
|
|
722
|
+
private _updateBuildingListLayout;
|
|
723
|
+
private _detectDeviceMode;
|
|
724
|
+
}
|
|
725
|
+
export declare class BuildingSelectorHandler {
|
|
726
|
+
private _buildingSelector;
|
|
727
|
+
private _isEnabled;
|
|
728
|
+
private _position;
|
|
729
|
+
constructor(buildingSelector: BuildingFilterControl);
|
|
730
|
+
enable(): void;
|
|
731
|
+
disable(): void;
|
|
732
|
+
/**
|
|
733
|
+
* Set the position of the building selector control
|
|
734
|
+
* @param position
|
|
735
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
736
|
+
*/
|
|
737
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
738
|
+
get isEnabled(): boolean;
|
|
739
|
+
get position(): ControlPosition;
|
|
740
|
+
}
|
|
741
|
+
export interface IFloorSelectorOptions {
|
|
742
|
+
language: PresetLanguage;
|
|
743
|
+
style?: IFloorSelectorStyle;
|
|
744
|
+
enabled?: boolean;
|
|
745
|
+
}
|
|
746
|
+
export declare class FloorsControl implements IControl {
|
|
747
|
+
private _container;
|
|
748
|
+
private _indoor;
|
|
749
|
+
private _maplibre;
|
|
750
|
+
private _position;
|
|
751
|
+
private _buildingId;
|
|
752
|
+
private _floorNames;
|
|
753
|
+
private _ordinals;
|
|
754
|
+
private _ordinal;
|
|
755
|
+
private _style;
|
|
756
|
+
private _$innerFloors;
|
|
757
|
+
private _$activeFloor;
|
|
758
|
+
private _centerSelectorIdx;
|
|
759
|
+
private _lastNormalScrollableIdx;
|
|
760
|
+
private _$arrowBtnUp;
|
|
761
|
+
private _$arrowBtnDown;
|
|
762
|
+
private _maxScrollTop;
|
|
763
|
+
private _$selectorExpanded;
|
|
764
|
+
private _$selectorFolded;
|
|
765
|
+
private _componentDidMount;
|
|
766
|
+
private _visible;
|
|
767
|
+
private _isEnabled;
|
|
768
|
+
private _dragPan;
|
|
769
|
+
private _language;
|
|
770
|
+
private _debounceScroll;
|
|
771
|
+
private _clearScrollEventListener;
|
|
772
|
+
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
773
|
+
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
774
|
+
onRemove(): void;
|
|
775
|
+
get position(): ControlPosition;
|
|
776
|
+
get enabled(): boolean;
|
|
777
|
+
setEnabled(enabled: boolean): void;
|
|
778
|
+
getDefaultPosition(): ControlPosition;
|
|
779
|
+
/**
|
|
780
|
+
* @description Switch floor by ordinal
|
|
781
|
+
* @param ordinal
|
|
782
|
+
* @param dragPan
|
|
783
|
+
*/
|
|
784
|
+
switchByOrdinal(ordinal: string, dragPan?: boolean): Promise<void>;
|
|
785
|
+
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
786
|
+
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
787
|
+
private _setVisibility;
|
|
788
|
+
private _addIndoorEventListeners;
|
|
789
|
+
private _updatePrepared;
|
|
790
|
+
private _renderBuildingFloors;
|
|
791
|
+
private _renderSharedLevelFloor;
|
|
792
|
+
private _checkIfShowFloorSelector;
|
|
793
|
+
private _addMapMoveEventListener;
|
|
794
|
+
private _clearState;
|
|
795
|
+
private _calcSelectorLayout;
|
|
796
|
+
private _render;
|
|
797
|
+
private _hide;
|
|
798
|
+
private _show;
|
|
799
|
+
private _createFloors;
|
|
800
|
+
private _$expandedSelector;
|
|
801
|
+
private _$foldedSelector;
|
|
802
|
+
private _clearFloors;
|
|
803
|
+
private _$createScrollButton;
|
|
804
|
+
private _$createFloors;
|
|
805
|
+
private _updateSelectorStatus;
|
|
806
|
+
private _resetArrowBtnStatus;
|
|
807
|
+
private _resetActiveFloor;
|
|
808
|
+
private _scrollCenterActiveFloor;
|
|
809
|
+
private _getScrollTop;
|
|
810
|
+
private _handleScroll;
|
|
811
|
+
private _expandSelector;
|
|
812
|
+
}
|
|
813
|
+
export declare class FloorSelectorHandler {
|
|
814
|
+
private _floorSelector;
|
|
815
|
+
private _isEnabled;
|
|
816
|
+
private _position;
|
|
817
|
+
constructor(floorSelector: FloorsControl);
|
|
818
|
+
enable(): void;
|
|
819
|
+
disable(): void;
|
|
820
|
+
/**
|
|
821
|
+
* Set the position of the floor selector control
|
|
822
|
+
* @param position
|
|
823
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
824
|
+
*/
|
|
825
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
826
|
+
setStyle(style: IFloorSelectorStyle): void;
|
|
827
|
+
get isEnabled(): boolean;
|
|
828
|
+
get position(): ControlPosition;
|
|
829
|
+
}
|
|
830
|
+
export declare class SwitchBuildingHandler {
|
|
831
|
+
private _indoor;
|
|
832
|
+
private _isEnabled;
|
|
833
|
+
constructor(indoor: Indoor);
|
|
834
|
+
enable(): void;
|
|
835
|
+
disable(): void;
|
|
836
|
+
get isEnabled(): boolean;
|
|
837
|
+
}
|
|
838
|
+
export declare class SwitchOutdoorHandler {
|
|
839
|
+
private _indoor;
|
|
840
|
+
private _isEnabled;
|
|
841
|
+
constructor(indoor: Indoor);
|
|
842
|
+
enable(): void;
|
|
843
|
+
disable(): void;
|
|
844
|
+
get isEnabled(): boolean;
|
|
845
|
+
}
|
|
846
|
+
export declare class IndoorClickSelection {
|
|
847
|
+
private _indoor;
|
|
848
|
+
private _isEnabled;
|
|
849
|
+
constructor(indoor: Indoor);
|
|
850
|
+
enable(): void;
|
|
851
|
+
disable(): void;
|
|
852
|
+
get isEnabled(): boolean;
|
|
853
|
+
}
|
|
854
|
+
export declare class OutdoorClickSelection {
|
|
855
|
+
private _indoor;
|
|
856
|
+
private _isEnabled;
|
|
857
|
+
constructor(indoor: Indoor);
|
|
858
|
+
enable(): void;
|
|
859
|
+
disable(): void;
|
|
860
|
+
get isEnabled(): boolean;
|
|
861
|
+
}
|
|
862
|
+
export interface IPanToOptions {
|
|
863
|
+
dragPan?: boolean;
|
|
864
|
+
animate?: boolean;
|
|
865
|
+
fitBounds?: boolean;
|
|
648
866
|
}
|
|
649
|
-
export interface
|
|
650
|
-
|
|
867
|
+
export interface INormalLevelIndoorFeatures {
|
|
868
|
+
venue: MapGeoJSONFeature;
|
|
651
869
|
building: MapGeoJSONFeature;
|
|
652
|
-
|
|
870
|
+
level: MapGeoJSONFeature;
|
|
871
|
+
}
|
|
872
|
+
export interface ISharedLevelIndoorFeatures {
|
|
873
|
+
venue: MapGeoJSONFeature;
|
|
874
|
+
sharedLevel: MapGeoJSONFeature;
|
|
875
|
+
}
|
|
876
|
+
export interface IScreenPoint {
|
|
877
|
+
x: number;
|
|
878
|
+
y: number;
|
|
879
|
+
}
|
|
880
|
+
export interface IFeaturesFilterOptions {
|
|
881
|
+
layerIds?: string[];
|
|
882
|
+
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
883
|
+
}
|
|
884
|
+
export interface IMapxusMap {
|
|
885
|
+
isDestroyed: boolean;
|
|
886
|
+
buildingSelector: BuildingSelectorHandler;
|
|
887
|
+
floorSelector: FloorSelectorHandler;
|
|
888
|
+
get venue(): MapGeoJSONFeature | null;
|
|
889
|
+
get building(): MapGeoJSONFeature | null;
|
|
890
|
+
get floor(): IFloor | ISharedFloor | null;
|
|
891
|
+
renderComplete: (callback: VoidFunction) => void;
|
|
892
|
+
destroyed: (callback: VoidFunction) => void;
|
|
893
|
+
getMaplibre: () => maplibregl$1.Map;
|
|
894
|
+
getLanguage: () => PresetLanguage;
|
|
895
|
+
setLanguage: (language: PresetLanguage) => void;
|
|
896
|
+
setOutdoorMapShown: (shown: boolean) => void;
|
|
897
|
+
setTransformRequest: (transformFn: maplibregl$1.RequestTransformFunction) => void;
|
|
898
|
+
setTheme: (theme: string) => void;
|
|
899
|
+
setSelectedHighlightStyle: (style: ISelectedHighlightStyle | null) => this;
|
|
900
|
+
switchFloorByOrdinal: (ordinal: string | null) => Promise<void>;
|
|
901
|
+
queryIndoorFeaturesByPoint: (point: IScreenPoint) => INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
|
|
902
|
+
getFeaturesById: (id: string, options?: IFeaturesFilterOptions) => MapGeoJSONFeature[];
|
|
903
|
+
selectFloorById: (floorId: string, options?: IPanToOptions) => Promise<void>;
|
|
904
|
+
selectSharedFloorById: (sharedFloorId: string, options?: IPanToOptions) => Promise<void>;
|
|
905
|
+
selectBuildingById: (buildingId: string, options?: IPanToOptions) => Promise<void>;
|
|
906
|
+
selectVenueById: (venueId: string | null, options?: IPanToOptions) => Promise<void>;
|
|
907
|
+
onMapClickListener: (listener: (param: IMapClickEvent) => void) => {
|
|
908
|
+
unsubscribe: VoidFunction;
|
|
909
|
+
};
|
|
910
|
+
onPoiClickListener: (listener: (param: IPoiClickEvent) => void) => {
|
|
911
|
+
unsubscribe: VoidFunction;
|
|
912
|
+
};
|
|
913
|
+
onPointClickListener: (listener: (param: IPointClickEvent) => void) => {
|
|
914
|
+
unsubscribe: VoidFunction;
|
|
915
|
+
};
|
|
916
|
+
onMapChangeListener: (listener: (params: IMapChangeEvent) => void) => {
|
|
917
|
+
unsubscribe: VoidFunction;
|
|
918
|
+
};
|
|
653
919
|
}
|
|
654
|
-
export type
|
|
655
|
-
|
|
920
|
+
export type TSelectedIndoorData = {
|
|
921
|
+
venue: MapGeoJSONFeature;
|
|
922
|
+
building: MapGeoJSONFeature;
|
|
923
|
+
floor?: IFloor;
|
|
924
|
+
} | {
|
|
925
|
+
sharedFloor: ISharedFloor;
|
|
926
|
+
venue: MapGeoJSONFeature;
|
|
927
|
+
} | null;
|
|
928
|
+
declare class DragPanHandler {
|
|
929
|
+
private _maplibre;
|
|
930
|
+
private _isAnimated;
|
|
931
|
+
private _bounds;
|
|
932
|
+
private _boundsPadding;
|
|
933
|
+
private _center;
|
|
934
|
+
private _fitBoundsTimer;
|
|
935
|
+
constructor(maplibre: maplibregl$1.Map, padding: number | PaddingOptions);
|
|
936
|
+
setAnimated(animated: boolean): void;
|
|
937
|
+
setBounds(bounds: LngLatBoundsLike | null): void;
|
|
938
|
+
getBounds(): LngLatBoundsLike | null;
|
|
939
|
+
setCenter(lnglat: LngLatLike | null): void;
|
|
940
|
+
fitBounds(): Promise<unknown>;
|
|
941
|
+
panToCenter(): void;
|
|
942
|
+
}
|
|
943
|
+
export declare class Indoor extends TinyEmitter {
|
|
656
944
|
private _map;
|
|
657
945
|
private _features;
|
|
658
946
|
private _allVenuesMap;
|
|
@@ -663,8 +951,6 @@ export declare class Indoor extends EventEmitter {
|
|
|
663
951
|
private _curSharedLevelId;
|
|
664
952
|
private _floor;
|
|
665
953
|
private _sharedFloor;
|
|
666
|
-
private _allowOutdoorSwitch;
|
|
667
|
-
private _allowBuildingSwitch;
|
|
668
954
|
private _outdoorMapShown;
|
|
669
955
|
private _originIndoorLayers;
|
|
670
956
|
private _outdoorLayers;
|
|
@@ -672,13 +958,13 @@ export declare class Indoor extends EventEmitter {
|
|
|
672
958
|
private _curVenueFeature;
|
|
673
959
|
private _selectedHighlightStyle;
|
|
674
960
|
private _upperLayers;
|
|
961
|
+
private _commonPoiLayers;
|
|
962
|
+
private _sectionFillLineLayers;
|
|
963
|
+
private _sectionSymbolLayers;
|
|
675
964
|
private _middleLayers;
|
|
676
|
-
private _commonLayers;
|
|
677
965
|
private _lowerLayers;
|
|
678
966
|
private _excludedPoisInMiddle;
|
|
679
967
|
private _dispatch;
|
|
680
|
-
private readonly _fitBuildingBounds;
|
|
681
|
-
private readonly _boundsPadding;
|
|
682
968
|
private readonly _startWithIndoorView;
|
|
683
969
|
private _indoorMapLoaded;
|
|
684
970
|
private _isSelectSharedFloor;
|
|
@@ -687,40 +973,45 @@ export declare class Indoor extends EventEmitter {
|
|
|
687
973
|
private _middleLevels;
|
|
688
974
|
private _lowerLevels;
|
|
689
975
|
private _featureIncomplete;
|
|
976
|
+
private _fitBounds;
|
|
690
977
|
private _dragPan;
|
|
691
|
-
private _buildingBounds;
|
|
692
|
-
private _venueBounds;
|
|
693
978
|
private _history;
|
|
694
|
-
private
|
|
695
|
-
private readonly _hiddenBuildings;
|
|
979
|
+
private _hiddenBuildings;
|
|
696
980
|
private _maskBuildings;
|
|
697
981
|
private _maskSharedFloors;
|
|
982
|
+
private _enableIndoorClickSelection;
|
|
983
|
+
private _enableOutdoorClickSelection;
|
|
984
|
+
private _zIndexHistory;
|
|
698
985
|
private _isDestroyed;
|
|
699
|
-
private
|
|
700
|
-
private _fetchVenueTimeoutId;
|
|
701
|
-
private _fitBoundsTimer;
|
|
702
|
-
private _abortQueryBuilding;
|
|
986
|
+
private _abortQueryFeature;
|
|
703
987
|
private _debounceRendering;
|
|
988
|
+
dragPanHandler: DragPanHandler;
|
|
704
989
|
constructor(props: {
|
|
705
990
|
map: maplibregl$1.Map;
|
|
706
|
-
|
|
707
|
-
boundsPadding
|
|
708
|
-
maskNonSelectedAreas
|
|
709
|
-
startWithIndoorView
|
|
710
|
-
outdoorMapShown
|
|
991
|
+
fitBounds: boolean;
|
|
992
|
+
boundsPadding: number | PaddingOptions;
|
|
993
|
+
maskNonSelectedAreas: boolean;
|
|
994
|
+
startWithIndoorView: boolean;
|
|
995
|
+
outdoorMapShown: boolean;
|
|
996
|
+
enableIndoorClickSelection: boolean;
|
|
997
|
+
enableOutdoorClickSelection: boolean;
|
|
711
998
|
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
712
999
|
});
|
|
713
1000
|
destroy(): void;
|
|
714
1001
|
/**
|
|
1002
|
+
* @deprecated
|
|
715
1003
|
* @description Set whether to allow exiting building.
|
|
716
1004
|
* @param allow
|
|
717
1005
|
*/
|
|
718
1006
|
setAllowOutdoorSwitch(allow: boolean): this;
|
|
719
1007
|
/**
|
|
1008
|
+
* @deprecated
|
|
720
1009
|
* @description Set whether to allow switching building.
|
|
721
1010
|
* @param allow
|
|
722
1011
|
*/
|
|
723
1012
|
setAllowBuildingSwitch(allow: boolean): this;
|
|
1013
|
+
setAllowIndoorClickSelect(allow: boolean): void;
|
|
1014
|
+
setAllowOutdoorClickSelect(allow: boolean): void;
|
|
724
1015
|
/**
|
|
725
1016
|
* @description Get the current floor's information.
|
|
726
1017
|
*/
|
|
@@ -785,38 +1076,17 @@ export declare class Indoor extends EventEmitter {
|
|
|
785
1076
|
updateCustomLayers(): void;
|
|
786
1077
|
updateRendering(): void;
|
|
787
1078
|
panToBuildingCenter(): Promise<void>;
|
|
788
|
-
fitBuildingBbox(): Promise<unknown>;
|
|
789
1079
|
panToVenueCenter(): Promise<void>;
|
|
790
|
-
|
|
1080
|
+
private _waitForFeatureLoaded;
|
|
791
1081
|
setDragPan(dragPan: boolean | "restrict"): void;
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
number
|
|
796
|
-
],
|
|
797
|
-
[
|
|
798
|
-
number,
|
|
799
|
-
number
|
|
800
|
-
]
|
|
801
|
-
]): void;
|
|
802
|
-
setVenueBounds(bounds: [
|
|
803
|
-
[
|
|
804
|
-
number,
|
|
805
|
-
number
|
|
806
|
-
],
|
|
807
|
-
[
|
|
808
|
-
number,
|
|
809
|
-
number
|
|
810
|
-
]
|
|
811
|
-
]): void;
|
|
812
|
-
selectByClickMap(point: PointLike): Promise<void>;
|
|
813
|
-
private _updateBuildingBounds;
|
|
814
|
-
private _updateVenueBounds;
|
|
1082
|
+
setFitBounds(fitBounds: boolean): void;
|
|
1083
|
+
queryIndoorFeaturesByClickPoint(point: PointLike): Promise<TSelectedIndoorData>;
|
|
1084
|
+
selectByClickMap(data: TSelectedIndoorData): Promise<void>;
|
|
815
1085
|
private _bindMaplibreEventListeners;
|
|
816
1086
|
private _clear;
|
|
817
1087
|
private _getIndoorFeatures;
|
|
818
1088
|
private _getBuildingFloorByOrdinal;
|
|
819
|
-
private
|
|
1089
|
+
private _isCurrentFeature;
|
|
820
1090
|
private _setOutdoorVisibility;
|
|
821
1091
|
private _addReserveFloorLayers;
|
|
822
1092
|
private _addBuildingMaskLayer;
|
|
@@ -833,182 +1103,20 @@ export declare class Indoor extends EventEmitter {
|
|
|
833
1103
|
private _layerSelectedLevels;
|
|
834
1104
|
private _layerUnselectedLevels;
|
|
835
1105
|
private _classifyFloors;
|
|
836
|
-
private
|
|
1106
|
+
private _calcVenueInitDisplayedData;
|
|
837
1107
|
private _getBuildingDisplayedLevel;
|
|
838
1108
|
private _filterLayers;
|
|
839
1109
|
private _filterIndoorLayers;
|
|
840
|
-
private
|
|
1110
|
+
private _queryVenueFeature;
|
|
1111
|
+
private _getBuildingDisplayedOrdinal;
|
|
841
1112
|
private _updateFloorState;
|
|
842
1113
|
private _resetSelectedDisplayedLevel;
|
|
843
1114
|
private _checkAndPanToBuilding;
|
|
844
|
-
private _queryFeatureByPoint;
|
|
845
1115
|
private _queryVisibleFeature;
|
|
846
1116
|
private _queryRenderedFeatures;
|
|
847
1117
|
private _dispatchIndoorMapLoaded;
|
|
848
1118
|
}
|
|
849
|
-
|
|
850
|
-
private _map;
|
|
851
|
-
private _maplibre;
|
|
852
|
-
private _buildingId;
|
|
853
|
-
private _features;
|
|
854
|
-
private _$container;
|
|
855
|
-
private _$listContainer;
|
|
856
|
-
private _$buildingList;
|
|
857
|
-
private _listHeight;
|
|
858
|
-
private _language;
|
|
859
|
-
private _visible;
|
|
860
|
-
private _position;
|
|
861
|
-
private _isMobileMode;
|
|
862
|
-
private _isListShown;
|
|
863
|
-
constructor(map: any, buildingSelectorEnabled?: boolean);
|
|
864
|
-
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
865
|
-
onRemove(): void;
|
|
866
|
-
get position(): ControlPosition;
|
|
867
|
-
get enabled(): boolean;
|
|
868
|
-
getDefaultPosition(): ControlPosition;
|
|
869
|
-
setVisibility(isVisible: boolean): void;
|
|
870
|
-
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
871
|
-
private _bindEvents;
|
|
872
|
-
private _init;
|
|
873
|
-
private _refresh;
|
|
874
|
-
private _load;
|
|
875
|
-
private _buildingFilterIconCreate;
|
|
876
|
-
private _buildingNameListCreate;
|
|
877
|
-
private _buildingNameListUpdate;
|
|
878
|
-
private _buildingNameListClean;
|
|
879
|
-
private _setBuildingListHeight;
|
|
880
|
-
private _buildingNameCreate;
|
|
881
|
-
private _toggleList;
|
|
882
|
-
private _buildingNameClickEvent;
|
|
883
|
-
private _bindMouseOnEvents;
|
|
884
|
-
private _bindMobileTouchEvents;
|
|
885
|
-
private _$showLayout;
|
|
886
|
-
private _$hideLayout;
|
|
887
|
-
private _updateBuildingListLayout;
|
|
888
|
-
private _detectDeviceMode;
|
|
889
|
-
}
|
|
890
|
-
export interface IFloorSelectorOptions {
|
|
891
|
-
language: PresetLanguage;
|
|
892
|
-
style?: IFloorSelectorStyle;
|
|
893
|
-
enabled?: boolean;
|
|
894
|
-
}
|
|
895
|
-
export declare class FloorsControl implements IControl {
|
|
896
|
-
private _container;
|
|
897
|
-
private _indoor;
|
|
898
|
-
private _maplibre;
|
|
899
|
-
private _position;
|
|
900
|
-
private _buildingId;
|
|
901
|
-
private _floorNames;
|
|
902
|
-
private _ordinals;
|
|
903
|
-
private _ordinal;
|
|
904
|
-
private _style;
|
|
905
|
-
private _$innerFloors;
|
|
906
|
-
private _$activeFloor;
|
|
907
|
-
private _centerSelectorIdx;
|
|
908
|
-
private _lastNormalScrollableIdx;
|
|
909
|
-
private _$arrowBtnUp;
|
|
910
|
-
private _$arrowBtnDown;
|
|
911
|
-
private _maxScrollTop;
|
|
912
|
-
private _$selectorExpanded;
|
|
913
|
-
private _$selectorFolded;
|
|
914
|
-
private _componentDidMount;
|
|
915
|
-
private _visible;
|
|
916
|
-
private _isEnabled;
|
|
917
|
-
private _dragPan;
|
|
918
|
-
private _language;
|
|
919
|
-
private _debounceScroll;
|
|
920
|
-
private _clearScrollEventListener;
|
|
921
|
-
constructor(indoor: Indoor, options: IFloorSelectorOptions);
|
|
922
|
-
onAdd(map: maplibregl$1.Map): HTMLElement;
|
|
923
|
-
onRemove(): void;
|
|
924
|
-
get position(): ControlPosition;
|
|
925
|
-
get enabled(): boolean;
|
|
926
|
-
setEnabled(enabled: boolean): void;
|
|
927
|
-
getDefaultPosition(): ControlPosition;
|
|
928
|
-
/**
|
|
929
|
-
* @description Switch floor by ordinal
|
|
930
|
-
* @param ordinal
|
|
931
|
-
* @param dragPan
|
|
932
|
-
*/
|
|
933
|
-
switchByOrdinal(ordinal: string, dragPan?: boolean): Promise<void>;
|
|
934
|
-
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
935
|
-
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
936
|
-
private _setVisibility;
|
|
937
|
-
private _addIndoorEventListeners;
|
|
938
|
-
private _updatePrepared;
|
|
939
|
-
private _renderBuildingFloors;
|
|
940
|
-
private _renderSharedLevelFloor;
|
|
941
|
-
private _checkIfShowFloorSelector;
|
|
942
|
-
private _addMapMoveEventListener;
|
|
943
|
-
private _clearState;
|
|
944
|
-
private _calcSelectorLayout;
|
|
945
|
-
private _render;
|
|
946
|
-
private _hide;
|
|
947
|
-
private _show;
|
|
948
|
-
private _createFloors;
|
|
949
|
-
private _$expandedSelector;
|
|
950
|
-
private _$foldedSelector;
|
|
951
|
-
private _clearFloors;
|
|
952
|
-
private _$createScrollButton;
|
|
953
|
-
private _$createFloors;
|
|
954
|
-
private _updateSelectorStatus;
|
|
955
|
-
private _resetArrowBtnStatus;
|
|
956
|
-
private _resetActiveFloor;
|
|
957
|
-
private _scrollCenterActiveFloor;
|
|
958
|
-
private _getScrollTop;
|
|
959
|
-
private _handleScroll;
|
|
960
|
-
private _expandSelector;
|
|
961
|
-
}
|
|
962
|
-
export declare class BuildingSelectorHandler {
|
|
963
|
-
private _buildingSelector;
|
|
964
|
-
private _isEnabled;
|
|
965
|
-
private _position;
|
|
966
|
-
constructor(buildingSelector: BuildingFilterControl);
|
|
967
|
-
enable(): void;
|
|
968
|
-
disable(): void;
|
|
969
|
-
/**
|
|
970
|
-
* Set the position of the building selector control
|
|
971
|
-
* @param position
|
|
972
|
-
* @param index - The index of the control in the controls-container. Default at the last.
|
|
973
|
-
*/
|
|
974
|
-
setPosition(position: ControlPosition, index?: number): void;
|
|
975
|
-
get isEnabled(): boolean;
|
|
976
|
-
get position(): ControlPosition;
|
|
977
|
-
}
|
|
978
|
-
export declare class FloorSelectorHandler {
|
|
979
|
-
private _floorSelector;
|
|
980
|
-
private _isEnabled;
|
|
981
|
-
private _position;
|
|
982
|
-
constructor(floorSelector: FloorsControl);
|
|
983
|
-
enable(): void;
|
|
984
|
-
disable(): void;
|
|
985
|
-
/**
|
|
986
|
-
* Set the position of the floor selector control
|
|
987
|
-
* @param position
|
|
988
|
-
* @param index - The index of the control in the controls-container. Default at the last.
|
|
989
|
-
*/
|
|
990
|
-
setPosition(position: ControlPosition, index?: number): void;
|
|
991
|
-
setStyle(style: IFloorSelectorStyle): void;
|
|
992
|
-
get isEnabled(): boolean;
|
|
993
|
-
get position(): ControlPosition;
|
|
994
|
-
}
|
|
995
|
-
export declare class SwitchBuildingHandler {
|
|
996
|
-
private _indoor;
|
|
997
|
-
private _isEnabled;
|
|
998
|
-
constructor(indoor: Indoor);
|
|
999
|
-
enable(): void;
|
|
1000
|
-
disable(): void;
|
|
1001
|
-
get isEnabled(): boolean;
|
|
1002
|
-
}
|
|
1003
|
-
export declare class SwitchOutdoorHandler {
|
|
1004
|
-
private _indoor;
|
|
1005
|
-
private _isEnabled;
|
|
1006
|
-
constructor(indoor: Indoor);
|
|
1007
|
-
enable(): void;
|
|
1008
|
-
disable(): void;
|
|
1009
|
-
get isEnabled(): boolean;
|
|
1010
|
-
}
|
|
1011
|
-
declare class Map$1 {
|
|
1119
|
+
declare class Map$1 implements IMapxusMap {
|
|
1012
1120
|
private _map;
|
|
1013
1121
|
private _indoor;
|
|
1014
1122
|
private _poi;
|
|
@@ -1017,18 +1125,21 @@ declare class Map$1 {
|
|
|
1017
1125
|
private _attributionControl;
|
|
1018
1126
|
private _language;
|
|
1019
1127
|
private _dispatch;
|
|
1020
|
-
private
|
|
1128
|
+
private _fitBounds;
|
|
1021
1129
|
private _history;
|
|
1022
1130
|
private _hiddenBuildings;
|
|
1023
1131
|
private _debounceHTTPErrorHandler;
|
|
1024
1132
|
private _transformRequestHandler;
|
|
1025
1133
|
private _tokenRefreshingPromise;
|
|
1026
1134
|
private _request;
|
|
1027
|
-
private _$mask;
|
|
1028
1135
|
private _cancelTokenChangedListener;
|
|
1029
1136
|
isDestroyed: boolean;
|
|
1137
|
+
/** @deprecated Use "outdoorClickSelection" instead */
|
|
1030
1138
|
switchOutdoor: SwitchOutdoorHandler;
|
|
1139
|
+
outdoorClickSelection: OutdoorClickSelection;
|
|
1140
|
+
/** @deprecated Use "indoorClickSelection" instead */
|
|
1031
1141
|
switchBuilding: SwitchBuildingHandler;
|
|
1142
|
+
indoorClickSelection: IndoorClickSelection;
|
|
1032
1143
|
buildingSelector: BuildingSelectorHandler;
|
|
1033
1144
|
floorSelector: FloorSelectorHandler;
|
|
1034
1145
|
constructor(options: IMapOption);
|
|
@@ -1045,6 +1156,7 @@ declare class Map$1 {
|
|
|
1045
1156
|
setTransformRequest(handler: maplibregl$1.RequestTransformFunction): void;
|
|
1046
1157
|
/**
|
|
1047
1158
|
* @description Get map indoor instance.
|
|
1159
|
+
* @deprecated indoor instance won't be provided publicly in the future.
|
|
1048
1160
|
*/
|
|
1049
1161
|
getIndoor(): Indoor;
|
|
1050
1162
|
/**
|
|
@@ -1081,8 +1193,10 @@ declare class Map$1 {
|
|
|
1081
1193
|
* @param shown
|
|
1082
1194
|
*/
|
|
1083
1195
|
setOutdoorMapShown(shown: boolean): void;
|
|
1196
|
+
queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
|
|
1084
1197
|
/**
|
|
1085
1198
|
* @description Get features from bbox by coordinates [and ordinal].
|
|
1199
|
+
* @deprecated Use "queryIndoorFeaturesByPoint()" instead.
|
|
1086
1200
|
* @param coordinates
|
|
1087
1201
|
* @param ordinal
|
|
1088
1202
|
*/
|
|
@@ -1100,45 +1214,41 @@ declare class Map$1 {
|
|
|
1100
1214
|
* @param id
|
|
1101
1215
|
* @param options {layerIds: string[], filter: (feature: MapGeoJSONFeature) => boolean}
|
|
1102
1216
|
*/
|
|
1103
|
-
getFeaturesById(id: string, options?:
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1217
|
+
getFeaturesById(id: string, options?: IFeaturesFilterOptions): MapGeoJSONFeature[];
|
|
1218
|
+
/**
|
|
1219
|
+
* @description Switch floor by ordinal of current selected building.
|
|
1220
|
+
* @param ordinal {string | null} The ordinal of the target floor.
|
|
1221
|
+
* If ordinal is null, the map will exit indoor view.
|
|
1222
|
+
* If current selected building has no the target ordinal, there's an error will be thrown.
|
|
1223
|
+
*/
|
|
1224
|
+
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
1107
1225
|
/**
|
|
1108
1226
|
* @description Select indoor by locating the target floor.
|
|
1109
1227
|
* @param floorId
|
|
1110
1228
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1111
1229
|
* Default is true.
|
|
1112
1230
|
*/
|
|
1113
|
-
selectFloorById(floorId: string, options?:
|
|
1114
|
-
|
|
1115
|
-
}): Promise<void>;
|
|
1116
|
-
selectSharedFloorById(sharedFloorId: string, options?: {
|
|
1117
|
-
dragPan?: boolean;
|
|
1118
|
-
}): Promise<void>;
|
|
1231
|
+
selectFloorById(floorId: string, options?: IPanToOptions): Promise<void>;
|
|
1232
|
+
selectSharedFloorById(sharedFloorId: string, options?: IPanToOptions): Promise<void>;
|
|
1119
1233
|
/**
|
|
1120
1234
|
* @description Select indoor by locating the target building.
|
|
1121
1235
|
* @param buildingId
|
|
1122
1236
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1123
1237
|
* Default is true.
|
|
1124
1238
|
*/
|
|
1125
|
-
selectBuildingById(buildingId: string, options?:
|
|
1126
|
-
dragPan?: boolean;
|
|
1127
|
-
}): Promise<void>;
|
|
1239
|
+
selectBuildingById(buildingId: string, options?: IPanToOptions): Promise<void>;
|
|
1128
1240
|
/**
|
|
1129
1241
|
* @description Select indoor by locating the target venue.
|
|
1130
1242
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
1131
1243
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1132
1244
|
* Default is true.
|
|
1133
1245
|
*/
|
|
1134
|
-
selectVenueById(venueId: string | null, options?:
|
|
1135
|
-
dragPan?: boolean;
|
|
1136
|
-
}): Promise<void>;
|
|
1246
|
+
selectVenueById(venueId: string | null, options?: IPanToOptions): Promise<void>;
|
|
1137
1247
|
/**
|
|
1138
1248
|
* @description Listen for mouse click events on the map.
|
|
1139
1249
|
* @param listener
|
|
1140
1250
|
*/
|
|
1141
|
-
onMapClickListener(listener: (
|
|
1251
|
+
onMapClickListener(listener: (param: IMapClickEvent) => void): {
|
|
1142
1252
|
unsubscribe: VoidFunction;
|
|
1143
1253
|
};
|
|
1144
1254
|
/**
|
|
@@ -1152,25 +1262,23 @@ declare class Map$1 {
|
|
|
1152
1262
|
* @description Listen for mouse click events at a point.
|
|
1153
1263
|
* @param listener
|
|
1154
1264
|
*/
|
|
1155
|
-
onPointClickListener(listener: (
|
|
1265
|
+
onPointClickListener(listener: (param: IPointClickEvent) => void): {
|
|
1156
1266
|
unsubscribe: VoidFunction;
|
|
1157
1267
|
};
|
|
1158
1268
|
/**
|
|
1159
1269
|
* @description Listen for the indoor map status, including the changes of venue, building and floor.
|
|
1160
1270
|
* @param listener
|
|
1161
1271
|
*/
|
|
1162
|
-
onMapChangeListener(listener: (
|
|
1163
|
-
venue: MapGeoJSONFeature | null;
|
|
1164
|
-
building: MapGeoJSONFeature | null;
|
|
1165
|
-
floor: IFloor | ISharedFloor | null;
|
|
1166
|
-
}) => void): {
|
|
1272
|
+
onMapChangeListener(listener: (param: IMapChangeEvent) => void): {
|
|
1167
1273
|
unsubscribe: VoidFunction;
|
|
1168
1274
|
};
|
|
1169
1275
|
/**
|
|
1276
|
+
* @deprecated Use "setTheme()" instead.
|
|
1170
1277
|
* @description Switch the map style
|
|
1171
1278
|
* @param theme ThemeType | string(customized map style file name)
|
|
1172
1279
|
*/
|
|
1173
1280
|
switchTheme(theme: string): void;
|
|
1281
|
+
setTheme(theme: ThemeType | string): void;
|
|
1174
1282
|
/**
|
|
1175
1283
|
* @deprecated Use 'setSelectedHighlightStyle' instead.
|
|
1176
1284
|
* @description Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
|
|
@@ -1179,7 +1287,6 @@ declare class Map$1 {
|
|
|
1179
1287
|
setSelectedBuildingBorderStyle(style: ISelectedHighlightStyle | null): this;
|
|
1180
1288
|
setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): this;
|
|
1181
1289
|
private _setup;
|
|
1182
|
-
private _getStyleUrl;
|
|
1183
1290
|
private _setIndoorFilter;
|
|
1184
1291
|
private _setStyle;
|
|
1185
1292
|
private _addControl;
|
|
@@ -1196,7 +1303,6 @@ declare class Map$1 {
|
|
|
1196
1303
|
private _bindMapClickListener;
|
|
1197
1304
|
private _bindTokenChangedListener;
|
|
1198
1305
|
private _handleSearchError;
|
|
1199
|
-
private _setMaskEnabled;
|
|
1200
1306
|
private _installRtlTextPlugin;
|
|
1201
1307
|
private _destroy;
|
|
1202
1308
|
}
|
|
@@ -1247,7 +1353,7 @@ export declare class Marker {
|
|
|
1247
1353
|
* update: Array of features to update, the new properties will replace the old ones.
|
|
1248
1354
|
*/
|
|
1249
1355
|
updateData(diff: {
|
|
1250
|
-
remove?:
|
|
1356
|
+
remove?: Array<maplibregl$1.GeoJSONFeatureId>;
|
|
1251
1357
|
add?: IMarkerOptionsWithFeatureId[];
|
|
1252
1358
|
update?: IMarkerOptionsWithFeatureId[];
|
|
1253
1359
|
}): void;
|
|
@@ -1323,6 +1429,7 @@ export declare class Marker {
|
|
|
1323
1429
|
export declare class Poi {
|
|
1324
1430
|
private _map;
|
|
1325
1431
|
private _currentStyle;
|
|
1432
|
+
private _styleLayersLength;
|
|
1326
1433
|
private _layerIds;
|
|
1327
1434
|
private _dispatch;
|
|
1328
1435
|
private _listeners;
|
|
@@ -1477,13 +1584,12 @@ export declare class RoutePainter {
|
|
|
1477
1584
|
}
|
|
1478
1585
|
/**
|
|
1479
1586
|
* AccessControl class, for providing token and managing token lifecycle.
|
|
1480
|
-
* @extends EventEmitter
|
|
1481
1587
|
* Three events are emitted:
|
|
1482
1588
|
* - "updated": Emitted when the token is updated. Usage: accessControl.on("updated", ({ appId, token }) => {});
|
|
1483
1589
|
* - "error": Emitted when an error occurs during token update. Usage: accessControl.on("error", (error) => {});
|
|
1484
1590
|
* - "closed": Emitted when the access control is closed. Usage: accessControl.on("closed", () => {});
|
|
1485
1591
|
*/
|
|
1486
|
-
export declare class AccessControl extends
|
|
1592
|
+
export declare class AccessControl extends TinyEmitter {
|
|
1487
1593
|
private readonly _appId;
|
|
1488
1594
|
private readonly _secret;
|
|
1489
1595
|
isClosed: boolean;
|
|
@@ -1604,11 +1710,18 @@ export declare class PoisService {
|
|
|
1604
1710
|
*/
|
|
1605
1711
|
searchByVenue(options: ISearchByVenueOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1606
1712
|
/**
|
|
1713
|
+
* @deprecated Use 'searchByFloors()' instead.
|
|
1607
1714
|
* @description Search POIs of a floor.
|
|
1608
1715
|
* @param options {TSearchByFloorOptions}
|
|
1609
1716
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1610
1717
|
*/
|
|
1611
1718
|
searchByFloor(options: TSearchByFloorOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1719
|
+
/**
|
|
1720
|
+
* Search POIs of floors.
|
|
1721
|
+
* @param options {TSearchByFloorsOptions}
|
|
1722
|
+
* 'orderBy' cannot be used with 'keywords'.
|
|
1723
|
+
*/
|
|
1724
|
+
searchByFloors(options: TSearchByFloorsOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1612
1725
|
/**
|
|
1613
1726
|
* @description Search surrounding POIs based on the user's location and orientation.
|
|
1614
1727
|
* @param {TSearchByOrientationOptions} options
|
|
@@ -1637,15 +1750,74 @@ export declare class RouteService {
|
|
|
1637
1750
|
*/
|
|
1638
1751
|
search(options: IRouteSearchOptions): TPromiseRoute;
|
|
1639
1752
|
}
|
|
1753
|
+
export type InputProduct = "UI_SDK" | "ANYWHERE";
|
|
1754
|
+
/**
|
|
1755
|
+
* @private
|
|
1756
|
+
* This method is internal and should not be exposed in the documentation.
|
|
1757
|
+
*/
|
|
1758
|
+
export declare const __internal: {
|
|
1759
|
+
[x: symbol]: (names: InputProduct[]) => void;
|
|
1760
|
+
};
|
|
1761
|
+
export interface IMapxusLib {
|
|
1762
|
+
Map: typeof Map$1;
|
|
1763
|
+
/** @deprecated */
|
|
1764
|
+
Indoor: typeof Indoor;
|
|
1765
|
+
Marker: typeof Marker;
|
|
1766
|
+
Poi: typeof Poi;
|
|
1767
|
+
RoutePainter: typeof RoutePainter;
|
|
1768
|
+
/** @deprecated */
|
|
1769
|
+
AccessControl: typeof AccessControl;
|
|
1770
|
+
/** @deprecated */
|
|
1771
|
+
BuildingFilterControl: typeof BuildingFilterControl;
|
|
1772
|
+
BuildingSelectorHandler: typeof BuildingSelectorHandler;
|
|
1773
|
+
/** @deprecated */
|
|
1774
|
+
FloorsControl: typeof FloorsControl;
|
|
1775
|
+
FloorSelectorHandler: typeof FloorSelectorHandler;
|
|
1776
|
+
/** @deprecated */
|
|
1777
|
+
SwitchBuildingHandler: typeof SwitchBuildingHandler;
|
|
1778
|
+
/** @deprecated */
|
|
1779
|
+
SwitchOutdoorHandler: typeof SwitchOutdoorHandler;
|
|
1780
|
+
IndoorClickSelection: typeof IndoorClickSelection;
|
|
1781
|
+
OutdoorClickSelection: typeof OutdoorClickSelection;
|
|
1782
|
+
VenuesService: typeof VenuesService;
|
|
1783
|
+
BuildingsService: typeof BuildingsService;
|
|
1784
|
+
PoisService: typeof PoisService;
|
|
1785
|
+
RouteService: typeof RouteService;
|
|
1786
|
+
}
|
|
1787
|
+
export interface IMapxusUtils {
|
|
1788
|
+
convertBrowserLangToPresetLang: (lang: string) => PresetLanguage | null;
|
|
1789
|
+
getAccessToken: (appId: string, secret: string, platform?: TPlatform, origin?: string) => Promise<{
|
|
1790
|
+
accessToken: string;
|
|
1791
|
+
expiredTime: number;
|
|
1792
|
+
}>;
|
|
1793
|
+
getIdentifier: () => Promise<string>;
|
|
1794
|
+
setGetTokenAsync: (fn: TAccessTokenGetter) => void;
|
|
1795
|
+
setupTokenManager: () => Promise<void>;
|
|
1796
|
+
VERSION: string;
|
|
1797
|
+
OFFSET: number;
|
|
1798
|
+
PAGE: number;
|
|
1799
|
+
ERRORS: readonly [
|
|
1800
|
+
"unauthorized",
|
|
1801
|
+
"initError"
|
|
1802
|
+
];
|
|
1803
|
+
ASSISTANT_LAYER_INDOOR_FLOORS: string;
|
|
1804
|
+
ASSISTANT_LAYER_SHARED_FLOORS: string;
|
|
1805
|
+
__internal: {
|
|
1806
|
+
[x: symbol]: (names: InputProduct[]) => void;
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
export declare const VERSION: string;
|
|
1640
1810
|
export declare const OFFSET: number;
|
|
1641
1811
|
export declare const PAGE: number;
|
|
1812
|
+
export declare const ERRORS: readonly [
|
|
1813
|
+
"unauthorized",
|
|
1814
|
+
"initError"
|
|
1815
|
+
];
|
|
1642
1816
|
/**
|
|
1643
1817
|
* @description Convert browser language to preset language
|
|
1644
1818
|
* @param language {string} window.navigator.language
|
|
1645
1819
|
*/
|
|
1646
1820
|
export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
|
|
1647
|
-
export declare const ASSISTANT_LAYER_INDOOR_FLOORS = "reserve_mapxus-level-fill";
|
|
1648
|
-
export declare const ASSISTANT_LAYER_SHARED_FLOORS = "reserve_mapxus-shared-level-fill";
|
|
1649
1821
|
/**
|
|
1650
1822
|
* Get access token
|
|
1651
1823
|
* @param appId
|
|
@@ -1658,22 +1830,11 @@ export declare function getAccessToken(appId: string, secret: string, platform?:
|
|
|
1658
1830
|
accessToken: string;
|
|
1659
1831
|
expiredTime: number;
|
|
1660
1832
|
}>;
|
|
1833
|
+
export declare const ASSISTANT_LAYER_INDOOR_FLOORS = "reserve_mapxus-level-fill";
|
|
1834
|
+
export declare const ASSISTANT_LAYER_SHARED_FLOORS = "reserve_mapxus-shared-level-fill";
|
|
1661
1835
|
export declare function getIdentifier(): Promise<string>;
|
|
1662
1836
|
export declare function setGetTokenAsync(fn: TAccessTokenGetter): void;
|
|
1663
1837
|
export declare function setupTokenManager(): Promise<void>;
|
|
1664
|
-
export type InputProduct = "UI_SDK" | "ANYWHERE";
|
|
1665
|
-
/**
|
|
1666
|
-
* @private
|
|
1667
|
-
* This method is internal and should not be exposed in the documentation.
|
|
1668
|
-
*/
|
|
1669
|
-
export declare const __internal: {
|
|
1670
|
-
[x: symbol]: (names: InputProduct[]) => void;
|
|
1671
|
-
};
|
|
1672
|
-
export declare const ERRORS: readonly [
|
|
1673
|
-
"unauthorized",
|
|
1674
|
-
"initError"
|
|
1675
|
-
];
|
|
1676
|
-
export declare const VERSION: string;
|
|
1677
1838
|
|
|
1678
1839
|
export {
|
|
1679
1840
|
Map$1 as Map,
|