@mapxus/mapxus-map-jp 7.7.1 → 7.8.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 +183 -0
- package/dist/index.umd.js +1 -0
- package/{index.d.ts → es/index.d.ts} +694 -681
- package/es/index.mjs +1 -0
- package/es/utils/index.mjs +1 -0
- package/lib/index.cjs +1 -0
- package/lib/utils/index.cjs +1 -0
- package/package.json +9 -6
- package/index.js +0 -1
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
|
+
import { GeoJsonProperties, LineString, Point } from 'geojson';
|
|
5
|
+
import maplibregl$1 from 'maplibre-gl';
|
|
4
6
|
import { ControlPosition, FilterSpecification, IControl, LngLat, Map as MaplibreMap, MapGeoJSONFeature, MapLayerEventType, PaddingOptions, PointLike, RequireAtLeastOne } from 'maplibre-gl';
|
|
5
7
|
|
|
8
|
+
export declare enum FloorSwitchMode {
|
|
9
|
+
SWITCHED_BY_BUILDING = 0,
|
|
10
|
+
SWITCHED_BY_VENUE = 1
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use enum `PresetLanguage` instead.
|
|
14
|
+
*/
|
|
15
|
+
export type TPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
|
|
16
|
+
export declare enum PresetLanguage {
|
|
17
|
+
ENGLISH = "en",
|
|
18
|
+
CHINESE_SIMPLIFIED = "zh-Hans",
|
|
19
|
+
CHINESE_TRADITIONAL = "zh-Hant",
|
|
20
|
+
JAPANESE = "ja",
|
|
21
|
+
KOREAN = "ko"
|
|
22
|
+
}
|
|
6
23
|
export declare enum ThemeType {
|
|
7
24
|
CHRISTMAS = "christmas",
|
|
8
25
|
HALLOWEEN = "halloween",
|
|
@@ -12,10 +29,71 @@ export declare enum ThemeType {
|
|
|
12
29
|
COMMON = "common",
|
|
13
30
|
MAPXUS_V2 = "mapxus_v2"
|
|
14
31
|
}
|
|
15
|
-
export interface
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
32
|
+
export interface IBbox {
|
|
33
|
+
maxLat: number;
|
|
34
|
+
maxLon: number;
|
|
35
|
+
minLat: number;
|
|
36
|
+
minLon: number;
|
|
37
|
+
}
|
|
38
|
+
export interface IBuildingChangedOptions {
|
|
39
|
+
buildingId: string | null;
|
|
40
|
+
ordinal: string | null;
|
|
41
|
+
}
|
|
42
|
+
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
43
|
+
default: string;
|
|
44
|
+
}
|
|
45
|
+
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
46
|
+
housenumber: string;
|
|
47
|
+
street: string;
|
|
48
|
+
}>;
|
|
49
|
+
export interface ILocation {
|
|
50
|
+
lat: number;
|
|
51
|
+
lon: number;
|
|
52
|
+
}
|
|
53
|
+
export interface IResponse<T> {
|
|
54
|
+
code: number;
|
|
55
|
+
message: string;
|
|
56
|
+
result: T;
|
|
57
|
+
}
|
|
58
|
+
export interface IBuildingInlineFloor {
|
|
59
|
+
code: string;
|
|
60
|
+
id: string;
|
|
61
|
+
ordinal: number;
|
|
62
|
+
signalMap: boolean;
|
|
63
|
+
visualMap: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface IBuilding {
|
|
66
|
+
address: IMultilingualAddress;
|
|
67
|
+
bbox: IBbox;
|
|
68
|
+
buildingId: string;
|
|
69
|
+
buildingOutlineId: number;
|
|
70
|
+
city?: string;
|
|
71
|
+
country: string;
|
|
72
|
+
defaultFloor?: string;
|
|
73
|
+
floors: IBuildingInlineFloor[];
|
|
74
|
+
groundFloor: string;
|
|
75
|
+
isPrivate: "yes" | "no";
|
|
76
|
+
labelCenter: ILocation;
|
|
77
|
+
name: IMultilingualName;
|
|
78
|
+
organization: string;
|
|
79
|
+
region: string;
|
|
80
|
+
signalMap: boolean;
|
|
81
|
+
type: string;
|
|
82
|
+
venueId: string;
|
|
83
|
+
venueName: IMultilingualName;
|
|
84
|
+
visualMap: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface IResponseBuildings {
|
|
87
|
+
buildings: IBuilding[];
|
|
88
|
+
total: number;
|
|
89
|
+
}
|
|
90
|
+
export type TPromiseBuildings = AxiosPromise<IResponse<IResponseBuildings>>;
|
|
91
|
+
export type TPointFeature = GeoJSON.Feature<Point, GeoJsonProperties>;
|
|
92
|
+
export type TLineStringFeature = GeoJSON.Feature<LineString, GeoJsonProperties>;
|
|
93
|
+
export interface IFloor {
|
|
94
|
+
code: string | null;
|
|
95
|
+
id: string | null;
|
|
96
|
+
ordinal: string | null;
|
|
19
97
|
}
|
|
20
98
|
/**
|
|
21
99
|
* @deprecated Use 'IFloorSelectorStyle' instead.
|
|
@@ -38,23 +116,19 @@ export interface IFloorSelectorStyle {
|
|
|
38
116
|
itemCount?: number;
|
|
39
117
|
defaultFolded?: boolean;
|
|
40
118
|
}
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
119
|
+
export interface IMapClickEvent {
|
|
120
|
+
coordinate: LngLat;
|
|
121
|
+
building: MapGeoJSONFeature | null;
|
|
122
|
+
venue: MapGeoJSONFeature | null;
|
|
123
|
+
floor: IFloor;
|
|
44
124
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export declare enum PresetLanguage {
|
|
50
|
-
ENGLISH = "en",
|
|
51
|
-
CHINESE_SIMPLIFIED = "zh-Hans",
|
|
52
|
-
CHINESE_TRADITIONAL = "zh-Hant",
|
|
53
|
-
JAPANESE = "ja",
|
|
54
|
-
KOREAN = "ko"
|
|
125
|
+
export interface ISelectedBuildingBorderStyle {
|
|
126
|
+
lineWidth?: number;
|
|
127
|
+
lineColor?: string;
|
|
128
|
+
lineOpacity?: number;
|
|
55
129
|
}
|
|
56
130
|
export interface IMapOption {
|
|
57
|
-
map:
|
|
131
|
+
map: maplibregl$1.Map;
|
|
58
132
|
appId: string;
|
|
59
133
|
secret: string;
|
|
60
134
|
/** @deprecated Use 'floorSelectorEnabled' instead */
|
|
@@ -119,74 +193,421 @@ export interface IMapOption {
|
|
|
119
193
|
boundsPadding?: number | RequireAtLeastOne<PaddingOptions>;
|
|
120
194
|
language?: PresetLanguage;
|
|
121
195
|
}
|
|
122
|
-
export type
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
196
|
+
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
197
|
+
export interface IMarkerOptions {
|
|
198
|
+
lngLat: [
|
|
199
|
+
number,
|
|
200
|
+
number
|
|
201
|
+
];
|
|
202
|
+
properties?: {
|
|
203
|
+
[k: string]: string;
|
|
204
|
+
};
|
|
131
205
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
206
|
+
export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
|
|
207
|
+
featureId: number;
|
|
208
|
+
}
|
|
209
|
+
export interface IPoiEvent {
|
|
210
|
+
coordinate: LngLat;
|
|
211
|
+
poi: MapGeoJSONFeature;
|
|
212
|
+
building: MapGeoJSONFeature | null;
|
|
213
|
+
venue: MapGeoJSONFeature | null;
|
|
214
|
+
floor: IFloor;
|
|
215
|
+
}
|
|
216
|
+
export interface IPointEvent {
|
|
217
|
+
coordinate: LngLat;
|
|
218
|
+
point: PointLike;
|
|
219
|
+
}
|
|
220
|
+
export interface IPoi {
|
|
221
|
+
accessibilityDetail: IMultilingualName;
|
|
222
|
+
buildingId: string;
|
|
223
|
+
category: string[];
|
|
224
|
+
distance: number;
|
|
225
|
+
floor: string;
|
|
226
|
+
floorId: string;
|
|
227
|
+
id: string;
|
|
228
|
+
location: ILocation;
|
|
229
|
+
name: IMultilingualName;
|
|
230
|
+
osmRefId: number;
|
|
231
|
+
poiId: string;
|
|
232
|
+
venueId: string;
|
|
233
|
+
/** @deprecated 'description' will be removed soon */
|
|
234
|
+
description?: string;
|
|
235
|
+
descriptions?: IMultilingualName;
|
|
236
|
+
email?: string;
|
|
237
|
+
openingHours?: string;
|
|
238
|
+
phone?: string;
|
|
239
|
+
website?: string;
|
|
240
|
+
}
|
|
241
|
+
export interface IResponsePois {
|
|
242
|
+
pois: IPoi[];
|
|
243
|
+
total: number;
|
|
244
|
+
}
|
|
245
|
+
export type TPromisePois = AxiosPromise<IResponse<IResponsePois>>;
|
|
246
|
+
export type TPromiseCategories = AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
247
|
+
export type TPromiseOrientationPois = AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
248
|
+
export declare enum DistanceSearchType {
|
|
249
|
+
POINT = "Point",
|
|
250
|
+
POLYGON = "Polygon",
|
|
251
|
+
GATE = "Gate"
|
|
252
|
+
}
|
|
253
|
+
export interface IPoiCategory {
|
|
254
|
+
category: string;
|
|
255
|
+
description: string | null;
|
|
256
|
+
id: string;
|
|
257
|
+
title: Partial<Record<keyof IMultilingualName, string>>;
|
|
258
|
+
}
|
|
259
|
+
export interface IOrientationPoi {
|
|
260
|
+
angle: number;
|
|
261
|
+
buildingId: string;
|
|
262
|
+
category: string[];
|
|
263
|
+
distance: number;
|
|
264
|
+
distanceSource: string;
|
|
265
|
+
floor: string;
|
|
266
|
+
floorId: string;
|
|
267
|
+
id: string;
|
|
268
|
+
location: ILocation;
|
|
269
|
+
name: IMultilingualName;
|
|
270
|
+
osmRefId: number;
|
|
271
|
+
poiId: string;
|
|
272
|
+
description?: string;
|
|
273
|
+
email?: string;
|
|
274
|
+
openingHours?: string;
|
|
275
|
+
phone?: string;
|
|
276
|
+
website?: string;
|
|
277
|
+
}
|
|
278
|
+
export interface ISearchDistance {
|
|
142
279
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @param type name of the event(a unique string)
|
|
145
|
-
* @param listener event handler, it will be called when the event is fired
|
|
280
|
+
* The center of searching range, [lng, lat].
|
|
146
281
|
*/
|
|
147
|
-
|
|
282
|
+
center: [
|
|
283
|
+
number,
|
|
284
|
+
number
|
|
285
|
+
];
|
|
148
286
|
/**
|
|
149
|
-
*
|
|
150
|
-
* @param type name of the event
|
|
151
|
-
* @param listener event handler
|
|
287
|
+
* Radius from center, unit is meter, cannot exceed 10,000.
|
|
152
288
|
*/
|
|
153
|
-
|
|
289
|
+
distance: number;
|
|
154
290
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* The listener will be called first time the event fires after the listener is registered.
|
|
158
|
-
*
|
|
159
|
-
* @param {string} type The event type to listen for.
|
|
160
|
-
* @param {Function} listener The function to be called when the event is fired the first time.
|
|
161
|
-
* @returns {Object} `this`
|
|
291
|
+
* The maximum value is 100, default is 10.
|
|
162
292
|
*/
|
|
163
|
-
|
|
164
|
-
fire(event: DefinedEvent): this;
|
|
293
|
+
offset?: number;
|
|
165
294
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* @param {string} type The event type
|
|
169
|
-
* @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
|
|
170
|
-
* @private
|
|
295
|
+
* Results for specified page number. Default is 1.
|
|
171
296
|
*/
|
|
172
|
-
|
|
297
|
+
page?: number;
|
|
298
|
+
}
|
|
299
|
+
export interface IPoiSearchByCategoryOptions extends ISearchDistance {
|
|
300
|
+
category: string;
|
|
301
|
+
}
|
|
302
|
+
export interface IPoiSearchByExcludedCategoriesOptions extends ISearchDistance {
|
|
303
|
+
excludedCategories: string | string[];
|
|
304
|
+
}
|
|
305
|
+
export type TPoiSearchByCategoryOptions = IPoiSearchByCategoryOptions | IPoiSearchByExcludedCategoriesOptions;
|
|
306
|
+
export interface IPoiSearchByDistanceOptions extends ISearchDistance {
|
|
173
307
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* @returns {Object} `this`
|
|
177
|
-
* @private
|
|
308
|
+
* Keywords of POI name.
|
|
178
309
|
*/
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
export interface IFloor {
|
|
182
|
-
code: string | null;
|
|
183
|
-
id: string | null;
|
|
184
|
-
ordinal: string | null;
|
|
310
|
+
keywords?: string;
|
|
185
311
|
}
|
|
186
|
-
export
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
312
|
+
export interface ISearchOrientation {
|
|
313
|
+
/**
|
|
314
|
+
* User's position, [lng, lat].
|
|
315
|
+
*/
|
|
316
|
+
center: [
|
|
317
|
+
number,
|
|
318
|
+
number
|
|
319
|
+
];
|
|
320
|
+
/**
|
|
321
|
+
* The angle between the user's orientation and true north.
|
|
322
|
+
*/
|
|
323
|
+
angle: number;
|
|
324
|
+
/**
|
|
325
|
+
* The radius with 'center' as the center of the circle.
|
|
326
|
+
*/
|
|
327
|
+
distance: number;
|
|
328
|
+
/**
|
|
329
|
+
* The type of POI, default is 'Point'.
|
|
330
|
+
*/
|
|
331
|
+
distanceSearchType?: DistanceSearchType;
|
|
332
|
+
}
|
|
333
|
+
export interface IPoiSearchByOrientationAndBuildingOptions extends ISearchOrientation {
|
|
334
|
+
buildingId: string;
|
|
335
|
+
}
|
|
336
|
+
export interface IPoiSearchByOrientationAndFloorOptions extends ISearchOrientation {
|
|
337
|
+
floorId: string;
|
|
338
|
+
}
|
|
339
|
+
export interface IPoiSearchByOrientationAndOrdinalOptions extends ISearchOrientation {
|
|
340
|
+
ordinal: string;
|
|
341
|
+
}
|
|
342
|
+
export type TPoiSearchByOrientationOptions = IPoiSearchByOrientationAndBuildingOptions | IPoiSearchByOrientationAndFloorOptions | IPoiSearchByOrientationAndOrdinalOptions;
|
|
343
|
+
export interface IPoiSearchOrientationOptions {
|
|
344
|
+
/**
|
|
345
|
+
* User's current position, [lng, lat].
|
|
346
|
+
*/
|
|
347
|
+
center: [
|
|
348
|
+
number,
|
|
349
|
+
number
|
|
350
|
+
];
|
|
351
|
+
/**
|
|
352
|
+
* The angle between cellphone's orientation and the north.
|
|
353
|
+
*/
|
|
354
|
+
angle: number;
|
|
355
|
+
/**
|
|
356
|
+
* Radius.
|
|
357
|
+
*/
|
|
358
|
+
distance: number;
|
|
359
|
+
buildingId?: string;
|
|
360
|
+
floorId?: string;
|
|
361
|
+
/**
|
|
362
|
+
* Floor order in physical space, e.g. '-1', '0'(ground floor), '1'...
|
|
363
|
+
*/
|
|
364
|
+
ordinal?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Search type.
|
|
367
|
+
*/
|
|
368
|
+
distanceSearchType?: DistanceSearchType;
|
|
369
|
+
}
|
|
370
|
+
export declare enum PoisOrderBy {
|
|
371
|
+
DEFAULT_NAME = "DefaultName"
|
|
372
|
+
}
|
|
373
|
+
export interface ISearchKeywords {
|
|
374
|
+
keywords?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Quantity per page, the maximum is 100, default is 10.
|
|
377
|
+
*/
|
|
378
|
+
offset?: number;
|
|
379
|
+
/**
|
|
380
|
+
* Results for specified page number. Default is 1.
|
|
381
|
+
*/
|
|
382
|
+
page?: number;
|
|
383
|
+
}
|
|
384
|
+
export interface IPoiSearchByBuildingOptions extends ISearchKeywords {
|
|
385
|
+
buildingId: string;
|
|
386
|
+
orderBy?: PoisOrderBy;
|
|
387
|
+
}
|
|
388
|
+
export interface IPoiSearchByVenueOptions extends ISearchKeywords {
|
|
389
|
+
venueId: string;
|
|
390
|
+
orderBy?: PoisOrderBy;
|
|
391
|
+
}
|
|
392
|
+
export interface IPoiSearchByFloorOptions extends ISearchKeywords {
|
|
393
|
+
floorId: string;
|
|
394
|
+
orderBy?: PoisOrderBy;
|
|
395
|
+
}
|
|
396
|
+
export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
|
|
397
|
+
/**
|
|
398
|
+
* An array of LngLat coordinates in [sw, ne] order
|
|
399
|
+
*/
|
|
400
|
+
bounds: [
|
|
401
|
+
[
|
|
402
|
+
number,
|
|
403
|
+
number
|
|
404
|
+
],
|
|
405
|
+
[
|
|
406
|
+
number,
|
|
407
|
+
number
|
|
408
|
+
]
|
|
409
|
+
];
|
|
410
|
+
orderBy?: PoisOrderBy;
|
|
411
|
+
}
|
|
412
|
+
export interface ITokenInfo {
|
|
413
|
+
"app:name": string;
|
|
414
|
+
auth_time: number;
|
|
415
|
+
"cognito:username": string;
|
|
416
|
+
"custom:organization": string;
|
|
417
|
+
exp: number;
|
|
418
|
+
iat: number;
|
|
419
|
+
organization: string;
|
|
420
|
+
"organization:name": string;
|
|
421
|
+
privatization_type: string;
|
|
422
|
+
username: string;
|
|
423
|
+
}
|
|
424
|
+
export declare enum VehicleType {
|
|
425
|
+
FOOT = "foot",
|
|
426
|
+
WHEELCHAIR = "wheelchair",
|
|
427
|
+
ESCALATOR = "escalator",
|
|
428
|
+
EMERGENCY = "emergency"
|
|
429
|
+
}
|
|
430
|
+
export interface IRouteInfo {
|
|
431
|
+
copyrights: string[];
|
|
432
|
+
took: number;
|
|
433
|
+
}
|
|
434
|
+
export interface IInstruction {
|
|
435
|
+
building_id: string;
|
|
436
|
+
distance: number;
|
|
437
|
+
floor_id: string;
|
|
438
|
+
heading: number;
|
|
439
|
+
interval: [
|
|
440
|
+
number,
|
|
441
|
+
number
|
|
442
|
+
];
|
|
443
|
+
ordinal: number;
|
|
444
|
+
sign: number;
|
|
445
|
+
street_name: string;
|
|
446
|
+
text: string;
|
|
447
|
+
time: number;
|
|
448
|
+
type: string | null;
|
|
449
|
+
venue_id: string;
|
|
450
|
+
}
|
|
451
|
+
export interface IRoutePath {
|
|
452
|
+
bbox: [
|
|
453
|
+
number,
|
|
454
|
+
number,
|
|
455
|
+
number,
|
|
456
|
+
number
|
|
457
|
+
];
|
|
458
|
+
distance: number;
|
|
459
|
+
instructions: IInstruction[];
|
|
460
|
+
points: {
|
|
461
|
+
coordinates: Array<[
|
|
462
|
+
number,
|
|
463
|
+
number
|
|
464
|
+
]>;
|
|
465
|
+
type: string;
|
|
466
|
+
};
|
|
467
|
+
snapped_waypoints: {
|
|
468
|
+
coordinates: Array<[
|
|
469
|
+
number,
|
|
470
|
+
number
|
|
471
|
+
]>;
|
|
472
|
+
type: string;
|
|
473
|
+
};
|
|
474
|
+
time: number;
|
|
475
|
+
}
|
|
476
|
+
export interface IResponseRoute {
|
|
477
|
+
infos: IRouteInfo | null;
|
|
478
|
+
paths: IRoutePath[];
|
|
479
|
+
}
|
|
480
|
+
export type TPromiseRoute = AxiosPromise<IResponse<IResponseRoute>>;
|
|
481
|
+
export interface IRouteSearchOptions {
|
|
482
|
+
/**
|
|
483
|
+
* @description Points are in order, from -> stops -> to.
|
|
484
|
+
* The length of points must be: 1 < {points.length} < 6.
|
|
485
|
+
*/
|
|
486
|
+
points: Array<{
|
|
487
|
+
lat: number;
|
|
488
|
+
lon: number;
|
|
489
|
+
buildingId?: string;
|
|
490
|
+
floorId?: string;
|
|
491
|
+
}>;
|
|
492
|
+
/**
|
|
493
|
+
* @description Default is "foot".
|
|
494
|
+
*/
|
|
495
|
+
vehicle?: VehicleType;
|
|
496
|
+
/**
|
|
497
|
+
* @description Language-specific response. Default is "en".
|
|
498
|
+
*/
|
|
499
|
+
locale?: PresetLanguage;
|
|
500
|
+
/**
|
|
501
|
+
* @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
|
|
502
|
+
* @deprecated
|
|
503
|
+
*/
|
|
504
|
+
toDoor?: boolean;
|
|
505
|
+
}
|
|
506
|
+
export interface IVenueInlineBuilding {
|
|
507
|
+
buildingOutlineId: number;
|
|
508
|
+
defaultFloor?: string;
|
|
509
|
+
floors: IBuildingInlineFloor[];
|
|
510
|
+
id: string;
|
|
511
|
+
labelCenter: ILocation;
|
|
512
|
+
name: IMultilingualName;
|
|
513
|
+
point: {
|
|
514
|
+
type: string;
|
|
515
|
+
coordinates: [
|
|
516
|
+
number,
|
|
517
|
+
number
|
|
518
|
+
];
|
|
519
|
+
};
|
|
520
|
+
signalMap: boolean;
|
|
521
|
+
visualMap: boolean;
|
|
522
|
+
}
|
|
523
|
+
export interface IVenue {
|
|
524
|
+
address: IMultilingualAddress;
|
|
525
|
+
bbox: IBbox;
|
|
526
|
+
buildings: IVenueInlineBuilding[];
|
|
527
|
+
businessStatus?: {
|
|
528
|
+
status: string;
|
|
529
|
+
};
|
|
530
|
+
country: string;
|
|
531
|
+
defaultBuilding?: string;
|
|
532
|
+
id: string;
|
|
533
|
+
labelCenter: ILocation;
|
|
534
|
+
name: IMultilingualName;
|
|
535
|
+
organization: string[];
|
|
536
|
+
owner: string;
|
|
537
|
+
publicData?: string[];
|
|
538
|
+
photos?: object[];
|
|
539
|
+
region: string;
|
|
540
|
+
restricted: boolean;
|
|
541
|
+
signalMap: boolean;
|
|
542
|
+
totalPhotoCount?: number;
|
|
543
|
+
type: string;
|
|
544
|
+
venueOutlineId: number;
|
|
545
|
+
visualMap: boolean;
|
|
546
|
+
}
|
|
547
|
+
export interface IResponseVenues {
|
|
548
|
+
venues: IVenue[];
|
|
549
|
+
total: number;
|
|
550
|
+
}
|
|
551
|
+
export type TPromiseVenues = AxiosPromise<IResponse<IResponseVenues>>;
|
|
552
|
+
export type Listener = (param: any) => any;
|
|
553
|
+
declare class Event$1 {
|
|
554
|
+
private _type;
|
|
555
|
+
private _target;
|
|
556
|
+
constructor(type: string, data?: Object);
|
|
557
|
+
get type(): string;
|
|
558
|
+
set type(type: string);
|
|
559
|
+
get target(): Evented;
|
|
560
|
+
set target(target: Evented);
|
|
561
|
+
}
|
|
562
|
+
/** MixedEvent class */
|
|
563
|
+
export declare class Evented {
|
|
564
|
+
private _listeners;
|
|
565
|
+
private _oneTimeListeners;
|
|
566
|
+
private _eventedParent;
|
|
567
|
+
private _eventedParentData;
|
|
568
|
+
/**
|
|
569
|
+
* @description Register a new event listener
|
|
570
|
+
* @param type name of the event(a unique string)
|
|
571
|
+
* @param listener event handler, it will be called when the event is fired
|
|
572
|
+
*/
|
|
573
|
+
on(type: string, listener: Listener): this;
|
|
574
|
+
/**
|
|
575
|
+
* @description Remove a registered event listener
|
|
576
|
+
* @param type name of the event
|
|
577
|
+
* @param listener event handler
|
|
578
|
+
*/
|
|
579
|
+
off(type: string, listener: Listener): this;
|
|
580
|
+
/**
|
|
581
|
+
* Adds a listener that will be called only once to a specified event type.
|
|
582
|
+
*
|
|
583
|
+
* The listener will be called first time the event fires after the listener is registered.
|
|
584
|
+
*
|
|
585
|
+
* @param {string} type The event type to listen for.
|
|
586
|
+
* @param {Function} listener The function to be called when the event is fired the first time.
|
|
587
|
+
* @returns {Object} `this`
|
|
588
|
+
*/
|
|
589
|
+
once(type: string, listener: Listener): this;
|
|
590
|
+
fire(event: Event$1): this;
|
|
591
|
+
/**
|
|
592
|
+
* Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
|
|
593
|
+
*
|
|
594
|
+
* @param {string} type The event type
|
|
595
|
+
* @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
|
|
596
|
+
* @private
|
|
597
|
+
*/
|
|
598
|
+
listens(type: string): boolean;
|
|
599
|
+
/**
|
|
600
|
+
* Bubble all events fired by this instance of Evented to this parent instance of Evented.
|
|
601
|
+
*
|
|
602
|
+
* @returns {Object} `this`
|
|
603
|
+
* @private
|
|
604
|
+
*/
|
|
605
|
+
setEventedParent(parent: Evented, data?: Object | (() => Object)): this;
|
|
606
|
+
}
|
|
607
|
+
export declare class Indoor extends Evented {
|
|
608
|
+
private _map;
|
|
609
|
+
private _features;
|
|
610
|
+
private _allBuildings;
|
|
190
611
|
private _curBuildingId;
|
|
191
612
|
private _curBuildingFeature;
|
|
192
613
|
private _ordinal;
|
|
@@ -216,8 +637,8 @@ export declare class Indoor extends Evented {
|
|
|
216
637
|
private _upperLevels;
|
|
217
638
|
private _lowerLevels;
|
|
218
639
|
private _history;
|
|
219
|
-
private _dragPan;
|
|
220
640
|
private _featureIncomplete;
|
|
641
|
+
private _isSwitchBuildingByClickMap;
|
|
221
642
|
constructor(props: {
|
|
222
643
|
map: MaplibreMap;
|
|
223
644
|
floorSwitchMode?: FloorSwitchMode;
|
|
@@ -317,8 +738,9 @@ export declare class Indoor extends Evented {
|
|
|
317
738
|
/**
|
|
318
739
|
* @description Switch floor by ordinal.
|
|
319
740
|
* @param ordinal
|
|
741
|
+
* @param dragPan
|
|
320
742
|
*/
|
|
321
|
-
switchFloorByOrdinal(ordinal: string | null): void;
|
|
743
|
+
switchFloorByOrdinal(ordinal: string | null, dragPan?: boolean): void;
|
|
322
744
|
/**
|
|
323
745
|
* @description Hide the outdoor layer.
|
|
324
746
|
* @deprecated Use 'setOutdoorMapShown' instead.
|
|
@@ -359,7 +781,6 @@ export declare class Indoor extends Evented {
|
|
|
359
781
|
*/
|
|
360
782
|
selectBuilding(feature: MapGeoJSONFeature | null, options?: {
|
|
361
783
|
floorId?: string;
|
|
362
|
-
dragPan?: boolean;
|
|
363
784
|
featureIncomplete?: boolean;
|
|
364
785
|
}): Promise<void>;
|
|
365
786
|
updateRendering(): void;
|
|
@@ -390,39 +811,6 @@ export declare class Indoor extends Evented {
|
|
|
390
811
|
private _checkAndPanToBuilding;
|
|
391
812
|
private _invisibleSelectedBuilding;
|
|
392
813
|
}
|
|
393
|
-
export interface IPoiEvent {
|
|
394
|
-
coordinate: LngLat;
|
|
395
|
-
poi: MapGeoJSONFeature;
|
|
396
|
-
building: MapGeoJSONFeature | null;
|
|
397
|
-
venue: MapGeoJSONFeature | null;
|
|
398
|
-
floor: IFloor;
|
|
399
|
-
}
|
|
400
|
-
export interface IPointEvent {
|
|
401
|
-
coordinate: LngLat;
|
|
402
|
-
point: PointLike;
|
|
403
|
-
}
|
|
404
|
-
export interface IMapClickEvent {
|
|
405
|
-
coordinate: LngLat;
|
|
406
|
-
building: MapGeoJSONFeature | null;
|
|
407
|
-
venue: MapGeoJSONFeature | null;
|
|
408
|
-
floor: IFloor;
|
|
409
|
-
}
|
|
410
|
-
export declare class SwitchOutdoorHandler {
|
|
411
|
-
private _indoor;
|
|
412
|
-
private _isEnabled;
|
|
413
|
-
constructor(indoor: Indoor);
|
|
414
|
-
enable(): void;
|
|
415
|
-
disable(): void;
|
|
416
|
-
get isEnabled(): boolean;
|
|
417
|
-
}
|
|
418
|
-
export declare class SwitchBuildingHandler {
|
|
419
|
-
private _indoor;
|
|
420
|
-
private _isEnabled;
|
|
421
|
-
constructor(indoor: Indoor);
|
|
422
|
-
enable(): void;
|
|
423
|
-
disable(): void;
|
|
424
|
-
get isEnabled(): boolean;
|
|
425
|
-
}
|
|
426
814
|
export declare class BuildingFilterControl implements IControl {
|
|
427
815
|
private _map;
|
|
428
816
|
private _maplibre;
|
|
@@ -477,22 +865,6 @@ export declare class BuildingFilterControl implements IControl {
|
|
|
477
865
|
private _$hideLayout;
|
|
478
866
|
private _updateBuildingListLayout;
|
|
479
867
|
}
|
|
480
|
-
export declare class BuildingSelectorHandler {
|
|
481
|
-
private _buildingSelector;
|
|
482
|
-
private _isEnabled;
|
|
483
|
-
private _position;
|
|
484
|
-
constructor(buildingSelector: BuildingFilterControl);
|
|
485
|
-
enable(): void;
|
|
486
|
-
disable(): void;
|
|
487
|
-
/**
|
|
488
|
-
* Set the position of the building selector control
|
|
489
|
-
* @param position
|
|
490
|
-
* @param index - The index of the control in the controls-container. Default at the last.
|
|
491
|
-
*/
|
|
492
|
-
setPosition(position: ControlPosition, index?: number): void;
|
|
493
|
-
get isEnabled(): boolean;
|
|
494
|
-
get position(): ControlPosition;
|
|
495
|
-
}
|
|
496
868
|
export interface IFloorSelectorOptions {
|
|
497
869
|
style?: IFloorSelectorStyle;
|
|
498
870
|
enabled?: boolean;
|
|
@@ -534,9 +906,8 @@ export declare class FloorsControl implements IControl {
|
|
|
534
906
|
/**
|
|
535
907
|
* @description Switch floor by ordinal
|
|
536
908
|
* @param ordinal
|
|
537
|
-
* @param callback - **@deprecated** The optional parameter **'callback' will be removed soon**.
|
|
538
909
|
*/
|
|
539
|
-
switchByOrdinal(ordinal: string
|
|
910
|
+
switchByOrdinal(ordinal: string): void;
|
|
540
911
|
/**
|
|
541
912
|
* @deprecated
|
|
542
913
|
* @param visible
|
|
@@ -549,6 +920,7 @@ export declare class FloorsControl implements IControl {
|
|
|
549
920
|
setPosition(position: ControlPosition): void;
|
|
550
921
|
changePosition(from: ControlPosition, to: ControlPosition, index?: number): void;
|
|
551
922
|
setStyle(style: Partial<IFloorSelectorStyle>): void;
|
|
923
|
+
setDragPan(dragPan: boolean | undefined): void;
|
|
552
924
|
private _setVisibility;
|
|
553
925
|
private _bindEvents;
|
|
554
926
|
private _addMapMoveEventListener;
|
|
@@ -572,6 +944,22 @@ export declare class FloorsControl implements IControl {
|
|
|
572
944
|
private _handleScroll;
|
|
573
945
|
private _expandSelector;
|
|
574
946
|
}
|
|
947
|
+
export declare class BuildingSelectorHandler {
|
|
948
|
+
private _buildingSelector;
|
|
949
|
+
private _isEnabled;
|
|
950
|
+
private _position;
|
|
951
|
+
constructor(buildingSelector: BuildingFilterControl);
|
|
952
|
+
enable(): void;
|
|
953
|
+
disable(): void;
|
|
954
|
+
/**
|
|
955
|
+
* Set the position of the building selector control
|
|
956
|
+
* @param position
|
|
957
|
+
* @param index - The index of the control in the controls-container. Default at the last.
|
|
958
|
+
*/
|
|
959
|
+
setPosition(position: ControlPosition, index?: number): void;
|
|
960
|
+
get isEnabled(): boolean;
|
|
961
|
+
get position(): ControlPosition;
|
|
962
|
+
}
|
|
575
963
|
export declare class FloorSelectorHandler {
|
|
576
964
|
private _floorSelector;
|
|
577
965
|
private _isEnabled;
|
|
@@ -589,6 +977,22 @@ export declare class FloorSelectorHandler {
|
|
|
589
977
|
get isEnabled(): boolean;
|
|
590
978
|
get position(): ControlPosition;
|
|
591
979
|
}
|
|
980
|
+
export declare class SwitchBuildingHandler {
|
|
981
|
+
private _indoor;
|
|
982
|
+
private _isEnabled;
|
|
983
|
+
constructor(indoor: Indoor);
|
|
984
|
+
enable(): void;
|
|
985
|
+
disable(): void;
|
|
986
|
+
get isEnabled(): boolean;
|
|
987
|
+
}
|
|
988
|
+
export declare class SwitchOutdoorHandler {
|
|
989
|
+
private _indoor;
|
|
990
|
+
private _isEnabled;
|
|
991
|
+
constructor(indoor: Indoor);
|
|
992
|
+
enable(): void;
|
|
993
|
+
disable(): void;
|
|
994
|
+
get isEnabled(): boolean;
|
|
995
|
+
}
|
|
592
996
|
declare class Map$1 extends Evented {
|
|
593
997
|
private _map;
|
|
594
998
|
private _indoor;
|
|
@@ -620,12 +1024,12 @@ declare class Map$1 extends Evented {
|
|
|
620
1024
|
/**
|
|
621
1025
|
* @description Get maplibre map instance.
|
|
622
1026
|
*/
|
|
623
|
-
getMaplibre():
|
|
1027
|
+
getMaplibre(): maplibregl$1.Map;
|
|
624
1028
|
/**
|
|
625
1029
|
* @description Get maplibre map instance.
|
|
626
1030
|
* @deprecated Use 'getMaplibre' instead.
|
|
627
1031
|
*/
|
|
628
|
-
getMap():
|
|
1032
|
+
getMap(): maplibregl$1.Map;
|
|
629
1033
|
/**
|
|
630
1034
|
* @description Get current selected floor info.
|
|
631
1035
|
* @return {IFloor | null}
|
|
@@ -716,7 +1120,8 @@ declare class Map$1 extends Evented {
|
|
|
716
1120
|
/**
|
|
717
1121
|
* @description Select floor by id.
|
|
718
1122
|
* @param floorId
|
|
719
|
-
* @param options
|
|
1123
|
+
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1124
|
+
* Default is true.
|
|
720
1125
|
*/
|
|
721
1126
|
selectFloorById(floorId: string, options?: {
|
|
722
1127
|
dragPan?: boolean;
|
|
@@ -724,7 +1129,8 @@ declare class Map$1 extends Evented {
|
|
|
724
1129
|
/**
|
|
725
1130
|
* @description Select building by id.
|
|
726
1131
|
* @param buildingId
|
|
727
|
-
* @param options
|
|
1132
|
+
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1133
|
+
* Default is true.
|
|
728
1134
|
*/
|
|
729
1135
|
selectBuildingById(buildingId: string, options?: {
|
|
730
1136
|
dragPan?: boolean;
|
|
@@ -732,7 +1138,8 @@ declare class Map$1 extends Evented {
|
|
|
732
1138
|
/**
|
|
733
1139
|
* @description Select or exit venue by id.
|
|
734
1140
|
* @param venueId 'venueId' can be string or null. Exit indoors if venueId is null.
|
|
735
|
-
* @param options
|
|
1141
|
+
* @param options {dragPan: boolean} Set dragPan to be false, the map will not pan to the building center.
|
|
1142
|
+
* Default is true.
|
|
736
1143
|
*/
|
|
737
1144
|
selectVenueById(venueId: string | null, options?: {
|
|
738
1145
|
dragPan?: boolean;
|
|
@@ -815,19 +1222,6 @@ declare class Map$1 extends Evented {
|
|
|
815
1222
|
private _updatePermission;
|
|
816
1223
|
private _panToBuilding;
|
|
817
1224
|
}
|
|
818
|
-
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
819
|
-
export interface IMarkerOptions {
|
|
820
|
-
lngLat: [
|
|
821
|
-
number,
|
|
822
|
-
number
|
|
823
|
-
];
|
|
824
|
-
properties?: {
|
|
825
|
-
[k: string]: string;
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
export interface IMarkerOptionsWithFeatureId extends IMarkerOptions {
|
|
829
|
-
featureId: number;
|
|
830
|
-
}
|
|
831
1225
|
export declare class Marker {
|
|
832
1226
|
private readonly _maplibreMap;
|
|
833
1227
|
private readonly _layerId;
|
|
@@ -949,404 +1343,204 @@ export declare class Marker {
|
|
|
949
1343
|
* @param buildingId {string | null | undefined} null | undefined will be treated as ''.
|
|
950
1344
|
* @param ordinal {string | null | undefined} null | undefined will be treated as ''.
|
|
951
1345
|
*/
|
|
952
|
-
setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
953
|
-
private _createIconFeature;
|
|
954
|
-
private _addIconSource;
|
|
955
|
-
private _addIconLayer;
|
|
956
|
-
private _handleEventListener;
|
|
957
|
-
}
|
|
958
|
-
export declare class Poi {
|
|
959
|
-
private _map;
|
|
960
|
-
private _layerIds;
|
|
961
|
-
private _dispatch;
|
|
962
|
-
constructor(map: MaplibreMap);
|
|
963
|
-
/**
|
|
964
|
-
* @description Listen for POI click events.
|
|
965
|
-
* @param listener
|
|
966
|
-
*/
|
|
967
|
-
onPoiClick(listener: (param: IPoiEvent) => void): {
|
|
968
|
-
unsubscribe: VoidFunction;
|
|
969
|
-
};
|
|
970
|
-
private _bindEvents;
|
|
971
|
-
private _init;
|
|
972
|
-
private _initPoiClick;
|
|
973
|
-
private _getFloorDataByFloorId;
|
|
974
|
-
}
|
|
975
|
-
export interface IMultilingualName extends Partial<Record<PresetLanguage, string>> {
|
|
976
|
-
default: string;
|
|
977
|
-
}
|
|
978
|
-
export type IMultilingualAddress = Record<keyof IMultilingualName, {
|
|
979
|
-
housenumber: string;
|
|
980
|
-
street: string;
|
|
981
|
-
}>;
|
|
982
|
-
export interface ILocation {
|
|
983
|
-
lat: number;
|
|
984
|
-
lon: number;
|
|
985
|
-
}
|
|
986
|
-
export interface IBbox {
|
|
987
|
-
maxLat: number;
|
|
988
|
-
maxLon: number;
|
|
989
|
-
minLat: number;
|
|
990
|
-
minLon: number;
|
|
991
|
-
}
|
|
992
|
-
export interface IResponse<T> {
|
|
993
|
-
code: number;
|
|
994
|
-
message: string;
|
|
995
|
-
result: T;
|
|
996
|
-
}
|
|
997
|
-
export interface IBuildingInlineFloor {
|
|
998
|
-
code: string;
|
|
999
|
-
id: string;
|
|
1000
|
-
ordinal: number;
|
|
1001
|
-
signalMap: boolean;
|
|
1002
|
-
visualMap: boolean;
|
|
1003
|
-
}
|
|
1004
|
-
export interface IBuilding {
|
|
1005
|
-
address: IMultilingualAddress;
|
|
1006
|
-
bbox: IBbox;
|
|
1007
|
-
buildingId: string;
|
|
1008
|
-
buildingOutlineId: number;
|
|
1009
|
-
city?: string;
|
|
1010
|
-
country: string;
|
|
1011
|
-
defaultFloor?: string;
|
|
1012
|
-
floors: IBuildingInlineFloor[];
|
|
1013
|
-
groundFloor: string;
|
|
1014
|
-
isPrivate: "yes" | "no";
|
|
1015
|
-
labelCenter: ILocation;
|
|
1016
|
-
name: IMultilingualName;
|
|
1017
|
-
organization: string;
|
|
1018
|
-
region: string;
|
|
1019
|
-
signalMap: boolean;
|
|
1020
|
-
type: string;
|
|
1021
|
-
venueId: string;
|
|
1022
|
-
venueName: IMultilingualName;
|
|
1023
|
-
visualMap: boolean;
|
|
1024
|
-
}
|
|
1025
|
-
export interface IResponseBuildings {
|
|
1026
|
-
buildings: IBuilding[];
|
|
1027
|
-
total: number;
|
|
1028
|
-
}
|
|
1029
|
-
export type TPromiseBuildings = AxiosPromise<IResponse<IResponseBuildings>>;
|
|
1030
|
-
export interface IVenueInlineBuilding {
|
|
1031
|
-
buildingOutlineId: number;
|
|
1032
|
-
defaultFloor?: string;
|
|
1033
|
-
floors: IBuildingInlineFloor[];
|
|
1034
|
-
id: string;
|
|
1035
|
-
labelCenter: ILocation;
|
|
1036
|
-
name: IMultilingualName;
|
|
1037
|
-
point: {
|
|
1038
|
-
type: string;
|
|
1039
|
-
coordinates: [
|
|
1040
|
-
number,
|
|
1041
|
-
number
|
|
1042
|
-
];
|
|
1043
|
-
};
|
|
1044
|
-
signalMap: boolean;
|
|
1045
|
-
visualMap: boolean;
|
|
1046
|
-
}
|
|
1047
|
-
export interface IVenue {
|
|
1048
|
-
address: IMultilingualAddress;
|
|
1049
|
-
bbox: IBbox;
|
|
1050
|
-
buildings: IVenueInlineBuilding[];
|
|
1051
|
-
businessStatus?: {
|
|
1052
|
-
status: string;
|
|
1053
|
-
};
|
|
1054
|
-
country: string;
|
|
1055
|
-
defaultBuilding?: string;
|
|
1056
|
-
id: string;
|
|
1057
|
-
labelCenter: ILocation;
|
|
1058
|
-
name: IMultilingualName;
|
|
1059
|
-
organization: string[];
|
|
1060
|
-
owner: string;
|
|
1061
|
-
publicData?: string[];
|
|
1062
|
-
photos?: object[];
|
|
1063
|
-
region: string;
|
|
1064
|
-
restricted: boolean;
|
|
1065
|
-
signalMap: boolean;
|
|
1066
|
-
totalPhotoCount?: number;
|
|
1067
|
-
type: string;
|
|
1068
|
-
venueOutlineId: number;
|
|
1069
|
-
visualMap: boolean;
|
|
1070
|
-
}
|
|
1071
|
-
export interface IResponseVenues {
|
|
1072
|
-
venues: IVenue[];
|
|
1073
|
-
total: number;
|
|
1074
|
-
}
|
|
1075
|
-
export type TPromiseVenues = AxiosPromise<IResponse<IResponseVenues>>;
|
|
1076
|
-
export declare class VenuesService {
|
|
1077
|
-
private _api;
|
|
1078
|
-
private _request;
|
|
1079
|
-
constructor();
|
|
1080
|
-
/**
|
|
1081
|
-
* @description Search venues by ids.
|
|
1082
|
-
* @param ids The number of IDs cannot exceed 10.
|
|
1083
|
-
*/
|
|
1084
|
-
searchByIds(ids: string | string[]): TPromiseVenues;
|
|
1085
|
-
/**
|
|
1086
|
-
* @description Search venues by center and distance.
|
|
1087
|
-
* @param keywords
|
|
1088
|
-
* @param center
|
|
1089
|
-
* @param distance Radius from center, unit is kilometers.
|
|
1090
|
-
* @param offset The maximum value is 100, default is 10.
|
|
1091
|
-
* @param page Default is 1.
|
|
1092
|
-
*/
|
|
1093
|
-
searchByDistance(keywords: string, center: [
|
|
1094
|
-
number,
|
|
1095
|
-
number
|
|
1096
|
-
], distance: number, offset?: number, page?: number): TPromiseVenues;
|
|
1097
|
-
/**
|
|
1098
|
-
* @description Search venues in specified bbox.
|
|
1099
|
-
* @param keywords
|
|
1100
|
-
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
1101
|
-
* @param offset The maximum value is 100, default is 10.
|
|
1102
|
-
* @param page Default is 1.
|
|
1103
|
-
*/
|
|
1104
|
-
searchByBbox(keywords: string, bbox: [
|
|
1105
|
-
number,
|
|
1106
|
-
number,
|
|
1107
|
-
number,
|
|
1108
|
-
number
|
|
1109
|
-
], offset?: number, page?: number): TPromiseVenues;
|
|
1346
|
+
setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1347
|
+
private _createIconFeature;
|
|
1348
|
+
private _addIconSource;
|
|
1349
|
+
private _addIconLayer;
|
|
1350
|
+
private _handleEventListener;
|
|
1351
|
+
}
|
|
1352
|
+
export declare class Poi {
|
|
1353
|
+
private _map;
|
|
1354
|
+
private _layerIds;
|
|
1355
|
+
private _dispatch;
|
|
1356
|
+
constructor(map: MaplibreMap);
|
|
1110
1357
|
/**
|
|
1111
|
-
* @description
|
|
1112
|
-
* @param
|
|
1113
|
-
* @param offset The maximum value is 100, default is 10.
|
|
1114
|
-
* @param page Default is 1.
|
|
1358
|
+
* @description Listen for POI click events.
|
|
1359
|
+
* @param listener
|
|
1115
1360
|
*/
|
|
1116
|
-
|
|
1117
|
-
|
|
1361
|
+
onPoiClick(listener: (param: IPoiEvent) => void): {
|
|
1362
|
+
unsubscribe: VoidFunction;
|
|
1363
|
+
};
|
|
1364
|
+
private _bindEvents;
|
|
1365
|
+
private _init;
|
|
1366
|
+
private _initPoiClick;
|
|
1367
|
+
private _getFloorDataByFloorId;
|
|
1118
1368
|
}
|
|
1119
|
-
export declare class
|
|
1120
|
-
private
|
|
1121
|
-
private
|
|
1122
|
-
|
|
1369
|
+
export declare class RoutePainter {
|
|
1370
|
+
private readonly _maplibreMap;
|
|
1371
|
+
private _fromMarkerIcon;
|
|
1372
|
+
private _toMarkerIcon;
|
|
1373
|
+
private _stopMarkerIcons;
|
|
1374
|
+
private _markerIconSize;
|
|
1375
|
+
private _paintProperties;
|
|
1376
|
+
constructor(maplibreMap: MaplibreMap);
|
|
1123
1377
|
/**
|
|
1124
|
-
* @description
|
|
1125
|
-
* @param
|
|
1378
|
+
* @description Set image[s] of the stop marker[s].
|
|
1379
|
+
* @param icons {**Array<string | null> | {from?: string | null; to?: string | null; stops?: Array<string | null> | null;}**}
|
|
1380
|
+
* Array of sprite names or URLs, or the object with specifying icon.
|
|
1381
|
+
* Markers use images in order of icons array.
|
|
1382
|
+
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
1383
|
+
* If icons array has only one element, all stop markers use this image.
|
|
1384
|
+
* Image file must be in png, webp, or jpg format.
|
|
1385
|
+
* Null means none image.
|
|
1126
1386
|
*/
|
|
1127
|
-
|
|
1387
|
+
setMarkerIcons(icons: Array<string | null> | {
|
|
1388
|
+
from?: string | null;
|
|
1389
|
+
to?: string | null;
|
|
1390
|
+
stops?: Array<string | null> | null;
|
|
1391
|
+
}): Promise<void>;
|
|
1128
1392
|
/**
|
|
1129
|
-
* @description
|
|
1130
|
-
* @param
|
|
1131
|
-
* @param center
|
|
1132
|
-
* @param distance Radius from center, unit is kilometers.
|
|
1133
|
-
* @param offset The maximum value is 100, default is 10.
|
|
1134
|
-
* @param page Default is 1.
|
|
1393
|
+
* @description Set image icon scale.
|
|
1394
|
+
* @param size Default is 1.
|
|
1135
1395
|
*/
|
|
1136
|
-
|
|
1396
|
+
setMarkerIconSize(size: number): this;
|
|
1137
1397
|
/**
|
|
1138
|
-
* @description
|
|
1139
|
-
* @param
|
|
1140
|
-
*
|
|
1141
|
-
*
|
|
1142
|
-
* @param page Default is 1.
|
|
1398
|
+
* @description Set the route color of the indoor part.
|
|
1399
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1400
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1401
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1143
1402
|
*/
|
|
1144
|
-
|
|
1403
|
+
setIndoorLineColor(color: string): this;
|
|
1145
1404
|
/**
|
|
1146
|
-
* @description
|
|
1147
|
-
* @param
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1405
|
+
* @description Set the route color of the outdoor part.
|
|
1406
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1407
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1408
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1150
1409
|
*/
|
|
1151
|
-
|
|
1410
|
+
setOutdoorLineColor(color: string): this;
|
|
1152
1411
|
/**
|
|
1153
|
-
* @description
|
|
1154
|
-
* @param
|
|
1412
|
+
* @description Set color of dashed lines which connected the start and end markers.
|
|
1413
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1414
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1415
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1155
1416
|
*/
|
|
1156
|
-
|
|
1157
|
-
private _changedRes;
|
|
1158
|
-
}
|
|
1159
|
-
export interface IPoi {
|
|
1160
|
-
accessibilityDetail: IMultilingualName;
|
|
1161
|
-
buildingId: string;
|
|
1162
|
-
category: string[];
|
|
1163
|
-
distance: number;
|
|
1164
|
-
floor: string;
|
|
1165
|
-
floorId: string;
|
|
1166
|
-
id: string;
|
|
1167
|
-
location: ILocation;
|
|
1168
|
-
name: IMultilingualName;
|
|
1169
|
-
osmRefId: number;
|
|
1170
|
-
poiId: string;
|
|
1171
|
-
venueId: string;
|
|
1172
|
-
/** @deprecated 'description' will be removed soon */
|
|
1173
|
-
description?: string;
|
|
1174
|
-
descriptions?: IMultilingualName;
|
|
1175
|
-
email?: string;
|
|
1176
|
-
openingHours?: string;
|
|
1177
|
-
phone?: string;
|
|
1178
|
-
website?: string;
|
|
1179
|
-
}
|
|
1180
|
-
export interface IResponsePois {
|
|
1181
|
-
pois: IPoi[];
|
|
1182
|
-
total: number;
|
|
1183
|
-
}
|
|
1184
|
-
export type TPromisePois = AxiosPromise<IResponse<IResponsePois>>;
|
|
1185
|
-
export type TPromiseCategories = AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
1186
|
-
export type TPromiseOrientationPois = AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
1187
|
-
export declare enum DistanceSearchType {
|
|
1188
|
-
POINT = "Point",
|
|
1189
|
-
POLYGON = "Polygon",
|
|
1190
|
-
GATE = "Gate"
|
|
1191
|
-
}
|
|
1192
|
-
export interface IPoiCategory {
|
|
1193
|
-
category: string;
|
|
1194
|
-
description: string | null;
|
|
1195
|
-
id: string;
|
|
1196
|
-
title: Partial<Record<keyof IMultilingualName, string>>;
|
|
1197
|
-
}
|
|
1198
|
-
export interface IOrientationPoi {
|
|
1199
|
-
angle: number;
|
|
1200
|
-
buildingId: string;
|
|
1201
|
-
category: string[];
|
|
1202
|
-
distance: number;
|
|
1203
|
-
distanceSource: string;
|
|
1204
|
-
floor: string;
|
|
1205
|
-
floorId: string;
|
|
1206
|
-
id: string;
|
|
1207
|
-
location: ILocation;
|
|
1208
|
-
name: IMultilingualName;
|
|
1209
|
-
osmRefId: number;
|
|
1210
|
-
poiId: string;
|
|
1211
|
-
description?: string;
|
|
1212
|
-
email?: string;
|
|
1213
|
-
openingHours?: string;
|
|
1214
|
-
phone?: string;
|
|
1215
|
-
website?: string;
|
|
1216
|
-
}
|
|
1217
|
-
export interface ISearchDistance {
|
|
1417
|
+
setDashedLineColor(color: string): this;
|
|
1218
1418
|
/**
|
|
1219
|
-
*
|
|
1419
|
+
* @description Set color of shuttle bus line.
|
|
1420
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1421
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1422
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1220
1423
|
*/
|
|
1221
|
-
|
|
1424
|
+
setBusLineColor(color: string): this;
|
|
1425
|
+
/**
|
|
1426
|
+
* @description Render route on the map.
|
|
1427
|
+
* @param path Route path from RouteService.search response.
|
|
1428
|
+
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
1429
|
+
*/
|
|
1430
|
+
render(path: IRoutePath, markerLocations: Array<[
|
|
1222
1431
|
number,
|
|
1223
1432
|
number
|
|
1224
|
-
];
|
|
1433
|
+
]>): void;
|
|
1225
1434
|
/**
|
|
1226
|
-
*
|
|
1435
|
+
* @description Remove route from the map.
|
|
1227
1436
|
*/
|
|
1228
|
-
|
|
1437
|
+
remove(): void;
|
|
1229
1438
|
/**
|
|
1230
|
-
*
|
|
1439
|
+
* @description Filter paths' opacity by venue and ordinal.
|
|
1440
|
+
* @param venueId {string | null | undefined}
|
|
1441
|
+
* @param ordinal {string | null | undefined}
|
|
1231
1442
|
*/
|
|
1232
|
-
|
|
1443
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1233
1444
|
/**
|
|
1234
|
-
*
|
|
1445
|
+
* @description Filter paths' opacity by building and ordinal.
|
|
1446
|
+
* @param buildingId {string | null | undefined}
|
|
1447
|
+
* @param ordinal {string | null | undefined}
|
|
1235
1448
|
*/
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1449
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1450
|
+
private _classifyFeatures;
|
|
1451
|
+
private _createLineFeature;
|
|
1452
|
+
private _createIconFeature;
|
|
1453
|
+
private _renderSolidLines;
|
|
1454
|
+
private _renderDashedLines;
|
|
1455
|
+
private _renderConnectors;
|
|
1456
|
+
private _renderMarkers;
|
|
1457
|
+
private _addCollectionSource;
|
|
1458
|
+
private _addLineLayer;
|
|
1459
|
+
private _addTriangleLayer;
|
|
1460
|
+
private _addIconLayer;
|
|
1243
1461
|
}
|
|
1244
|
-
export
|
|
1245
|
-
|
|
1462
|
+
export declare class VenuesService {
|
|
1463
|
+
private _api;
|
|
1464
|
+
private _request;
|
|
1465
|
+
constructor();
|
|
1246
1466
|
/**
|
|
1247
|
-
*
|
|
1467
|
+
* @description Search venues by ids.
|
|
1468
|
+
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
|
|
1248
1469
|
*/
|
|
1249
|
-
|
|
1250
|
-
}
|
|
1251
|
-
export interface ISearchOrientation {
|
|
1470
|
+
searchByIds(ids: string | string[]): TPromiseVenues;
|
|
1252
1471
|
/**
|
|
1253
|
-
*
|
|
1472
|
+
* @description Search venues by center and distance.
|
|
1473
|
+
* @param keywords
|
|
1474
|
+
* @param center
|
|
1475
|
+
* @param distance Radius from center, unit is kilometers.
|
|
1476
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1477
|
+
* @param page Default is 1.
|
|
1254
1478
|
*/
|
|
1255
|
-
center: [
|
|
1479
|
+
searchByDistance(keywords: string, center: [
|
|
1256
1480
|
number,
|
|
1257
1481
|
number
|
|
1258
|
-
];
|
|
1259
|
-
/**
|
|
1260
|
-
* The angle between the user's orientation and true north.
|
|
1261
|
-
*/
|
|
1262
|
-
angle: number;
|
|
1263
|
-
/**
|
|
1264
|
-
* The radius with 'center' as the center of the circle.
|
|
1265
|
-
*/
|
|
1266
|
-
distance: number;
|
|
1267
|
-
/**
|
|
1268
|
-
* The type of POI, default is 'Point'.
|
|
1269
|
-
*/
|
|
1270
|
-
distanceSearchType?: DistanceSearchType;
|
|
1271
|
-
}
|
|
1272
|
-
export interface IPoiSearchByOrientationAndBuildingOptions extends ISearchOrientation {
|
|
1273
|
-
buildingId: string;
|
|
1274
|
-
}
|
|
1275
|
-
export interface IPoiSearchByOrientationAndFloorOptions extends ISearchOrientation {
|
|
1276
|
-
floorId: string;
|
|
1277
|
-
}
|
|
1278
|
-
export interface IPoiSearchByOrientationAndOrdinalOptions extends ISearchOrientation {
|
|
1279
|
-
ordinal: string;
|
|
1280
|
-
}
|
|
1281
|
-
export type TPoiSearchByOrientationOptions = IPoiSearchByOrientationAndBuildingOptions | IPoiSearchByOrientationAndFloorOptions | IPoiSearchByOrientationAndOrdinalOptions;
|
|
1282
|
-
export interface IPoiSearchOrientationOptions {
|
|
1482
|
+
], distance: number, offset?: number, page?: number): TPromiseVenues;
|
|
1283
1483
|
/**
|
|
1284
|
-
*
|
|
1484
|
+
* @description Search venues in specified bbox.
|
|
1485
|
+
* @param keywords
|
|
1486
|
+
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
1487
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1488
|
+
* @param page Default is 1.
|
|
1285
1489
|
*/
|
|
1286
|
-
|
|
1490
|
+
searchByBbox(keywords: string, bbox: [
|
|
1491
|
+
number,
|
|
1492
|
+
number,
|
|
1287
1493
|
number,
|
|
1288
1494
|
number
|
|
1289
|
-
];
|
|
1290
|
-
/**
|
|
1291
|
-
* The angle between cellphone's orientation and the north.
|
|
1292
|
-
*/
|
|
1293
|
-
angle: number;
|
|
1495
|
+
], offset?: number, page?: number): TPromiseVenues;
|
|
1294
1496
|
/**
|
|
1295
|
-
*
|
|
1497
|
+
* @description Search venues by global.
|
|
1498
|
+
* @param keywords
|
|
1499
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1500
|
+
* @param page Default is 1.
|
|
1296
1501
|
*/
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1502
|
+
searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseVenues;
|
|
1503
|
+
private _changedRes;
|
|
1504
|
+
}
|
|
1505
|
+
export declare class BuildingsService {
|
|
1506
|
+
private _api;
|
|
1507
|
+
private _request;
|
|
1508
|
+
constructor();
|
|
1300
1509
|
/**
|
|
1301
|
-
*
|
|
1510
|
+
* @description Search buildings by id[s].
|
|
1511
|
+
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 10.
|
|
1302
1512
|
*/
|
|
1303
|
-
|
|
1513
|
+
searchByIds(ids: string | string[]): TPromiseBuildings;
|
|
1304
1514
|
/**
|
|
1305
|
-
* Search
|
|
1515
|
+
* @description Search buildings by center and distance.
|
|
1516
|
+
* @param keywords
|
|
1517
|
+
* @param center
|
|
1518
|
+
* @param distance Radius from center, unit is kilometers.
|
|
1519
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1520
|
+
* @param page Default is 1.
|
|
1306
1521
|
*/
|
|
1307
|
-
|
|
1308
|
-
}
|
|
1309
|
-
export declare enum PoisOrderBy {
|
|
1310
|
-
DEFAULT_NAME = "DefaultName"
|
|
1311
|
-
}
|
|
1312
|
-
export interface ISearchKeywords {
|
|
1313
|
-
keywords?: string;
|
|
1522
|
+
searchByDistance(keywords: string, center: number[], distance: number, offset?: number, page?: number): TPromiseBuildings;
|
|
1314
1523
|
/**
|
|
1315
|
-
*
|
|
1524
|
+
* @description Search buildings in specified bbox.
|
|
1525
|
+
* @param keywords
|
|
1526
|
+
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
1527
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1528
|
+
* @param page Default is 1.
|
|
1316
1529
|
*/
|
|
1317
|
-
offset?: number;
|
|
1530
|
+
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): TPromiseBuildings;
|
|
1318
1531
|
/**
|
|
1319
|
-
*
|
|
1532
|
+
* @description Search buildings global.
|
|
1533
|
+
* @param keywords
|
|
1534
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1535
|
+
* @param page Default is 1.
|
|
1320
1536
|
*/
|
|
1321
|
-
page?: number;
|
|
1322
|
-
}
|
|
1323
|
-
export interface IPoiSearchByBuildingOptions extends ISearchKeywords {
|
|
1324
|
-
buildingId: string;
|
|
1325
|
-
orderBy?: PoisOrderBy;
|
|
1326
|
-
}
|
|
1327
|
-
export interface IPoiSearchByVenueOptions extends ISearchKeywords {
|
|
1328
|
-
venueId: string;
|
|
1329
|
-
orderBy?: PoisOrderBy;
|
|
1330
|
-
}
|
|
1331
|
-
export interface IPoiSearchByFloorOptions extends ISearchKeywords {
|
|
1332
|
-
floorId: string;
|
|
1333
|
-
orderBy?: PoisOrderBy;
|
|
1334
|
-
}
|
|
1335
|
-
export interface IPoiSearchByBoundsOptions extends ISearchKeywords {
|
|
1537
|
+
searchByGlobal(keywords: string, offset?: number, page?: number): TPromiseBuildings;
|
|
1336
1538
|
/**
|
|
1337
|
-
*
|
|
1539
|
+
* @description Search building by floor id.
|
|
1540
|
+
* @param floorId
|
|
1338
1541
|
*/
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
number,
|
|
1342
|
-
number
|
|
1343
|
-
],
|
|
1344
|
-
[
|
|
1345
|
-
number,
|
|
1346
|
-
number
|
|
1347
|
-
]
|
|
1348
|
-
];
|
|
1349
|
-
orderBy?: PoisOrderBy;
|
|
1542
|
+
searchByFloorId(floorId: string): TPromiseBuildings;
|
|
1543
|
+
private _changedRes;
|
|
1350
1544
|
}
|
|
1351
1545
|
export declare class PoisService {
|
|
1352
1546
|
private _api;
|
|
@@ -1356,7 +1550,7 @@ export declare class PoisService {
|
|
|
1356
1550
|
constructor();
|
|
1357
1551
|
/**
|
|
1358
1552
|
* @description Search POIs by id[s].
|
|
1359
|
-
* @param ids Single id string or
|
|
1553
|
+
* @param ids Single id string or string ids in array. The number of IDs cannot exceed 100.
|
|
1360
1554
|
*/
|
|
1361
1555
|
searchByIds(ids: string | string[]): TPromisePois;
|
|
1362
1556
|
/**
|
|
@@ -1444,88 +1638,6 @@ export declare class PoisService {
|
|
|
1444
1638
|
searchByCategory(options: TPoiSearchByCategoryOptions): TPromisePois;
|
|
1445
1639
|
private _changedRes;
|
|
1446
1640
|
}
|
|
1447
|
-
export declare enum VehicleType {
|
|
1448
|
-
FOOT = "foot",
|
|
1449
|
-
WHEELCHAIR = "wheelchair",
|
|
1450
|
-
ESCALATOR = "escalator",
|
|
1451
|
-
EMERGENCY = "emergency"
|
|
1452
|
-
}
|
|
1453
|
-
export interface IRouteInfo {
|
|
1454
|
-
copyrights: string[];
|
|
1455
|
-
took: number;
|
|
1456
|
-
}
|
|
1457
|
-
export interface IInstruction {
|
|
1458
|
-
building_id: string;
|
|
1459
|
-
distance: number;
|
|
1460
|
-
floor_id: string;
|
|
1461
|
-
heading: number;
|
|
1462
|
-
interval: [
|
|
1463
|
-
number,
|
|
1464
|
-
number
|
|
1465
|
-
];
|
|
1466
|
-
ordinal: number;
|
|
1467
|
-
sign: number;
|
|
1468
|
-
street_name: string;
|
|
1469
|
-
text: string;
|
|
1470
|
-
time: number;
|
|
1471
|
-
type: string | null;
|
|
1472
|
-
venue_id: string;
|
|
1473
|
-
}
|
|
1474
|
-
export interface IRoutePath {
|
|
1475
|
-
bbox: [
|
|
1476
|
-
number,
|
|
1477
|
-
number,
|
|
1478
|
-
number,
|
|
1479
|
-
number
|
|
1480
|
-
];
|
|
1481
|
-
distance: number;
|
|
1482
|
-
instructions: IInstruction[];
|
|
1483
|
-
points: {
|
|
1484
|
-
coordinates: Array<[
|
|
1485
|
-
number,
|
|
1486
|
-
number
|
|
1487
|
-
]>;
|
|
1488
|
-
type: string;
|
|
1489
|
-
};
|
|
1490
|
-
snapped_waypoints: {
|
|
1491
|
-
coordinates: Array<[
|
|
1492
|
-
number,
|
|
1493
|
-
number
|
|
1494
|
-
]>;
|
|
1495
|
-
type: string;
|
|
1496
|
-
};
|
|
1497
|
-
time: number;
|
|
1498
|
-
}
|
|
1499
|
-
export interface IResponseRoute {
|
|
1500
|
-
infos: IRouteInfo | null;
|
|
1501
|
-
paths: IRoutePath[];
|
|
1502
|
-
}
|
|
1503
|
-
export type TPromiseRoute = AxiosPromise<IResponse<IResponseRoute>>;
|
|
1504
|
-
export interface IRouteSearchOptions {
|
|
1505
|
-
/**
|
|
1506
|
-
* @description Points are in order, from -> stops -> to.
|
|
1507
|
-
* The length of points must be: 1 < {points.length} < 6.
|
|
1508
|
-
*/
|
|
1509
|
-
points: Array<{
|
|
1510
|
-
lat: number;
|
|
1511
|
-
lon: number;
|
|
1512
|
-
buildingId?: string;
|
|
1513
|
-
floorId?: string;
|
|
1514
|
-
}>;
|
|
1515
|
-
/**
|
|
1516
|
-
* @description Default is "foot".
|
|
1517
|
-
*/
|
|
1518
|
-
vehicle?: VehicleType;
|
|
1519
|
-
/**
|
|
1520
|
-
* @description Language-specific response. Default is "en".
|
|
1521
|
-
*/
|
|
1522
|
-
locale?: PresetLanguage;
|
|
1523
|
-
/**
|
|
1524
|
-
* @description Whether the end point of the route is at the door(otherwise in the room), default is "true".
|
|
1525
|
-
* @deprecated
|
|
1526
|
-
*/
|
|
1527
|
-
toDoor?: boolean;
|
|
1528
|
-
}
|
|
1529
1641
|
export declare class RouteService {
|
|
1530
1642
|
private _api;
|
|
1531
1643
|
private _request;
|
|
@@ -1536,97 +1648,6 @@ export declare class RouteService {
|
|
|
1536
1648
|
*/
|
|
1537
1649
|
search(options: IRouteSearchOptions): TPromiseRoute;
|
|
1538
1650
|
}
|
|
1539
|
-
export declare class RoutePainter {
|
|
1540
|
-
private readonly _maplibreMap;
|
|
1541
|
-
private _fromMarkerIcon;
|
|
1542
|
-
private _toMarkerIcon;
|
|
1543
|
-
private _stopMarkerIcons;
|
|
1544
|
-
private _markerIconSize;
|
|
1545
|
-
private _paintProperties;
|
|
1546
|
-
constructor(maplibreMap: MaplibreMap);
|
|
1547
|
-
/**
|
|
1548
|
-
* @description Set image[s] of the stop marker[s].
|
|
1549
|
-
* @param icons Array of sprite names or URLs, or the object with specifying icon.
|
|
1550
|
-
* Markers use images in order of icons array.
|
|
1551
|
-
* First is as from-marker, last is as to-marker, the middles are as stop-markers.
|
|
1552
|
-
* If icons array has only one element, all stop markers use this image.
|
|
1553
|
-
* Image file must be in png, webp, or jpg format.
|
|
1554
|
-
*/
|
|
1555
|
-
setMarkerIcons(icons: string[] | {
|
|
1556
|
-
from?: string;
|
|
1557
|
-
to?: string;
|
|
1558
|
-
stops?: string[];
|
|
1559
|
-
}): Promise<void>;
|
|
1560
|
-
/**
|
|
1561
|
-
* @description Set image icon scale.
|
|
1562
|
-
* @param size Default is 1.
|
|
1563
|
-
*/
|
|
1564
|
-
setMarkerIconSize(size: number): this;
|
|
1565
|
-
/**
|
|
1566
|
-
* @description Set the route color of the indoor part.
|
|
1567
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1568
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1569
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1570
|
-
*/
|
|
1571
|
-
setIndoorLineColor(color: string): this;
|
|
1572
|
-
/**
|
|
1573
|
-
* @description Set the route color of the outdoor part.
|
|
1574
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1575
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1576
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1577
|
-
*/
|
|
1578
|
-
setOutdoorLineColor(color: string): this;
|
|
1579
|
-
/**
|
|
1580
|
-
* @description Set color of dashed lines which connected the start and end markers.
|
|
1581
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1582
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1583
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1584
|
-
*/
|
|
1585
|
-
setDashedLineColor(color: string): this;
|
|
1586
|
-
/**
|
|
1587
|
-
* @description Set color of shuttle bus line.
|
|
1588
|
-
* @param color The color type is a color in the sRGB color space.
|
|
1589
|
-
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1590
|
-
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1591
|
-
*/
|
|
1592
|
-
setBusLineColor(color: string): this;
|
|
1593
|
-
/**
|
|
1594
|
-
* @description Render route on the map.
|
|
1595
|
-
* @param path Route path from RouteService.search response.
|
|
1596
|
-
* @param markerLocations Coordinate([lng, lat]) array of markers, order from beginning to end.
|
|
1597
|
-
*/
|
|
1598
|
-
render(path: IRoutePath, markerLocations: Array<[
|
|
1599
|
-
number,
|
|
1600
|
-
number
|
|
1601
|
-
]>): void;
|
|
1602
|
-
/**
|
|
1603
|
-
* @description Remove route from the map.
|
|
1604
|
-
*/
|
|
1605
|
-
remove(): void;
|
|
1606
|
-
/**
|
|
1607
|
-
* @description Filter paths' opacity by venue and ordinal.
|
|
1608
|
-
* @param venueId {string | null | undefined}
|
|
1609
|
-
* @param ordinal {string | null | undefined}
|
|
1610
|
-
*/
|
|
1611
|
-
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1612
|
-
/**
|
|
1613
|
-
* @description Filter paths' opacity by building and ordinal.
|
|
1614
|
-
* @param buildingId {string | null | undefined}
|
|
1615
|
-
* @param ordinal {string | null | undefined}
|
|
1616
|
-
*/
|
|
1617
|
-
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
1618
|
-
private _classifyFeatures;
|
|
1619
|
-
private _createLineFeature;
|
|
1620
|
-
private _createIconFeature;
|
|
1621
|
-
private _renderSolidLines;
|
|
1622
|
-
private _renderDashedLines;
|
|
1623
|
-
private _renderConnectors;
|
|
1624
|
-
private _renderMarkers;
|
|
1625
|
-
private _addCollectionSource;
|
|
1626
|
-
private _addLineLayer;
|
|
1627
|
-
private _addTriangleLayer;
|
|
1628
|
-
private _addIconLayer;
|
|
1629
|
-
}
|
|
1630
1651
|
export declare const OFFSET: number;
|
|
1631
1652
|
export declare const PAGE: number;
|
|
1632
1653
|
/**
|
|
@@ -1634,20 +1655,12 @@ export declare const PAGE: number;
|
|
|
1634
1655
|
* @param language {string} window.navigator.language
|
|
1635
1656
|
*/
|
|
1636
1657
|
export declare function convertBrowserLangToPresetLang(language: string): PresetLanguage | null;
|
|
1637
|
-
/**
|
|
1638
|
-
* @deprecated Use `VERSION` instead.
|
|
1639
|
-
*/
|
|
1658
|
+
/** @deprecated Use `VERSION` instead. */
|
|
1640
1659
|
export declare const version: string;
|
|
1641
1660
|
export declare const VERSION: string;
|
|
1642
1661
|
|
|
1643
1662
|
export {
|
|
1644
|
-
ControlPosition,
|
|
1645
|
-
FilterSpecification,
|
|
1646
1663
|
Map$1 as Map,
|
|
1647
|
-
MapGeoJSONFeature,
|
|
1648
|
-
MapLayerEventType,
|
|
1649
|
-
MaplibreMap,
|
|
1650
|
-
PointLike,
|
|
1651
1664
|
};
|
|
1652
1665
|
|
|
1653
1666
|
export {};
|