@mapxus/mapxus-map-jp 9.1.0 → 9.3.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 -191
- package/dist/index.umd.js +27 -2
- package/dist/utils.cjs +13 -0
- package/es/context-DqAvnxfX.mjs +8301 -0
- package/es/index.d.ts +478 -432
- package/es/index.mjs +7328 -2
- package/es/style.d.ts +4 -0
- package/es/utils/index.d.ts +102 -0
- package/es/utils/index.mjs +36 -2
- package/package.json +23 -6
- 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,31 @@ 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"
|
|
45
|
+
}
|
|
46
|
+
export declare enum FloorSwitchScope {
|
|
47
|
+
VENUE = 0,
|
|
48
|
+
GLOBAL = 1
|
|
33
49
|
}
|
|
34
50
|
export declare enum AccessControlOrigin {
|
|
35
51
|
Access = "access_control",
|
|
@@ -41,14 +57,31 @@ export interface IBbox {
|
|
|
41
57
|
minLat: number;
|
|
42
58
|
minLon: number;
|
|
43
59
|
}
|
|
60
|
+
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
61
|
+
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
44
62
|
export type TMultilingualString = Partial<Record<PresetLanguage, string>>;
|
|
45
63
|
export interface IMultilingualName extends TMultilingualString {
|
|
46
64
|
default: string;
|
|
47
65
|
}
|
|
48
|
-
export
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
export interface IFloor {
|
|
67
|
+
code: string;
|
|
68
|
+
id: string;
|
|
69
|
+
ordinal: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ISharedFloor {
|
|
72
|
+
id: string;
|
|
73
|
+
ordinal: string;
|
|
74
|
+
name: IMultilingualName;
|
|
75
|
+
}
|
|
76
|
+
export interface IFloorSelectorStyle {
|
|
77
|
+
fontColor?: string;
|
|
78
|
+
activeFontColor?: string;
|
|
79
|
+
backgroundColor?: string;
|
|
80
|
+
activeBackgroundColor?: string;
|
|
81
|
+
itemSize?: number;
|
|
82
|
+
itemCount?: number;
|
|
83
|
+
defaultFolded?: boolean;
|
|
84
|
+
}
|
|
52
85
|
export interface ILocation {
|
|
53
86
|
lat: number;
|
|
54
87
|
lon: number;
|
|
@@ -58,6 +91,66 @@ export type TResponseResult<T> = AxiosPromise<{
|
|
|
58
91
|
message: string;
|
|
59
92
|
result: T;
|
|
60
93
|
}>;
|
|
94
|
+
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
95
|
+
housenumber: string;
|
|
96
|
+
street: string;
|
|
97
|
+
}>;
|
|
98
|
+
export interface IBuildingBasicInfo {
|
|
99
|
+
address: IMultilingualAddress;
|
|
100
|
+
bbox: IBbox;
|
|
101
|
+
city?: string;
|
|
102
|
+
country: string;
|
|
103
|
+
description: TMultilingualString;
|
|
104
|
+
labelCenter: ILocation;
|
|
105
|
+
name: IMultilingualName;
|
|
106
|
+
region: string;
|
|
107
|
+
type: string;
|
|
108
|
+
}
|
|
109
|
+
export interface IBusinessInfo {
|
|
110
|
+
appUrl?: {
|
|
111
|
+
android?: string;
|
|
112
|
+
ios?: string;
|
|
113
|
+
};
|
|
114
|
+
businessStatus?: {
|
|
115
|
+
status: "OPEN" | "TEMPORARILY_CLOSED";
|
|
116
|
+
};
|
|
117
|
+
email?: string;
|
|
118
|
+
icon?: string;
|
|
119
|
+
openingHours?: string;
|
|
120
|
+
phone?: string;
|
|
121
|
+
photos?: Array<IPhotoSpec>;
|
|
122
|
+
publicData?: string[];
|
|
123
|
+
totalPhotoCount?: number;
|
|
124
|
+
website?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface IMapServices {
|
|
127
|
+
signalMap: boolean;
|
|
128
|
+
visualMap: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface IFloorBase {
|
|
131
|
+
id: string;
|
|
132
|
+
ordinal: number;
|
|
133
|
+
}
|
|
134
|
+
export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
|
|
135
|
+
code: string;
|
|
136
|
+
}
|
|
137
|
+
export interface IBuilding extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
138
|
+
buildingId: string;
|
|
139
|
+
buildingName: IMultilingualName;
|
|
140
|
+
buildingOutlineId: number;
|
|
141
|
+
defaultFloor?: string;
|
|
142
|
+
floors: IBuildingInlineFloor[];
|
|
143
|
+
groundFloor: string;
|
|
144
|
+
isPrivate: "yes" | "no";
|
|
145
|
+
organization: string;
|
|
146
|
+
venueId: string;
|
|
147
|
+
venueName: IMultilingualName;
|
|
148
|
+
}
|
|
149
|
+
export interface IResponseBuildings {
|
|
150
|
+
buildings: IBuilding[];
|
|
151
|
+
total: number;
|
|
152
|
+
}
|
|
153
|
+
export type TPromiseBuildings = TResponseResult<IResponseBuildings>;
|
|
61
154
|
export declare enum DistanceSearchType {
|
|
62
155
|
POINT = "Point",
|
|
63
156
|
POLYGON = "Polygon"
|
|
@@ -170,83 +263,6 @@ export interface IOrientationSharedPoi extends ISharedPoiFloor, IOrientationPoiC
|
|
|
170
263
|
}
|
|
171
264
|
export type TOrientationPoi = IOrientationNormalPoi | IOrientationSharedPoi;
|
|
172
265
|
export type TPromiseOrientationPois = TResponseResult<TOrientationPoi[]>;
|
|
173
|
-
export interface IBuildingBasicInfo {
|
|
174
|
-
address: IMultilingualAddress;
|
|
175
|
-
bbox: IBbox;
|
|
176
|
-
city?: string;
|
|
177
|
-
country: string;
|
|
178
|
-
description: TMultilingualString;
|
|
179
|
-
labelCenter: ILocation;
|
|
180
|
-
name: IMultilingualName;
|
|
181
|
-
region: string;
|
|
182
|
-
type: string;
|
|
183
|
-
}
|
|
184
|
-
export interface IBusinessInfo {
|
|
185
|
-
appUrl?: {
|
|
186
|
-
android?: string;
|
|
187
|
-
ios?: string;
|
|
188
|
-
};
|
|
189
|
-
businessStatus?: {
|
|
190
|
-
status: "OPEN" | "TEMPORARILY_CLOSED";
|
|
191
|
-
};
|
|
192
|
-
email?: string;
|
|
193
|
-
icon?: string;
|
|
194
|
-
openingHours?: string;
|
|
195
|
-
phone?: string;
|
|
196
|
-
photos?: Array<IPhotoSpec>;
|
|
197
|
-
publicData?: string[];
|
|
198
|
-
totalPhotoCount?: number;
|
|
199
|
-
website?: string;
|
|
200
|
-
}
|
|
201
|
-
export interface IMapServices {
|
|
202
|
-
signalMap: boolean;
|
|
203
|
-
visualMap: boolean;
|
|
204
|
-
}
|
|
205
|
-
export interface IFloorBase {
|
|
206
|
-
id: string;
|
|
207
|
-
ordinal: number;
|
|
208
|
-
}
|
|
209
|
-
export interface IBuildingInlineFloor extends IFloorBase, IMapServices {
|
|
210
|
-
code: string;
|
|
211
|
-
}
|
|
212
|
-
export interface IBuilding extends IBuildingBasicInfo, IBusinessInfo, IMapServices {
|
|
213
|
-
buildingId: string;
|
|
214
|
-
buildingName: IMultilingualName;
|
|
215
|
-
buildingOutlineId: number;
|
|
216
|
-
defaultFloor?: string;
|
|
217
|
-
floors: IBuildingInlineFloor[];
|
|
218
|
-
groundFloor: string;
|
|
219
|
-
isPrivate: "yes" | "no";
|
|
220
|
-
organization: string;
|
|
221
|
-
venueId: string;
|
|
222
|
-
venueName: IMultilingualName;
|
|
223
|
-
}
|
|
224
|
-
export interface IResponseBuildings {
|
|
225
|
-
buildings: IBuilding[];
|
|
226
|
-
total: number;
|
|
227
|
-
}
|
|
228
|
-
export type TPromiseBuildings = TResponseResult<IResponseBuildings>;
|
|
229
|
-
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
230
|
-
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
231
|
-
export interface IFloor {
|
|
232
|
-
code: string;
|
|
233
|
-
id: string;
|
|
234
|
-
ordinal: string;
|
|
235
|
-
}
|
|
236
|
-
export interface ISharedFloor {
|
|
237
|
-
id: string;
|
|
238
|
-
ordinal: string;
|
|
239
|
-
name: IMultilingualName;
|
|
240
|
-
}
|
|
241
|
-
export interface IFloorSelectorStyle {
|
|
242
|
-
fontColor?: string;
|
|
243
|
-
activeFontColor?: string;
|
|
244
|
-
backgroundColor?: string;
|
|
245
|
-
activeBackgroundColor?: string;
|
|
246
|
-
itemSize?: number;
|
|
247
|
-
itemCount?: number;
|
|
248
|
-
defaultFolded?: boolean;
|
|
249
|
-
}
|
|
250
266
|
export interface IMapClickEvent {
|
|
251
267
|
coordinate: LngLat;
|
|
252
268
|
building: MapGeoJSONFeature | null;
|
|
@@ -293,23 +309,23 @@ export interface IMapOtherOptions {
|
|
|
293
309
|
floorSelectorEnabled?: boolean;
|
|
294
310
|
buildingSelectorEnabled?: boolean;
|
|
295
311
|
/**
|
|
296
|
-
*
|
|
312
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
297
313
|
* the priority is: poiId > floorId > buildingId > venueId.
|
|
298
314
|
*/
|
|
299
315
|
venueId?: string;
|
|
300
316
|
/**
|
|
301
|
-
*
|
|
317
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
302
318
|
* the priority is: poiId > floorId > buildingId > venueId.
|
|
303
319
|
*/
|
|
304
320
|
buildingId?: string;
|
|
305
321
|
/**
|
|
306
|
-
*
|
|
322
|
+
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
307
323
|
* the priority is: poiId > floorId > buildingId > venueId.
|
|
308
324
|
*/
|
|
309
325
|
floorId?: string;
|
|
310
326
|
sharedFloorId?: string;
|
|
311
327
|
/**
|
|
312
|
-
*
|
|
328
|
+
* Initialize the map with POI as the center point, use it with maplibregl.Map 'zoom' option.
|
|
313
329
|
* 'venueId', 'buildingId', 'floorId', 'poiId' are mutually exclusive,
|
|
314
330
|
* the priority is: poiId > floorId > buildingId > venueId.
|
|
315
331
|
*/
|
|
@@ -321,28 +337,31 @@ export interface IMapOtherOptions {
|
|
|
321
337
|
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
322
338
|
floorSelectorStyle?: IFloorSelectorStyle;
|
|
323
339
|
/**
|
|
324
|
-
*
|
|
340
|
+
* Whether unselected buildings are masked, default is false.
|
|
325
341
|
*/
|
|
326
342
|
maskNonSelectedAreas?: boolean;
|
|
327
343
|
/**
|
|
328
|
-
* @
|
|
344
|
+
* @deprecated use "fitBounds" instead.
|
|
345
|
+
* Whether the boundary of the selected building fits the screen, default is false.
|
|
329
346
|
* Can only be used for 'floorId', 'buildingId' and 'venueId' initialization, not for 'poiId'.
|
|
330
347
|
* When it is true, the 'boundsPadding' option is valid, and the 'zoom' option of maplibregl.Map is invalid.
|
|
331
348
|
*/
|
|
332
349
|
fitBuildingBounds?: boolean;
|
|
350
|
+
fitBounds?: boolean;
|
|
333
351
|
/**
|
|
334
|
-
*
|
|
352
|
+
* The amount of padding in pixels to add to the given bounds, default is 30.
|
|
335
353
|
* Requires 'fitBuildingBounds' to be 'true'.
|
|
336
354
|
* Parameter value ref to: https://maplibre.org/maplibre-gl-js/docs/API/types/maplibregl.PaddingOptions/
|
|
337
355
|
*/
|
|
338
|
-
boundsPadding?: number |
|
|
356
|
+
boundsPadding?: number | maplibregl$1.PaddingOptions;
|
|
339
357
|
language?: PresetLanguage;
|
|
340
|
-
/**
|
|
358
|
+
/** Auto Select Building by panning building to map center, default is false. */
|
|
341
359
|
autoSelectBuilding?: boolean;
|
|
342
360
|
transformRequest?: maplibregl$1.RequestTransformFunction | null;
|
|
343
361
|
mapxusLogoEnabled?: boolean;
|
|
344
362
|
enableIndoorClickSelection?: boolean;
|
|
345
363
|
enableOutdoorClickSelection?: boolean;
|
|
364
|
+
floorSwitchScope?: FloorSwitchScope;
|
|
346
365
|
}
|
|
347
366
|
export interface IMapAccessWithAppId {
|
|
348
367
|
appId: string;
|
|
@@ -456,19 +475,157 @@ export interface IRoutePoint {
|
|
|
456
475
|
}
|
|
457
476
|
export interface IRouteSearchOptions {
|
|
458
477
|
/**
|
|
459
|
-
*
|
|
478
|
+
* Points are in order, from -> stops -> to.
|
|
460
479
|
* The length of points must be: 1 < {points.length} < 6.
|
|
461
480
|
*/
|
|
462
481
|
points: IRoutePoint[];
|
|
463
482
|
/**
|
|
464
|
-
*
|
|
483
|
+
* Default is "foot".
|
|
465
484
|
*/
|
|
466
485
|
vehicle?: VehicleType;
|
|
467
486
|
/**
|
|
468
|
-
*
|
|
487
|
+
* Language-specific response. Default is "en".
|
|
469
488
|
*/
|
|
470
489
|
locale?: PresetLanguage;
|
|
471
490
|
}
|
|
491
|
+
export interface IRouteMarkers {
|
|
492
|
+
from: string | null;
|
|
493
|
+
to: string | null;
|
|
494
|
+
stops: Array<string | null> | null;
|
|
495
|
+
}
|
|
496
|
+
export interface IRouteStyle<T> {
|
|
497
|
+
indoorLineColor?: string | ExpressionSpecification;
|
|
498
|
+
outdoorLineColor?: string | ExpressionSpecification;
|
|
499
|
+
dashedLineColor?: string | ExpressionSpecification;
|
|
500
|
+
shuttleBusLineColor?: string | ExpressionSpecification;
|
|
501
|
+
lineWidth?: number | ExpressionSpecification;
|
|
502
|
+
dashedLineWidth?: number | ExpressionSpecification;
|
|
503
|
+
disableDashedLine?: boolean;
|
|
504
|
+
/** Optional number in range [0, 1]. Defaults to 0.5. "inactiveRouteOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
505
|
+
inactiveRouteOpacity?: number;
|
|
506
|
+
/** Optional number in range [0, 1]. Defaults to 1. "outdoorLineOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
507
|
+
outdoorLineOpacity?: number;
|
|
508
|
+
markers?: T;
|
|
509
|
+
markerIconSize?: number | ExpressionSpecification;
|
|
510
|
+
lineSymbol?: {
|
|
511
|
+
/**
|
|
512
|
+
* Icon url or sprite name.
|
|
513
|
+
*/
|
|
514
|
+
image?: string | null;
|
|
515
|
+
size?: number | ExpressionSpecification;
|
|
516
|
+
spacing?: number | ExpressionSpecification;
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
export type TRouteStyleOptions = IRouteStyle<Partial<IRouteMarkers> | Array<string | null>>;
|
|
520
|
+
export declare class RoutePainter {
|
|
521
|
+
private readonly _maplibreMap;
|
|
522
|
+
private _routeStyle;
|
|
523
|
+
private _styleDiffs;
|
|
524
|
+
private _filterBy;
|
|
525
|
+
private _curVenue;
|
|
526
|
+
private _curBuilding;
|
|
527
|
+
private _curOrdinal;
|
|
528
|
+
private _renderBoundaryLayer;
|
|
529
|
+
constructor(maplibreMap: maplibregl$1.Map, routeStyle?: TRouteStyleOptions);
|
|
530
|
+
/**
|
|
531
|
+
* Set the style of the route.
|
|
532
|
+
* @param routeStyle {TRouteStyleOptions | null} When null, reset to the initial style.
|
|
533
|
+
*/
|
|
534
|
+
setStyle(routeStyle: TRouteStyleOptions | null): Promise<void>;
|
|
535
|
+
/**
|
|
536
|
+
* @deprecated Use 'setStyle' instead.
|
|
537
|
+
* Set image[s] of the stop marker[s].
|
|
538
|
+
* @param icons Array of sprite names or URLs, or the object with specifying icon.
|
|
539
|
+
* Markers use images in order of icons array.
|
|
540
|
+
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
541
|
+
* If icons array has only one element, all stop markers use this image.
|
|
542
|
+
* Image file must be in png, webp, or jpg format.
|
|
543
|
+
* Null means none image.
|
|
544
|
+
*/
|
|
545
|
+
setMarkerIcons(icons: Array<string | null> | {
|
|
546
|
+
from?: string | null;
|
|
547
|
+
to?: string | null;
|
|
548
|
+
stops?: Array<string | null> | null;
|
|
549
|
+
}): Promise<void>;
|
|
550
|
+
/**
|
|
551
|
+
* @deprecated Use 'setStyle' instead.
|
|
552
|
+
* Set all icons scale.
|
|
553
|
+
* @param size number in range [0, ∞), default is 1.
|
|
554
|
+
*/
|
|
555
|
+
setMarkerIconSize(size: number): this;
|
|
556
|
+
/**
|
|
557
|
+
* @deprecated Use 'setStyle' instead.
|
|
558
|
+
* Set the route color of the indoor part.
|
|
559
|
+
* @param color The color type is a color in the sRGB color space.
|
|
560
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
561
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
562
|
+
*/
|
|
563
|
+
setIndoorLineColor(color: string): this;
|
|
564
|
+
/**
|
|
565
|
+
* @deprecated Use 'setStyle' instead.
|
|
566
|
+
* Set the route color of the outdoor part.
|
|
567
|
+
* @param color The color type is a color in the sRGB color space.
|
|
568
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
569
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
570
|
+
*/
|
|
571
|
+
setOutdoorLineColor(color: string): this;
|
|
572
|
+
/**
|
|
573
|
+
* @deprecated Use 'setStyle' instead.
|
|
574
|
+
* Set color of dashed lines which connected the start and end markers.
|
|
575
|
+
* @param color The color type is a color in the sRGB color space.
|
|
576
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
577
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
578
|
+
*/
|
|
579
|
+
setDashedLineColor(color: string): this;
|
|
580
|
+
/**
|
|
581
|
+
* @deprecated Use 'setStyle' instead.
|
|
582
|
+
* Set color of shuttle bus line.
|
|
583
|
+
* @param color The color type is a color in the sRGB color space.
|
|
584
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
585
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
586
|
+
*/
|
|
587
|
+
setBusLineColor(color: string): this;
|
|
588
|
+
/**
|
|
589
|
+
* Render route on the map.
|
|
590
|
+
* @param path Route path from RouteService.search response.
|
|
591
|
+
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
592
|
+
*/
|
|
593
|
+
render(path: IRoutePath, markerLocations: Array<[
|
|
594
|
+
number,
|
|
595
|
+
number
|
|
596
|
+
]>): void;
|
|
597
|
+
/**
|
|
598
|
+
* Remove route from the map.
|
|
599
|
+
*/
|
|
600
|
+
remove(): void;
|
|
601
|
+
/**
|
|
602
|
+
* Filter paths' opacity by venue and ordinal.
|
|
603
|
+
* @param venueId {string | null | undefined}
|
|
604
|
+
* @param ordinal {string | null | undefined}
|
|
605
|
+
*/
|
|
606
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
607
|
+
/**
|
|
608
|
+
* Filter paths' opacity by building and ordinal.
|
|
609
|
+
* @param buildingId {string | null | undefined}
|
|
610
|
+
* @param ordinal {string | null | undefined}
|
|
611
|
+
*/
|
|
612
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
613
|
+
private _classifyFeatures;
|
|
614
|
+
private _createLineFeature;
|
|
615
|
+
private _createIconFeature;
|
|
616
|
+
private _renderSolidLines;
|
|
617
|
+
private _renderDashedLines;
|
|
618
|
+
private _renderConnectors;
|
|
619
|
+
private _renderMarkers;
|
|
620
|
+
private _addCollectionSource;
|
|
621
|
+
private _addLineLayer;
|
|
622
|
+
private _renderLineSymbols;
|
|
623
|
+
private _addIconLayer;
|
|
624
|
+
private _updateStyleProperties;
|
|
625
|
+
private _loadMarkerIcons;
|
|
626
|
+
private _updateLayers;
|
|
627
|
+
private _filterRouteOpacity;
|
|
628
|
+
}
|
|
472
629
|
export interface IVenueInlineSharedFloor extends IFloorBase, IMapServices {
|
|
473
630
|
name: IMultilingualName;
|
|
474
631
|
refBuilding: Array<string>;
|
|
@@ -627,7 +784,13 @@ export interface ISearchByBuildingOptions extends IBuildingSpec, ISearchByKeywor
|
|
|
627
784
|
}
|
|
628
785
|
export interface ISearchByVenueOptions extends IVenueSpec, ISearchByKeywordsOptions, IOrderSpec {
|
|
629
786
|
}
|
|
787
|
+
/** @deprecated */
|
|
630
788
|
export type TSearchByFloorOptions = (IFloorSpec & ISearchByKeywordsOptions & IOrderSpec) | (ISharedFloorSpec & ISearchByKeywordsOptions & IOrderSpec);
|
|
789
|
+
export type TSearchByFloorsOptions = ({
|
|
790
|
+
floorIds: string[];
|
|
791
|
+
} & ISearchByKeywordsOptions & IOrderSpec) | ({
|
|
792
|
+
sharedFloorIds: string[];
|
|
793
|
+
} & ISearchByKeywordsOptions & IOrderSpec);
|
|
631
794
|
export type TSearchByOrientationOptions = (IOrdinalSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IFloorSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec) | (IBuildingSpec & IOrientationSpec & IQuantitySpec & IOrientationSearchTypeSpec);
|
|
632
795
|
export type TSearchCategoriesOptions = IVenueSpec | IBuildingSpec | IFloorSpec | ISharedFloorSpec | (IBoundsSpec & IKeywordSpec);
|
|
633
796
|
export interface IPoiSearchCustomizedOptions {
|
|
@@ -648,7 +811,10 @@ export interface IPoiSearchCustomizedOptions {
|
|
|
648
811
|
distance?: number;
|
|
649
812
|
category?: string;
|
|
650
813
|
excludedCategories?: string | string[];
|
|
814
|
+
/** @deprecated */
|
|
651
815
|
floorId?: string;
|
|
816
|
+
floorIds?: string[];
|
|
817
|
+
sharedFloorIds?: string[];
|
|
652
818
|
buildingId?: string;
|
|
653
819
|
venueId?: string;
|
|
654
820
|
keywords?: string;
|
|
@@ -658,15 +824,6 @@ export interface IPoiSearchCustomizedOptions {
|
|
|
658
824
|
offset?: number;
|
|
659
825
|
page?: number;
|
|
660
826
|
}
|
|
661
|
-
export interface ISelectedSharedLevelOptions extends ISharedFloor {
|
|
662
|
-
dragPan: boolean | "restrict";
|
|
663
|
-
}
|
|
664
|
-
export interface ISelectedBuildingChangedOptions {
|
|
665
|
-
ordinal: string;
|
|
666
|
-
building: MapGeoJSONFeature;
|
|
667
|
-
dragPan: boolean | "restrict";
|
|
668
|
-
}
|
|
669
|
-
export type TSelectedBuildingChangedOptions = ISelectedBuildingChangedOptions | ISelectedSharedLevelOptions | null;
|
|
670
827
|
export declare class BuildingFilterControl implements IControl {
|
|
671
828
|
private _map;
|
|
672
829
|
private _maplibre;
|
|
@@ -708,6 +865,22 @@ export declare class BuildingFilterControl implements IControl {
|
|
|
708
865
|
private _updateBuildingListLayout;
|
|
709
866
|
private _detectDeviceMode;
|
|
710
867
|
}
|
|
868
|
+
export declare class BuildingSelectorHandler {
|
|
869
|
+
private _buildingSelector;
|
|
870
|
+
private _isEnabled;
|
|
871
|
+
private _position;
|
|
872
|
+
constructor(buildingSelector: BuildingFilterControl);
|
|
873
|
+
enable(): void;
|
|
874
|
+
disable(): void;
|
|
875
|
+
/**
|
|
876
|
+
* Set the position of the building selector control
|
|
877
|
+
* @param position
|
|
878
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
879
|
+
*/
|
|
880
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
881
|
+
get isEnabled(): boolean;
|
|
882
|
+
get position(): ControlPosition;
|
|
883
|
+
}
|
|
711
884
|
export interface IFloorSelectorOptions {
|
|
712
885
|
language: PresetLanguage;
|
|
713
886
|
style?: IFloorSelectorStyle;
|
|
@@ -747,7 +920,7 @@ export declare class FloorsControl implements IControl {
|
|
|
747
920
|
setEnabled(enabled: boolean): void;
|
|
748
921
|
getDefaultPosition(): ControlPosition;
|
|
749
922
|
/**
|
|
750
|
-
*
|
|
923
|
+
* Switch floor by ordinal
|
|
751
924
|
* @param ordinal
|
|
752
925
|
* @param dragPan
|
|
753
926
|
*/
|
|
@@ -780,22 +953,6 @@ export declare class FloorsControl implements IControl {
|
|
|
780
953
|
private _handleScroll;
|
|
781
954
|
private _expandSelector;
|
|
782
955
|
}
|
|
783
|
-
export declare class BuildingSelectorHandler {
|
|
784
|
-
private _buildingSelector;
|
|
785
|
-
private _isEnabled;
|
|
786
|
-
private _position;
|
|
787
|
-
constructor(buildingSelector: BuildingFilterControl);
|
|
788
|
-
enable(): void;
|
|
789
|
-
disable(): void;
|
|
790
|
-
/**
|
|
791
|
-
* Set the position of the building selector control
|
|
792
|
-
* @param position
|
|
793
|
-
* @param index - The index of the control in the controls-container. Default at the last.
|
|
794
|
-
*/
|
|
795
|
-
setPosition(position: ControlPosition, index?: number): void;
|
|
796
|
-
get isEnabled(): boolean;
|
|
797
|
-
get position(): ControlPosition;
|
|
798
|
-
}
|
|
799
956
|
export declare class FloorSelectorHandler {
|
|
800
957
|
private _floorSelector;
|
|
801
958
|
private _isEnabled;
|
|
@@ -829,9 +986,26 @@ export declare class SwitchOutdoorHandler {
|
|
|
829
986
|
disable(): void;
|
|
830
987
|
get isEnabled(): boolean;
|
|
831
988
|
}
|
|
989
|
+
export declare class IndoorClickSelection {
|
|
990
|
+
private _indoor;
|
|
991
|
+
private _isEnabled;
|
|
992
|
+
constructor(indoor: Indoor);
|
|
993
|
+
enable(): void;
|
|
994
|
+
disable(): void;
|
|
995
|
+
get isEnabled(): boolean;
|
|
996
|
+
}
|
|
997
|
+
export declare class OutdoorClickSelection {
|
|
998
|
+
private _indoor;
|
|
999
|
+
private _isEnabled;
|
|
1000
|
+
constructor(indoor: Indoor);
|
|
1001
|
+
enable(): void;
|
|
1002
|
+
disable(): void;
|
|
1003
|
+
get isEnabled(): boolean;
|
|
1004
|
+
}
|
|
832
1005
|
export interface IPanToOptions {
|
|
833
1006
|
dragPan?: boolean;
|
|
834
1007
|
animate?: boolean;
|
|
1008
|
+
fitBounds?: boolean;
|
|
835
1009
|
}
|
|
836
1010
|
export interface INormalLevelIndoorFeatures {
|
|
837
1011
|
venue: MapGeoJSONFeature;
|
|
@@ -894,7 +1068,49 @@ export type TSelectedIndoorData = {
|
|
|
894
1068
|
sharedFloor: ISharedFloor;
|
|
895
1069
|
venue: MapGeoJSONFeature;
|
|
896
1070
|
} | null;
|
|
897
|
-
export
|
|
1071
|
+
export type TFeatureMap = Map<string, MapGeoJSONFeature>;
|
|
1072
|
+
export interface ILayeredOptions {
|
|
1073
|
+
selectedVenueId: string | null;
|
|
1074
|
+
venueMap: TFeatureMap;
|
|
1075
|
+
buildingMap: TFeatureMap;
|
|
1076
|
+
sharedFloorMap: TFeatureMap;
|
|
1077
|
+
}
|
|
1078
|
+
export interface IDisplayedLevel {
|
|
1079
|
+
level: string;
|
|
1080
|
+
overlap: string[] | null;
|
|
1081
|
+
venueId: string;
|
|
1082
|
+
}
|
|
1083
|
+
export interface ILayeredData {
|
|
1084
|
+
displayedLevels: IDisplayedLevel[];
|
|
1085
|
+
selectedLevelIds: string[];
|
|
1086
|
+
alwaysDisplayedSharedLevelIds: string[];
|
|
1087
|
+
maskBuildingIds: string[];
|
|
1088
|
+
maskSharedFloorIds: string[];
|
|
1089
|
+
}
|
|
1090
|
+
declare class FloorsLayeredHandler {
|
|
1091
|
+
private _isMaskMode;
|
|
1092
|
+
private _hiddenBuildings;
|
|
1093
|
+
private _history;
|
|
1094
|
+
constructor(maskMode: boolean);
|
|
1095
|
+
getLayeredData(options: ILayeredOptions): ILayeredData;
|
|
1096
|
+
getHiddenBuildings(): string[];
|
|
1097
|
+
}
|
|
1098
|
+
declare class DragPanHandler {
|
|
1099
|
+
private _maplibre;
|
|
1100
|
+
private _isAnimated;
|
|
1101
|
+
private _bounds;
|
|
1102
|
+
private _boundsPadding;
|
|
1103
|
+
private _center;
|
|
1104
|
+
private _fitBoundsTimer;
|
|
1105
|
+
constructor(maplibre: maplibregl$1.Map, padding: number | PaddingOptions);
|
|
1106
|
+
setAnimated(animated: boolean): void;
|
|
1107
|
+
setBounds(bounds: LngLatBoundsLike | null): void;
|
|
1108
|
+
getBounds(): LngLatBoundsLike | null;
|
|
1109
|
+
setCenter(lnglat: LngLatLike | null): void;
|
|
1110
|
+
fitBounds(): Promise<unknown>;
|
|
1111
|
+
panToCenter(): void;
|
|
1112
|
+
}
|
|
1113
|
+
export declare class Indoor extends TinyEmitter {
|
|
898
1114
|
private _map;
|
|
899
1115
|
private _features;
|
|
900
1116
|
private _allVenuesMap;
|
|
@@ -905,8 +1121,6 @@ export declare class Indoor extends EventEmitter {
|
|
|
905
1121
|
private _curSharedLevelId;
|
|
906
1122
|
private _floor;
|
|
907
1123
|
private _sharedFloor;
|
|
908
|
-
private _allowOutdoorSwitch;
|
|
909
|
-
private _allowBuildingSwitch;
|
|
910
1124
|
private _outdoorMapShown;
|
|
911
1125
|
private _originIndoorLayers;
|
|
912
1126
|
private _outdoorLayers;
|
|
@@ -914,13 +1128,13 @@ export declare class Indoor extends EventEmitter {
|
|
|
914
1128
|
private _curVenueFeature;
|
|
915
1129
|
private _selectedHighlightStyle;
|
|
916
1130
|
private _upperLayers;
|
|
1131
|
+
private _commonPoiLayers;
|
|
1132
|
+
private _sectionFillLineLayers;
|
|
1133
|
+
private _sectionSymbolLayers;
|
|
917
1134
|
private _middleLayers;
|
|
918
|
-
private _commonLayers;
|
|
919
1135
|
private _lowerLayers;
|
|
920
1136
|
private _excludedPoisInMiddle;
|
|
921
1137
|
private _dispatch;
|
|
922
|
-
private readonly _fitBuildingBounds;
|
|
923
|
-
private readonly _boundsPadding;
|
|
924
1138
|
private readonly _startWithIndoorView;
|
|
925
1139
|
private _indoorMapLoaded;
|
|
926
1140
|
private _isSelectSharedFloor;
|
|
@@ -929,65 +1143,68 @@ export declare class Indoor extends EventEmitter {
|
|
|
929
1143
|
private _middleLevels;
|
|
930
1144
|
private _lowerLevels;
|
|
931
1145
|
private _featureIncomplete;
|
|
1146
|
+
private _fitBounds;
|
|
932
1147
|
private _dragPan;
|
|
933
|
-
private _animate;
|
|
934
|
-
private _buildingBounds;
|
|
935
|
-
private _venueBounds;
|
|
936
1148
|
private _history;
|
|
937
|
-
private _layerBuildings;
|
|
938
|
-
private readonly _hiddenBuildings;
|
|
939
1149
|
private _maskBuildings;
|
|
940
1150
|
private _maskSharedFloors;
|
|
941
1151
|
private _enableIndoorClickSelection;
|
|
942
1152
|
private _enableOutdoorClickSelection;
|
|
1153
|
+
private _zIndexHistory;
|
|
1154
|
+
private _floorSwitchScope;
|
|
943
1155
|
private _isDestroyed;
|
|
944
|
-
private _fetchBuildingTimeoutId;
|
|
945
|
-
private _fetchVenueTimeoutId;
|
|
946
|
-
private _fitBoundsTimer;
|
|
947
1156
|
private _abortQueryFeature;
|
|
948
1157
|
private _debounceRendering;
|
|
1158
|
+
layeredHandler: FloorsLayeredHandler;
|
|
1159
|
+
dragPanHandler: DragPanHandler;
|
|
949
1160
|
constructor(props: {
|
|
950
1161
|
map: maplibregl$1.Map;
|
|
951
|
-
|
|
952
|
-
boundsPadding
|
|
953
|
-
maskNonSelectedAreas
|
|
954
|
-
startWithIndoorView
|
|
955
|
-
outdoorMapShown
|
|
956
|
-
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
1162
|
+
fitBounds: boolean;
|
|
1163
|
+
boundsPadding: number | PaddingOptions;
|
|
1164
|
+
maskNonSelectedAreas: boolean;
|
|
1165
|
+
startWithIndoorView: boolean;
|
|
1166
|
+
outdoorMapShown: boolean;
|
|
957
1167
|
enableIndoorClickSelection: boolean;
|
|
958
1168
|
enableOutdoorClickSelection: boolean;
|
|
1169
|
+
floorSwitchScope: FloorSwitchScope;
|
|
1170
|
+
selectedHighlightStyle?: ISelectedHighlightStyle;
|
|
959
1171
|
});
|
|
960
1172
|
destroy(): void;
|
|
961
1173
|
/**
|
|
962
|
-
* @
|
|
1174
|
+
* @deprecated
|
|
1175
|
+
* Set whether to allow exiting building.
|
|
963
1176
|
* @param allow
|
|
964
1177
|
*/
|
|
965
1178
|
setAllowOutdoorSwitch(allow: boolean): this;
|
|
966
1179
|
/**
|
|
967
|
-
* @
|
|
1180
|
+
* @deprecated
|
|
1181
|
+
* Set whether to allow switching building.
|
|
968
1182
|
* @param allow
|
|
969
1183
|
*/
|
|
970
1184
|
setAllowBuildingSwitch(allow: boolean): this;
|
|
1185
|
+
setAllowIndoorClickSelect(allow: boolean): void;
|
|
1186
|
+
setAllowOutdoorClickSelect(allow: boolean): void;
|
|
1187
|
+
setFloorSwitchScope(scope: FloorSwitchScope): void;
|
|
971
1188
|
/**
|
|
972
|
-
*
|
|
1189
|
+
* Get the current floor's information.
|
|
973
1190
|
*/
|
|
974
1191
|
get floor(): IFloor | ISharedFloor | null;
|
|
975
1192
|
/**
|
|
976
|
-
*
|
|
1193
|
+
* Get the current building's information.
|
|
977
1194
|
* @returns {MapGeoJSONFeature | null}
|
|
978
1195
|
*/
|
|
979
1196
|
get building(): MapGeoJSONFeature | null;
|
|
980
1197
|
/**
|
|
981
|
-
*
|
|
1198
|
+
* Get the current venue's information.
|
|
982
1199
|
* @returns {MapGeoJSONFeature | null}
|
|
983
1200
|
*/
|
|
984
1201
|
get venue(): MapGeoJSONFeature | null;
|
|
985
1202
|
/**
|
|
986
|
-
*
|
|
1203
|
+
* Get the geo features of bbox.
|
|
987
1204
|
*/
|
|
988
1205
|
get features(): MapGeoJSONFeature[];
|
|
989
1206
|
/**
|
|
990
|
-
*
|
|
1207
|
+
* Get features from bbox by id.
|
|
991
1208
|
* @param id
|
|
992
1209
|
* @param options
|
|
993
1210
|
*/
|
|
@@ -996,18 +1213,18 @@ export declare class Indoor extends EventEmitter {
|
|
|
996
1213
|
filter?: (feature: MapGeoJSONFeature) => boolean;
|
|
997
1214
|
}): MapGeoJSONFeature[];
|
|
998
1215
|
/**
|
|
999
|
-
*
|
|
1216
|
+
* Switch floor by ordinal.
|
|
1000
1217
|
* @param ordinal
|
|
1001
1218
|
*/
|
|
1002
1219
|
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
1003
1220
|
setOutdoorMapShown(shown: boolean): void;
|
|
1004
1221
|
/**
|
|
1005
|
-
*
|
|
1222
|
+
* Set the style of the selected floor border. If set to null, the border will be invisible.
|
|
1006
1223
|
* @param style {ISelectedHighlightStyle | null}
|
|
1007
1224
|
*/
|
|
1008
1225
|
setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): void;
|
|
1009
1226
|
/**
|
|
1010
|
-
*
|
|
1227
|
+
* Listen for the indoor map state, including the changes of venue, building and floor.
|
|
1011
1228
|
* @param listener
|
|
1012
1229
|
*/
|
|
1013
1230
|
onMapChange(listener: (params: {
|
|
@@ -1018,7 +1235,7 @@ export declare class Indoor extends EventEmitter {
|
|
|
1018
1235
|
unsubscribe: VoidFunction;
|
|
1019
1236
|
};
|
|
1020
1237
|
/**
|
|
1021
|
-
*
|
|
1238
|
+
* Select a building feature
|
|
1022
1239
|
* @param feature {MapGeoJSONFeature | null}
|
|
1023
1240
|
* @param options {floorId?: string, dragPan?: boolean}
|
|
1024
1241
|
*/
|
|
@@ -1032,48 +1249,23 @@ export declare class Indoor extends EventEmitter {
|
|
|
1032
1249
|
updateCustomLayers(): void;
|
|
1033
1250
|
updateRendering(): void;
|
|
1034
1251
|
panToBuildingCenter(): Promise<void>;
|
|
1035
|
-
fitBuildingBbox(): Promise<unknown>;
|
|
1036
1252
|
panToVenueCenter(): Promise<void>;
|
|
1037
|
-
fitVenueBbox(): Promise<unknown>;
|
|
1038
1253
|
private _waitForFeatureLoaded;
|
|
1039
1254
|
setDragPan(dragPan: boolean | "restrict"): void;
|
|
1040
|
-
|
|
1041
|
-
setBuildingBounds(bounds: [
|
|
1042
|
-
[
|
|
1043
|
-
number,
|
|
1044
|
-
number
|
|
1045
|
-
],
|
|
1046
|
-
[
|
|
1047
|
-
number,
|
|
1048
|
-
number
|
|
1049
|
-
]
|
|
1050
|
-
]): void;
|
|
1051
|
-
setVenueBounds(bounds: [
|
|
1052
|
-
[
|
|
1053
|
-
number,
|
|
1054
|
-
number
|
|
1055
|
-
],
|
|
1056
|
-
[
|
|
1057
|
-
number,
|
|
1058
|
-
number
|
|
1059
|
-
]
|
|
1060
|
-
]): void;
|
|
1255
|
+
setFitBounds(fitBounds: boolean): void;
|
|
1061
1256
|
queryIndoorFeaturesByClickPoint(point: PointLike): Promise<TSelectedIndoorData>;
|
|
1062
1257
|
selectByClickMap(data: TSelectedIndoorData): Promise<void>;
|
|
1063
|
-
private _updateBuildingBounds;
|
|
1064
|
-
private _updateVenueBounds;
|
|
1065
1258
|
private _bindMaplibreEventListeners;
|
|
1066
1259
|
private _clear;
|
|
1067
1260
|
private _getIndoorFeatures;
|
|
1068
1261
|
private _getBuildingFloorByOrdinal;
|
|
1069
|
-
private
|
|
1262
|
+
private _isCurrentFeature;
|
|
1070
1263
|
private _setOutdoorVisibility;
|
|
1071
1264
|
private _addReserveFloorLayers;
|
|
1072
1265
|
private _addBuildingMaskLayer;
|
|
1073
1266
|
private _updateUnselectedMask;
|
|
1074
1267
|
private _addSelectedHighlightLayers;
|
|
1075
1268
|
private _filterSelectedHighlight;
|
|
1076
|
-
private _getBuildingDefaultOrdinal;
|
|
1077
1269
|
private _copyOverlapLayers;
|
|
1078
1270
|
private _copySharedFloorBackgroundLayers;
|
|
1079
1271
|
private _updateFeatures;
|
|
@@ -1082,20 +1274,16 @@ export declare class Indoor extends EventEmitter {
|
|
|
1082
1274
|
private _layerFloors;
|
|
1083
1275
|
private _layerSelectedLevels;
|
|
1084
1276
|
private _layerUnselectedLevels;
|
|
1085
|
-
private _classifyFloors;
|
|
1086
|
-
private _calcVenueInitOrdinal;
|
|
1087
|
-
private _getBuildingDisplayedLevel;
|
|
1088
1277
|
private _filterLayers;
|
|
1089
1278
|
private _filterIndoorLayers;
|
|
1090
1279
|
private _queryVenueFeature;
|
|
1091
1280
|
private _getBuildingDisplayedOrdinal;
|
|
1092
1281
|
private _updateFloorState;
|
|
1093
|
-
private _resetSelectedDisplayedLevel;
|
|
1094
1282
|
private _checkAndPanToBuilding;
|
|
1095
1283
|
private _queryVisibleFeature;
|
|
1096
1284
|
private _queryRenderedFeatures;
|
|
1097
1285
|
private _dispatchIndoorMapLoaded;
|
|
1098
|
-
private
|
|
1286
|
+
private _changeOtherVenuesHistory;
|
|
1099
1287
|
}
|
|
1100
1288
|
declare class Map$1 implements IMapxusMap {
|
|
1101
1289
|
private _map;
|
|
@@ -1106,24 +1294,25 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1106
1294
|
private _attributionControl;
|
|
1107
1295
|
private _language;
|
|
1108
1296
|
private _dispatch;
|
|
1109
|
-
private
|
|
1297
|
+
private _fitBounds;
|
|
1110
1298
|
private _history;
|
|
1111
|
-
private _hiddenBuildings;
|
|
1112
1299
|
private _debounceHTTPErrorHandler;
|
|
1113
1300
|
private _transformRequestHandler;
|
|
1114
1301
|
private _tokenRefreshingPromise;
|
|
1115
1302
|
private _request;
|
|
1116
1303
|
private _cancelTokenChangedListener;
|
|
1117
1304
|
isDestroyed: boolean;
|
|
1118
|
-
/** @deprecated Use "
|
|
1305
|
+
/** @deprecated Use "outdoorClickSelection" instead */
|
|
1119
1306
|
switchOutdoor: SwitchOutdoorHandler;
|
|
1120
|
-
|
|
1307
|
+
outdoorClickSelection: OutdoorClickSelection;
|
|
1308
|
+
/** @deprecated Use "indoorClickSelection" instead */
|
|
1121
1309
|
switchBuilding: SwitchBuildingHandler;
|
|
1310
|
+
indoorClickSelection: IndoorClickSelection;
|
|
1122
1311
|
buildingSelector: BuildingSelectorHandler;
|
|
1123
1312
|
floorSelector: FloorSelectorHandler;
|
|
1124
1313
|
constructor(options: IMapOption);
|
|
1125
1314
|
/**
|
|
1126
|
-
*
|
|
1315
|
+
* This function will be called once the indoor source loaded.
|
|
1127
1316
|
* @param callback
|
|
1128
1317
|
*/
|
|
1129
1318
|
renderComplete(callback: VoidFunction): void;
|
|
@@ -1134,47 +1323,47 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1134
1323
|
*/
|
|
1135
1324
|
setTransformRequest(handler: maplibregl$1.RequestTransformFunction): void;
|
|
1136
1325
|
/**
|
|
1137
|
-
*
|
|
1326
|
+
* Get map indoor instance.
|
|
1138
1327
|
* @deprecated indoor instance won't be provided publicly in the future.
|
|
1139
1328
|
*/
|
|
1140
1329
|
getIndoor(): Indoor;
|
|
1141
1330
|
/**
|
|
1142
|
-
*
|
|
1331
|
+
* Get maplibre map instance.
|
|
1143
1332
|
*/
|
|
1144
1333
|
getMaplibre(): maplibregl$1.Map;
|
|
1145
1334
|
/**
|
|
1146
|
-
*
|
|
1335
|
+
* Get current selected floor info.
|
|
1147
1336
|
* @return {IFloor | ISharedFloor | null}
|
|
1148
1337
|
*/
|
|
1149
1338
|
get floor(): IFloor | ISharedFloor | null;
|
|
1150
1339
|
/**
|
|
1151
|
-
*
|
|
1340
|
+
* Get current selected building info.
|
|
1152
1341
|
* @return {MapGeoJSONFeature | null}
|
|
1153
1342
|
*/
|
|
1154
1343
|
get building(): MapGeoJSONFeature | null;
|
|
1155
1344
|
/**
|
|
1156
|
-
*
|
|
1345
|
+
* Get current selected venue info.
|
|
1157
1346
|
* @return {MapGeoJSONFeature | null}
|
|
1158
1347
|
*/
|
|
1159
1348
|
get venue(): MapGeoJSONFeature | null;
|
|
1160
1349
|
/**
|
|
1161
|
-
*
|
|
1350
|
+
* Set map language.
|
|
1162
1351
|
* @param language {PresetLanguage} convertBrowserLangToPresetLang(Window.navigator.language).
|
|
1163
1352
|
*/
|
|
1164
1353
|
setLanguage(language: PresetLanguage): void;
|
|
1165
1354
|
/**
|
|
1166
|
-
*
|
|
1355
|
+
* Get map language.
|
|
1167
1356
|
* @return {PresetLanguage}
|
|
1168
1357
|
*/
|
|
1169
1358
|
getLanguage(): PresetLanguage;
|
|
1170
1359
|
/**
|
|
1171
|
-
*
|
|
1360
|
+
* Set outdoor map to be shown or hidden.
|
|
1172
1361
|
* @param shown
|
|
1173
1362
|
*/
|
|
1174
1363
|
setOutdoorMapShown(shown: boolean): void;
|
|
1175
1364
|
queryIndoorFeaturesByPoint(point: IScreenPoint): INormalLevelIndoorFeatures | ISharedLevelIndoorFeatures | null;
|
|
1176
1365
|
/**
|
|
1177
|
-
*
|
|
1366
|
+
* Get features from bbox by coordinates [and ordinal].
|
|
1178
1367
|
* @deprecated Use "queryIndoorFeaturesByPoint()" instead.
|
|
1179
1368
|
* @param coordinates
|
|
1180
1369
|
* @param ordinal
|
|
@@ -1188,21 +1377,21 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1188
1377
|
level: MapGeoJSONFeature | null;
|
|
1189
1378
|
};
|
|
1190
1379
|
/**
|
|
1191
|
-
*
|
|
1380
|
+
* Query rendered features from bbox by id. One id may correspond to multiple features,
|
|
1192
1381
|
* coz of a feature may be multi-polygon(feature collection).
|
|
1193
1382
|
* @param id
|
|
1194
1383
|
* @param options {layerIds: string[], filter: (feature: MapGeoJSONFeature) => boolean}
|
|
1195
1384
|
*/
|
|
1196
1385
|
getFeaturesById(id: string, options?: IFeaturesFilterOptions): MapGeoJSONFeature[];
|
|
1197
1386
|
/**
|
|
1198
|
-
*
|
|
1387
|
+
* Switch floor by ordinal of current selected building.
|
|
1199
1388
|
* @param ordinal {string | null} The ordinal of the target floor.
|
|
1200
1389
|
* If ordinal is null, the map will exit indoor view.
|
|
1201
1390
|
* If current selected building has no the target ordinal, there's an error will be thrown.
|
|
1202
1391
|
*/
|
|
1203
1392
|
switchFloorByOrdinal(ordinal: string | null): Promise<void>;
|
|
1204
1393
|
/**
|
|
1205
|
-
*
|
|
1394
|
+
* Select indoor by locating the target floor.
|
|
1206
1395
|
* @param floorId
|
|
1207
1396
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1208
1397
|
* Default is true.
|
|
@@ -1210,42 +1399,42 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1210
1399
|
selectFloorById(floorId: string, options?: IPanToOptions): Promise<void>;
|
|
1211
1400
|
selectSharedFloorById(sharedFloorId: string, options?: IPanToOptions): Promise<void>;
|
|
1212
1401
|
/**
|
|
1213
|
-
*
|
|
1402
|
+
* Select indoor by locating the target building.
|
|
1214
1403
|
* @param buildingId
|
|
1215
1404
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1216
1405
|
* Default is true.
|
|
1217
1406
|
*/
|
|
1218
1407
|
selectBuildingById(buildingId: string, options?: IPanToOptions): Promise<void>;
|
|
1219
1408
|
/**
|
|
1220
|
-
*
|
|
1409
|
+
* Select indoor by locating the target venue.
|
|
1221
1410
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
1222
1411
|
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1223
1412
|
* Default is true.
|
|
1224
1413
|
*/
|
|
1225
1414
|
selectVenueById(venueId: string | null, options?: IPanToOptions): Promise<void>;
|
|
1226
1415
|
/**
|
|
1227
|
-
*
|
|
1416
|
+
* Listen for mouse click events on the map.
|
|
1228
1417
|
* @param listener
|
|
1229
1418
|
*/
|
|
1230
1419
|
onMapClickListener(listener: (param: IMapClickEvent) => void): {
|
|
1231
1420
|
unsubscribe: VoidFunction;
|
|
1232
1421
|
};
|
|
1233
1422
|
/**
|
|
1234
|
-
*
|
|
1423
|
+
* Listen for mouse click events on indoor POI
|
|
1235
1424
|
* @param listener
|
|
1236
1425
|
*/
|
|
1237
1426
|
onPoiClickListener(listener: (param: IPoiClickEvent) => void): {
|
|
1238
1427
|
unsubscribe: VoidFunction;
|
|
1239
1428
|
};
|
|
1240
1429
|
/**
|
|
1241
|
-
*
|
|
1430
|
+
* Listen for mouse click events at a point.
|
|
1242
1431
|
* @param listener
|
|
1243
1432
|
*/
|
|
1244
1433
|
onPointClickListener(listener: (param: IPointClickEvent) => void): {
|
|
1245
1434
|
unsubscribe: VoidFunction;
|
|
1246
1435
|
};
|
|
1247
1436
|
/**
|
|
1248
|
-
*
|
|
1437
|
+
* Listen for the indoor map status, including the changes of venue, building and floor.
|
|
1249
1438
|
* @param listener
|
|
1250
1439
|
*/
|
|
1251
1440
|
onMapChangeListener(listener: (param: IMapChangeEvent) => void): {
|
|
@@ -1253,21 +1442,20 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1253
1442
|
};
|
|
1254
1443
|
/**
|
|
1255
1444
|
* @deprecated Use "setTheme()" instead.
|
|
1256
|
-
*
|
|
1445
|
+
* Switch the map style
|
|
1257
1446
|
* @param theme ThemeType | string(customized map style file name)
|
|
1258
1447
|
*/
|
|
1259
1448
|
switchTheme(theme: string): void;
|
|
1260
|
-
setTheme(theme: string): void;
|
|
1449
|
+
setTheme(theme: ThemeType | string): void;
|
|
1261
1450
|
/**
|
|
1262
1451
|
* @deprecated Use 'setSelectedHighlightStyle' instead.
|
|
1263
|
-
*
|
|
1452
|
+
* Set the SelectedBuildingBorder's style. If set to null, the border will be invisible.
|
|
1264
1453
|
* @param style {ISelectedHighlightStyle | null}
|
|
1265
1454
|
*/
|
|
1266
1455
|
setSelectedBuildingBorderStyle(style: ISelectedHighlightStyle | null): this;
|
|
1267
1456
|
setSelectedHighlightStyle(style: ISelectedHighlightStyle | null): this;
|
|
1457
|
+
setFloorSwitchScope(scope: FloorSwitchScope): void;
|
|
1268
1458
|
private _setup;
|
|
1269
|
-
private _getStyleUrl;
|
|
1270
|
-
private _setIndoorFilter;
|
|
1271
1459
|
private _setStyle;
|
|
1272
1460
|
private _addControl;
|
|
1273
1461
|
private _selectPoiById;
|
|
@@ -1276,7 +1464,7 @@ declare class Map$1 implements IMapxusMap {
|
|
|
1276
1464
|
private _updatePermission;
|
|
1277
1465
|
private _selectCenterBuilding;
|
|
1278
1466
|
/**
|
|
1279
|
-
*
|
|
1467
|
+
* Query building features within the center rectangle(width: 1/2 width of map view, height: 1/2 height of map view) of map.
|
|
1280
1468
|
* @returns Map<buildingId, buildingFeature>
|
|
1281
1469
|
*/
|
|
1282
1470
|
private _getCenterBuildingUnitsMap;
|
|
@@ -1295,37 +1483,37 @@ export declare class Marker {
|
|
|
1295
1483
|
private _iconAnchor;
|
|
1296
1484
|
constructor(maplibreMap: maplibregl$1.Map);
|
|
1297
1485
|
/**
|
|
1298
|
-
*
|
|
1486
|
+
* Set custom marker image.
|
|
1299
1487
|
* @param icon Sprite name in map style or the URL of the image file.
|
|
1300
1488
|
* Image file must be in png, webp, or jpg format.
|
|
1301
1489
|
*/
|
|
1302
1490
|
setIcon(icon: string): Promise<void>;
|
|
1303
1491
|
/**
|
|
1304
|
-
*
|
|
1492
|
+
* Set marker image size.
|
|
1305
1493
|
* @param imageScale Default is 1.
|
|
1306
1494
|
*/
|
|
1307
1495
|
setIconSize(imageScale: number): void;
|
|
1308
1496
|
/**
|
|
1309
|
-
*
|
|
1497
|
+
* Set marker image anchor. Part of the icon placed closest to the anchor.
|
|
1310
1498
|
* @param anchor
|
|
1311
1499
|
*/
|
|
1312
1500
|
setIconAnchor(anchor: TAnchorPosition): void;
|
|
1313
1501
|
/**
|
|
1314
|
-
*
|
|
1502
|
+
* Marker layer id getter.
|
|
1315
1503
|
*/
|
|
1316
1504
|
get layerId(): string;
|
|
1317
1505
|
/**
|
|
1318
|
-
*
|
|
1506
|
+
* Marker source id getter.
|
|
1319
1507
|
*/
|
|
1320
1508
|
get sourceId(): string;
|
|
1321
1509
|
/**
|
|
1322
|
-
*
|
|
1510
|
+
* Draw marker[s] on map.
|
|
1323
1511
|
* @param array {IMarkerOptions | IMarkerOptionsWithFeatureId[]} Coordinate and properties arrays of marker[s].
|
|
1324
1512
|
* If you need to use updateData(), the parameter must be IMarkerOptionsWithFeatureId[].
|
|
1325
1513
|
*/
|
|
1326
1514
|
create(array: Array<IMarkerOptions | IMarkerOptionsWithFeatureId>): void;
|
|
1327
1515
|
/**
|
|
1328
|
-
*
|
|
1516
|
+
* Add, delete or update features of this marker layer.
|
|
1329
1517
|
* This approach requires unique IDs for every feature in the source!!! Including create() parameters.
|
|
1330
1518
|
* @param diff {remove: number[], add: IMarkerOptionsWithFeatureId[], update: IMarkerOptionsWithFeatureId[]}
|
|
1331
1519
|
* remove: Array of feature IDs to remove.
|
|
@@ -1338,11 +1526,11 @@ export declare class Marker {
|
|
|
1338
1526
|
update?: IMarkerOptionsWithFeatureId[];
|
|
1339
1527
|
}): void;
|
|
1340
1528
|
/**
|
|
1341
|
-
*
|
|
1529
|
+
* Remove marker[s] layer and source.
|
|
1342
1530
|
*/
|
|
1343
1531
|
remove(): void;
|
|
1344
1532
|
/**
|
|
1345
|
-
*
|
|
1533
|
+
* Add marker event listener.
|
|
1346
1534
|
* @param eventKey
|
|
1347
1535
|
* @param callback
|
|
1348
1536
|
*/
|
|
@@ -1350,14 +1538,14 @@ export declare class Marker {
|
|
|
1350
1538
|
off: () => void;
|
|
1351
1539
|
};
|
|
1352
1540
|
/**
|
|
1353
|
-
*
|
|
1541
|
+
* Filter marker by custom properties.
|
|
1354
1542
|
* @param filterExpression A expression specifying conditions on source features.
|
|
1355
1543
|
* Only features that match the filter are displayed. Refer:
|
|
1356
1544
|
* https://maplibre.org/maplibre-style-spec/expressions/
|
|
1357
1545
|
*/
|
|
1358
1546
|
setFilter(filterExpression: FilterSpecification): void;
|
|
1359
1547
|
/**
|
|
1360
|
-
*
|
|
1548
|
+
* Filter marker by venueId and ordinal.
|
|
1361
1549
|
* Required 'venueId' and 'ordinal' in properties.
|
|
1362
1550
|
* Markers not matched 'venueId' and 'ordinal' would be hidden;
|
|
1363
1551
|
* Outdoor markers always are shown.
|
|
@@ -1366,7 +1554,7 @@ export declare class Marker {
|
|
|
1366
1554
|
*/
|
|
1367
1555
|
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1368
1556
|
/**
|
|
1369
|
-
*
|
|
1557
|
+
* Filter marker by buildingId and ordinal.
|
|
1370
1558
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
1371
1559
|
* Markers not matched 'buildingId' and 'ordinal' would be hidden;
|
|
1372
1560
|
* Outdoor markers always are shown.
|
|
@@ -1375,14 +1563,14 @@ export declare class Marker {
|
|
|
1375
1563
|
*/
|
|
1376
1564
|
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1377
1565
|
/**
|
|
1378
|
-
*
|
|
1566
|
+
* Set marker's icon-opacity by custom properties.
|
|
1379
1567
|
* @param filterExpression A expression specifying conditions on source features.
|
|
1380
1568
|
* Only features that match the filter are displayed. Refer:
|
|
1381
1569
|
* https://maplibre.org/maplibre-style-spec/expressions/
|
|
1382
1570
|
*/
|
|
1383
1571
|
setOpacity(filterExpression: FilterSpecification): void;
|
|
1384
1572
|
/**
|
|
1385
|
-
*
|
|
1573
|
+
* Set marker's icon-opacity by venueId and ordinal.
|
|
1386
1574
|
* Required 'venueId' and 'ordinal' in properties.
|
|
1387
1575
|
* Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
|
|
1388
1576
|
* Outdoor markers' opacity always are 1.
|
|
@@ -1392,7 +1580,7 @@ export declare class Marker {
|
|
|
1392
1580
|
*/
|
|
1393
1581
|
setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined, inactiveOpacity?: number): void;
|
|
1394
1582
|
/**
|
|
1395
|
-
*
|
|
1583
|
+
* Set marker's icon-opacity by buildingId and ordinal.
|
|
1396
1584
|
* Required 'buildingId' and 'ordinal' in properties.
|
|
1397
1585
|
* Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
|
|
1398
1586
|
* Outdoor markers' opacity always are 1.
|
|
@@ -1423,154 +1611,14 @@ export declare class Poi {
|
|
|
1423
1611
|
private _queryIndoorFeaturesBySharedFloor;
|
|
1424
1612
|
private _queryIndoorFeaturesByFloor;
|
|
1425
1613
|
}
|
|
1426
|
-
export interface IRouteMarkers {
|
|
1427
|
-
from: string | null;
|
|
1428
|
-
to: string | null;
|
|
1429
|
-
stops: Array<string | null> | null;
|
|
1430
|
-
}
|
|
1431
|
-
export interface IRouteStyle<T> {
|
|
1432
|
-
indoorLineColor?: string | ExpressionSpecification;
|
|
1433
|
-
outdoorLineColor?: string | ExpressionSpecification;
|
|
1434
|
-
dashedLineColor?: string | ExpressionSpecification;
|
|
1435
|
-
shuttleBusLineColor?: string | ExpressionSpecification;
|
|
1436
|
-
lineWidth?: number | ExpressionSpecification;
|
|
1437
|
-
dashedLineWidth?: number | ExpressionSpecification;
|
|
1438
|
-
disableDashedLine?: boolean;
|
|
1439
|
-
/** Optional number in range [0, 1]. Defaults to 0.5. "inactiveRouteOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
1440
|
-
inactiveRouteOpacity?: number;
|
|
1441
|
-
/** Optional number in range [0, 1]. Defaults to 1. "outdoorLineOpacity" will be 1 if the parameter is greater than 1, and it will be 0 if the parameter is less than 0. */
|
|
1442
|
-
outdoorLineOpacity?: number;
|
|
1443
|
-
markers?: T;
|
|
1444
|
-
markerIconSize?: number | ExpressionSpecification;
|
|
1445
|
-
lineSymbol?: {
|
|
1446
|
-
/**
|
|
1447
|
-
* @description Icon url or sprite name.
|
|
1448
|
-
*/
|
|
1449
|
-
image?: string | null;
|
|
1450
|
-
size?: number | ExpressionSpecification;
|
|
1451
|
-
spacing?: number | ExpressionSpecification;
|
|
1452
|
-
};
|
|
1453
|
-
}
|
|
1454
|
-
export type TRouteStyleOptions = IRouteStyle<Partial<IRouteMarkers> | Array<string | null>>;
|
|
1455
|
-
export declare class RoutePainter {
|
|
1456
|
-
private readonly _maplibreMap;
|
|
1457
|
-
private _routeStyle;
|
|
1458
|
-
private _styleDiffs;
|
|
1459
|
-
private _filterBy;
|
|
1460
|
-
private _curVenue;
|
|
1461
|
-
private _curBuilding;
|
|
1462
|
-
private _curOrdinal;
|
|
1463
|
-
private _renderBoundaryLayer;
|
|
1464
|
-
constructor(maplibreMap: maplibregl$1.Map, routeStyle?: TRouteStyleOptions);
|
|
1465
|
-
/**
|
|
1466
|
-
* @description Set the style of the route.
|
|
1467
|
-
* @param routeStyle {TRouteStyleOptions | null} When null, reset to the initial style.
|
|
1468
|
-
*/
|
|
1469
|
-
setStyle(routeStyle: TRouteStyleOptions | null): Promise<void>;
|
|
1470
|
-
/**
|
|
1471
|
-
* @deprecated Use 'setStyle' instead.
|
|
1472
|
-
* @description Set image[s] of the stop marker[s].
|
|
1473
|
-
* @param icons {**Array<string | null> | {from?: string | null; to?: string | null; stops?: Array<string | null> | null;}**}
|
|
1474
|
-
* Array of sprite names or URLs, or the object with specifying icon.
|
|
1475
|
-
* Markers use images in order of icons array.
|
|
1476
|
-
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
1477
|
-
* If icons array has only one element, all stop markers use this image.
|
|
1478
|
-
* Image file must be in png, webp, or jpg format.
|
|
1479
|
-
* Null means none image.
|
|
1480
|
-
*/
|
|
1481
|
-
setMarkerIcons(icons: Array<string | null> | {
|
|
1482
|
-
from?: string | null;
|
|
1483
|
-
to?: string | null;
|
|
1484
|
-
stops?: Array<string | null> | null;
|
|
1485
|
-
}): Promise<void>;
|
|
1486
|
-
/**
|
|
1487
|
-
* @deprecated Use 'setStyle' instead.
|
|
1488
|
-
* @description Set all icons scale.
|
|
1489
|
-
* @param size number in range [0, ∞), default is 1.
|
|
1490
|
-
*/
|
|
1491
|
-
setMarkerIconSize(size: number): this;
|
|
1492
|
-
/**
|
|
1493
|
-
* @deprecated Use 'setStyle' instead.
|
|
1494
|
-
* @description Set the route color of the indoor part.
|
|
1495
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1496
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1497
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1498
|
-
*/
|
|
1499
|
-
setIndoorLineColor(color: string): this;
|
|
1500
|
-
/**
|
|
1501
|
-
* @deprecated Use 'setStyle' instead.
|
|
1502
|
-
* @description Set the route color of the outdoor part.
|
|
1503
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1504
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1505
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1506
|
-
*/
|
|
1507
|
-
setOutdoorLineColor(color: string): this;
|
|
1508
|
-
/**
|
|
1509
|
-
* @deprecated Use 'setStyle' instead.
|
|
1510
|
-
* @description Set color of dashed lines which connected the start and end markers.
|
|
1511
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1512
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1513
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1514
|
-
*/
|
|
1515
|
-
setDashedLineColor(color: string): this;
|
|
1516
|
-
/**
|
|
1517
|
-
* @deprecated Use 'setStyle' instead.
|
|
1518
|
-
* @description Set color of shuttle bus line.
|
|
1519
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1520
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1521
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1522
|
-
*/
|
|
1523
|
-
setBusLineColor(color: string): this;
|
|
1524
|
-
/**
|
|
1525
|
-
* @description Render route on the map.
|
|
1526
|
-
* @param path Route path from RouteService.search response.
|
|
1527
|
-
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
1528
|
-
*/
|
|
1529
|
-
render(path: IRoutePath, markerLocations: Array<[
|
|
1530
|
-
number,
|
|
1531
|
-
number
|
|
1532
|
-
]>): void;
|
|
1533
|
-
/**
|
|
1534
|
-
* @description Remove route from the map.
|
|
1535
|
-
*/
|
|
1536
|
-
remove(): void;
|
|
1537
|
-
/**
|
|
1538
|
-
* @description Filter paths' opacity by venue and ordinal.
|
|
1539
|
-
* @param venueId {string | null | undefined}
|
|
1540
|
-
* @param ordinal {string | null | undefined}
|
|
1541
|
-
*/
|
|
1542
|
-
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1543
|
-
/**
|
|
1544
|
-
* @description Filter paths' opacity by building and ordinal.
|
|
1545
|
-
* @param buildingId {string | null | undefined}
|
|
1546
|
-
* @param ordinal {string | null | undefined}
|
|
1547
|
-
*/
|
|
1548
|
-
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1549
|
-
private _classifyFeatures;
|
|
1550
|
-
private _createLineFeature;
|
|
1551
|
-
private _createIconFeature;
|
|
1552
|
-
private _renderSolidLines;
|
|
1553
|
-
private _renderDashedLines;
|
|
1554
|
-
private _renderConnectors;
|
|
1555
|
-
private _renderMarkers;
|
|
1556
|
-
private _addCollectionSource;
|
|
1557
|
-
private _addLineLayer;
|
|
1558
|
-
private _renderLineSymbols;
|
|
1559
|
-
private _addIconLayer;
|
|
1560
|
-
private _updateStyleProperties;
|
|
1561
|
-
private _loadMarkerIcons;
|
|
1562
|
-
private _updateLayers;
|
|
1563
|
-
private _filterRouteOpacity;
|
|
1564
|
-
}
|
|
1565
1614
|
/**
|
|
1566
1615
|
* AccessControl class, for providing token and managing token lifecycle.
|
|
1567
|
-
* @extends EventEmitter
|
|
1568
1616
|
* Three events are emitted:
|
|
1569
1617
|
* - "updated": Emitted when the token is updated. Usage: accessControl.on("updated", ({ appId, token }) => {});
|
|
1570
1618
|
* - "error": Emitted when an error occurs during token update. Usage: accessControl.on("error", (error) => {});
|
|
1571
1619
|
* - "closed": Emitted when the access control is closed. Usage: accessControl.on("closed", () => {});
|
|
1572
1620
|
*/
|
|
1573
|
-
export declare class AccessControl extends
|
|
1621
|
+
export declare class AccessControl extends TinyEmitter {
|
|
1574
1622
|
private readonly _appId;
|
|
1575
1623
|
private readonly _secret;
|
|
1576
1624
|
isClosed: boolean;
|
|
@@ -1602,22 +1650,22 @@ export declare class VenuesService {
|
|
|
1602
1650
|
private _request;
|
|
1603
1651
|
constructor();
|
|
1604
1652
|
/**
|
|
1605
|
-
*
|
|
1653
|
+
* Search venues by ids.
|
|
1606
1654
|
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
|
|
1607
1655
|
*/
|
|
1608
1656
|
searchByIds(ids: string | string[]): TPromiseVenues;
|
|
1609
1657
|
/**
|
|
1610
|
-
*
|
|
1658
|
+
* Search venues by center and distance.
|
|
1611
1659
|
* @param {ISearchByDistanceOptions} options
|
|
1612
1660
|
*/
|
|
1613
1661
|
searchByDistance(options: ISearchByDistanceOptions): TPromiseVenues;
|
|
1614
1662
|
/**
|
|
1615
|
-
*
|
|
1663
|
+
* Search venues in a rectangular area.
|
|
1616
1664
|
* @param {ISearchByBoundsOptions} options
|
|
1617
1665
|
*/
|
|
1618
1666
|
searchByBounds(options: ISearchByBoundsOptions): TPromiseVenues;
|
|
1619
1667
|
/**
|
|
1620
|
-
*
|
|
1668
|
+
* Search venues by global.
|
|
1621
1669
|
* @param {ISearchByKeywordsOptions} options
|
|
1622
1670
|
*/
|
|
1623
1671
|
searchByGlobal(options: ISearchByKeywordsOptions): TPromiseVenues;
|
|
@@ -1630,27 +1678,27 @@ export declare class BuildingsService {
|
|
|
1630
1678
|
private _request;
|
|
1631
1679
|
constructor();
|
|
1632
1680
|
/**
|
|
1633
|
-
*
|
|
1681
|
+
* Search buildings by id[s].
|
|
1634
1682
|
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
|
|
1635
1683
|
*/
|
|
1636
1684
|
searchByIds(ids: string | string[]): TPromiseBuildings;
|
|
1637
1685
|
/**
|
|
1638
|
-
*
|
|
1686
|
+
* Search buildings by center and distance.
|
|
1639
1687
|
* @param {ISearchByDistanceOptions} options
|
|
1640
1688
|
*/
|
|
1641
1689
|
searchByDistance(options: ISearchByDistanceOptions): TPromiseBuildings;
|
|
1642
1690
|
/**
|
|
1643
|
-
*
|
|
1691
|
+
* Search buildings in a rectangular area.
|
|
1644
1692
|
* @param {ISearchByBoundsOptions} options
|
|
1645
1693
|
*/
|
|
1646
1694
|
searchByBounds(options: ISearchByBoundsOptions): TPromiseBuildings;
|
|
1647
1695
|
/**
|
|
1648
|
-
*
|
|
1696
|
+
* Search buildings global.
|
|
1649
1697
|
* @param {ISearchByKeywordsOptions} options
|
|
1650
1698
|
*/
|
|
1651
1699
|
searchByGlobal(options: ISearchByKeywordsOptions): TPromiseBuildings;
|
|
1652
1700
|
/**
|
|
1653
|
-
*
|
|
1701
|
+
* Search building by floor id.
|
|
1654
1702
|
* @param floorId
|
|
1655
1703
|
*/
|
|
1656
1704
|
searchByFloorId(floorId: string): TPromiseBuildings;
|
|
@@ -1663,51 +1711,58 @@ export declare class PoisService {
|
|
|
1663
1711
|
private _request;
|
|
1664
1712
|
constructor();
|
|
1665
1713
|
/**
|
|
1666
|
-
*
|
|
1714
|
+
* Search POIs by id[s].
|
|
1667
1715
|
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 100.
|
|
1668
1716
|
*/
|
|
1669
1717
|
searchByIds(ids: string | string[]): TPromisePois<IPoi | ISharedPoi>;
|
|
1670
1718
|
/**
|
|
1671
|
-
*
|
|
1719
|
+
* Search POIs by radius distance of the center point.
|
|
1672
1720
|
* @param options {ISearchByDistanceOptions}
|
|
1673
1721
|
*/
|
|
1674
1722
|
searchByDistance(options: ISearchByDistanceOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1675
1723
|
/**
|
|
1676
|
-
*
|
|
1724
|
+
* Search POIs in a rectangular area.
|
|
1677
1725
|
* @param options {IPoiSearchByBoundsOptions}
|
|
1678
1726
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1679
1727
|
*/
|
|
1680
1728
|
searchByBounds(options: IPoiSearchByBoundsOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1681
1729
|
/**
|
|
1682
|
-
*
|
|
1730
|
+
* Search POIs of a building.
|
|
1683
1731
|
* @param options {ISearchByBuildingOptions}
|
|
1684
1732
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1685
1733
|
*/
|
|
1686
1734
|
searchByBuilding(options: ISearchByBuildingOptions): TPromisePois<IPoi>;
|
|
1687
1735
|
/**
|
|
1688
|
-
*
|
|
1736
|
+
* Search POIs of a venue.
|
|
1689
1737
|
* @param options {ISearchByVenueOptions}
|
|
1690
1738
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1691
1739
|
*/
|
|
1692
1740
|
searchByVenue(options: ISearchByVenueOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1693
1741
|
/**
|
|
1694
|
-
* @
|
|
1742
|
+
* @deprecated Use 'searchByFloors()' instead.
|
|
1743
|
+
* Search POIs of a floor.
|
|
1695
1744
|
* @param options {TSearchByFloorOptions}
|
|
1696
1745
|
* 'orderBy' cannot be used with 'keywords'.
|
|
1697
1746
|
*/
|
|
1698
1747
|
searchByFloor(options: TSearchByFloorOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1699
1748
|
/**
|
|
1700
|
-
*
|
|
1749
|
+
* Search POIs of floors.
|
|
1750
|
+
* @param options {TSearchByFloorsOptions}
|
|
1751
|
+
* 'orderBy' cannot be used with 'keywords'.
|
|
1752
|
+
*/
|
|
1753
|
+
searchByFloors(options: TSearchByFloorsOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1754
|
+
/**
|
|
1755
|
+
* Search surrounding POIs based on the user's location and orientation.
|
|
1701
1756
|
* @param {TSearchByOrientationOptions} options
|
|
1702
1757
|
*/
|
|
1703
1758
|
searchByOrientation(options: TSearchByOrientationOptions): TPromiseOrientationPois;
|
|
1704
1759
|
/**
|
|
1705
|
-
*
|
|
1760
|
+
* Search POIs by category or excluded categories.
|
|
1706
1761
|
* @param {TSearchByCategoryOptions} options
|
|
1707
1762
|
*/
|
|
1708
1763
|
searchByCategory(options: TSearchByCategoryOptions): TPromisePois<IPoi | ISharedPoi>;
|
|
1709
1764
|
/**
|
|
1710
|
-
*
|
|
1765
|
+
* Search poi categories by venue id, building id, or floor id.
|
|
1711
1766
|
* @param {TSearchCategoriesOptions} options
|
|
1712
1767
|
*/
|
|
1713
1768
|
searchCategories(options: TSearchCategoriesOptions): TPromiseCategories;
|
|
@@ -1719,51 +1774,42 @@ export declare class RouteService {
|
|
|
1719
1774
|
private _request;
|
|
1720
1775
|
constructor();
|
|
1721
1776
|
/**
|
|
1722
|
-
*
|
|
1777
|
+
* Search the route of two or more points.
|
|
1723
1778
|
* @param options {IRouteSearchOptions}
|
|
1724
1779
|
*/
|
|
1725
1780
|
search(options: IRouteSearchOptions): TPromiseRoute;
|
|
1726
1781
|
}
|
|
1727
|
-
export
|
|
1728
|
-
|
|
1729
|
-
/**
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
* This method is internal and should not be exposed in the documentation.
|
|
1755
|
-
*/
|
|
1756
|
-
export declare const __internal: {
|
|
1757
|
-
[x: symbol]: (names: InputProduct[]) => void;
|
|
1758
|
-
};
|
|
1759
|
-
export declare const ERRORS: readonly [
|
|
1760
|
-
"unauthorized",
|
|
1761
|
-
"initError"
|
|
1762
|
-
];
|
|
1763
|
-
export declare const VERSION: string;
|
|
1782
|
+
export interface IMapxusLib {
|
|
1783
|
+
Map: typeof Map$1;
|
|
1784
|
+
/** @deprecated */
|
|
1785
|
+
Indoor: typeof Indoor;
|
|
1786
|
+
Marker: typeof Marker;
|
|
1787
|
+
Poi: typeof Poi;
|
|
1788
|
+
RoutePainter: typeof RoutePainter;
|
|
1789
|
+
/** @deprecated */
|
|
1790
|
+
AccessControl: typeof AccessControl;
|
|
1791
|
+
/** @deprecated */
|
|
1792
|
+
BuildingFilterControl: typeof BuildingFilterControl;
|
|
1793
|
+
BuildingSelectorHandler: typeof BuildingSelectorHandler;
|
|
1794
|
+
/** @deprecated */
|
|
1795
|
+
FloorsControl: typeof FloorsControl;
|
|
1796
|
+
FloorSelectorHandler: typeof FloorSelectorHandler;
|
|
1797
|
+
/** @deprecated */
|
|
1798
|
+
SwitchBuildingHandler: typeof SwitchBuildingHandler;
|
|
1799
|
+
/** @deprecated */
|
|
1800
|
+
SwitchOutdoorHandler: typeof SwitchOutdoorHandler;
|
|
1801
|
+
IndoorClickSelection: typeof IndoorClickSelection;
|
|
1802
|
+
OutdoorClickSelection: typeof OutdoorClickSelection;
|
|
1803
|
+
VenuesService: typeof VenuesService;
|
|
1804
|
+
BuildingsService: typeof BuildingsService;
|
|
1805
|
+
PoisService: typeof PoisService;
|
|
1806
|
+
RouteService: typeof RouteService;
|
|
1807
|
+
}
|
|
1808
|
+
declare const mapxusLib: IMapxusLib;
|
|
1764
1809
|
|
|
1765
1810
|
export {
|
|
1766
1811
|
Map$1 as Map,
|
|
1812
|
+
mapxusLib as default,
|
|
1767
1813
|
};
|
|
1768
1814
|
|
|
1769
1815
|
export {};
|