@mapxus/mapxus-map-jp 6.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.d.ts +867 -511
- package/index.js +3 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v6.13.0
|
|
2
2
|
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
|
-
import {
|
|
5
|
-
import { Event, IControl, Map as MaplibreMap, Map as maplibreMap, MapGeoJSONFeature, MapMouseEvent, PointLike } from 'maplibre-gl';
|
|
4
|
+
import { ControlPosition, FilterSpecification, GeoJSONFeature, IControl, LngLat, Map as MaplibreMap, Map as maplibreMap, MapGeoJSONFeature, MapLayerEventType, PointLike } from 'maplibre-gl';
|
|
6
5
|
|
|
7
|
-
declare enum ThemeType {
|
|
6
|
+
export declare enum ThemeType {
|
|
8
7
|
CHRISTMAS = "christmas",
|
|
9
8
|
HALLOWEEN = "halloween",
|
|
10
9
|
MAPPY_BEE = "mappyBee",
|
|
@@ -13,18 +12,44 @@ declare enum ThemeType {
|
|
|
13
12
|
COMMON = "common",
|
|
14
13
|
MAPXUS_V2 = "mapxus_v2"
|
|
15
14
|
}
|
|
15
|
+
export interface ISelectedBuildingBorderStyle {
|
|
16
|
+
lineWidth?: number;
|
|
17
|
+
lineColor?: string;
|
|
18
|
+
lineOpacity?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface IFloorsControlStyle {
|
|
21
|
+
fontColor?: string;
|
|
22
|
+
activeFontColor?: string;
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
activeBackgroundColor?: string;
|
|
25
|
+
itemSize?: number;
|
|
26
|
+
itemCount?: number;
|
|
27
|
+
defaultFolded?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare enum FloorSwitchMode {
|
|
30
|
+
SWITCHED_BY_BUILDING = 0,
|
|
31
|
+
SWITCHED_BY_VENUE = 1
|
|
32
|
+
}
|
|
16
33
|
export interface IMapOption {
|
|
17
|
-
map:
|
|
34
|
+
map: MaplibreMap;
|
|
18
35
|
appId: string;
|
|
19
36
|
secret: string;
|
|
20
37
|
enableFloorControl?: boolean;
|
|
21
38
|
enableBuildingSelector?: boolean;
|
|
39
|
+
venueId?: string;
|
|
22
40
|
buildingId?: string;
|
|
41
|
+
floorId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated "floor" is deprecated, please use "floorId" instead
|
|
44
|
+
*/
|
|
23
45
|
floor?: string;
|
|
24
46
|
poiId?: string;
|
|
25
47
|
hiddenOutdoor?: boolean;
|
|
26
48
|
theme?: ThemeType;
|
|
27
49
|
collapseCopyright?: boolean;
|
|
50
|
+
selectedBuildingBorderStyle?: ISelectedBuildingBorderStyle;
|
|
51
|
+
floorsControlStyle?: IFloorsControlStyle;
|
|
52
|
+
floorSwitchMode?: FloorSwitchMode;
|
|
28
53
|
}
|
|
29
54
|
export type Listener = (param: Object) => any;
|
|
30
55
|
declare class DefinedEvent {
|
|
@@ -47,23 +72,17 @@ export declare class Evented {
|
|
|
47
72
|
private _eventedParent;
|
|
48
73
|
private _eventedParentData;
|
|
49
74
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* @param
|
|
53
|
-
* @param {Function} listener The function to be called when the event is fired.
|
|
54
|
-
* The listener function is called with the data object passed to `fire`,
|
|
55
|
-
* extended with `target` and `type` properties.
|
|
56
|
-
* @returns {Object} `this`
|
|
75
|
+
* @description Register a new event listener
|
|
76
|
+
* @param type name of the event(a unique string)
|
|
77
|
+
* @param listener event handler, it will be called when the event is fired
|
|
57
78
|
*/
|
|
58
|
-
on(type:
|
|
79
|
+
on(type: string, listener: Listener): this;
|
|
59
80
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @param
|
|
63
|
-
* @param {Function} listener The listener function to remove.
|
|
64
|
-
* @returns {Object} `this`
|
|
81
|
+
* @description Remove a registered event listener
|
|
82
|
+
* @param type name of the event
|
|
83
|
+
* @param listener event handler
|
|
65
84
|
*/
|
|
66
|
-
off(type:
|
|
85
|
+
off(type: string, listener: Listener): this;
|
|
67
86
|
/**
|
|
68
87
|
* Adds a listener that will be called only once to a specified event type.
|
|
69
88
|
*
|
|
@@ -91,81 +110,19 @@ export declare class Evented {
|
|
|
91
110
|
*/
|
|
92
111
|
setEventedParent(parent: Evented, data?: Object | (() => Object)): this;
|
|
93
112
|
}
|
|
94
|
-
export interface
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"zh-Hant"?: string;
|
|
99
|
-
ja?: string;
|
|
100
|
-
ko?: string;
|
|
101
|
-
}
|
|
102
|
-
export interface IBbox {
|
|
103
|
-
maxLat: number;
|
|
104
|
-
maxLon: string;
|
|
105
|
-
minLat: number;
|
|
106
|
-
minLon: number;
|
|
107
|
-
}
|
|
108
|
-
export interface IBuilding {
|
|
109
|
-
building: string;
|
|
110
|
-
id: string;
|
|
111
|
-
label_center: string;
|
|
112
|
-
level_ids: string;
|
|
113
|
-
level_names: string;
|
|
114
|
-
name: string;
|
|
115
|
-
"name:en": string;
|
|
116
|
-
"name:zh-Hant": string;
|
|
117
|
-
ordinals: string;
|
|
118
|
-
"ref:venue": string;
|
|
119
|
-
type: string;
|
|
113
|
+
export interface IFloor {
|
|
114
|
+
code: string | null;
|
|
115
|
+
id: string | null;
|
|
116
|
+
ordinal: string | null;
|
|
120
117
|
}
|
|
121
|
-
export interface IFeatureBuilding extends MapGeoJSONFeature {
|
|
122
|
-
properties: IBuilding;
|
|
123
|
-
geometry: Polygon;
|
|
124
|
-
}
|
|
125
|
-
export interface ISearchBuilding {
|
|
126
|
-
address: {
|
|
127
|
-
[key in keyof IMultiLangName]: {
|
|
128
|
-
housenumber: string;
|
|
129
|
-
street: string;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
bbox: IBbox;
|
|
133
|
-
buildingId: string;
|
|
134
|
-
buildingOutlineId: number;
|
|
135
|
-
city?: string;
|
|
136
|
-
country: string;
|
|
137
|
-
floors: {
|
|
138
|
-
code: string;
|
|
139
|
-
id: string;
|
|
140
|
-
ordinal: number;
|
|
141
|
-
signalMap: boolean;
|
|
142
|
-
visualMap: boolean;
|
|
143
|
-
}[];
|
|
144
|
-
groundFloor: string;
|
|
145
|
-
isPrivate: "yes" | "no";
|
|
146
|
-
labelCenter: {
|
|
147
|
-
lat: number;
|
|
148
|
-
lon: number;
|
|
149
|
-
};
|
|
150
|
-
name: IMultiLangName;
|
|
151
|
-
organization: string;
|
|
152
|
-
region: string;
|
|
153
|
-
signalMap: boolean;
|
|
154
|
-
type: string;
|
|
155
|
-
venueId: string;
|
|
156
|
-
venueName: IMultiLangName;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Indoor map core logic
|
|
160
|
-
*/
|
|
161
118
|
export declare class Indoor extends Evented {
|
|
162
119
|
private _map;
|
|
163
120
|
private _features;
|
|
164
121
|
private _curBuildingId;
|
|
165
122
|
private _curBuildingFeature;
|
|
166
|
-
private
|
|
167
|
-
private
|
|
168
|
-
private
|
|
123
|
+
private _ordinal;
|
|
124
|
+
private _floorId;
|
|
125
|
+
private _floorName;
|
|
169
126
|
private _buildingFloors;
|
|
170
127
|
private _buildingOrdinals;
|
|
171
128
|
private _enableSwitch;
|
|
@@ -178,100 +135,172 @@ export declare class Indoor extends Evented {
|
|
|
178
135
|
private _footprints;
|
|
179
136
|
private readonly _displayLevelSet;
|
|
180
137
|
private _curVenueLevelMap;
|
|
138
|
+
private _curBuildingLevelMap;
|
|
181
139
|
private _isSelectBuildingByClickMap;
|
|
182
|
-
private
|
|
183
|
-
private
|
|
184
|
-
private
|
|
185
|
-
private
|
|
186
|
-
constructor(map: maplibreMap, isHiddenOutdoor?: boolean);
|
|
187
|
-
/**
|
|
140
|
+
private _buildingHighlightStyle;
|
|
141
|
+
private readonly _floorSwitchMode;
|
|
142
|
+
private readonly _initBuilding;
|
|
143
|
+
private _dispatch;
|
|
144
|
+
constructor(map: maplibreMap, isHiddenOutdoor?: boolean, floorSwitchMode?: FloorSwitchMode, initBuilding?: string);
|
|
145
|
+
/**
|
|
146
|
+
* @description Turn on indoor-outdoor switching.
|
|
147
|
+
*/
|
|
188
148
|
enableSwitch(): this;
|
|
189
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* @description Turn off indoor-outdoor switching.
|
|
151
|
+
*/
|
|
190
152
|
disableSwitch(): this;
|
|
191
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* @description Turn on building-building switching.
|
|
155
|
+
*/
|
|
192
156
|
enableSwitchBuilding(): this;
|
|
193
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* @description Turn off building-building switching.
|
|
159
|
+
*/
|
|
194
160
|
disableSwitchBuilding(): this;
|
|
195
161
|
/**
|
|
196
|
-
* Get the selected building
|
|
197
|
-
* @
|
|
162
|
+
* @description Get a list of floors of the selected building
|
|
163
|
+
* @deprecated You can use "indoor.building" instead
|
|
164
|
+
* @returns {string[]}
|
|
198
165
|
*/
|
|
199
166
|
get floors(): string[];
|
|
200
167
|
/**
|
|
201
|
-
* Get the selected building's ordinal list
|
|
168
|
+
* @description Get the selected building's ordinal list
|
|
169
|
+
* @deprecated You can use "indoor.building" instead
|
|
202
170
|
* @return {string[]}
|
|
203
171
|
*/
|
|
204
172
|
get ordinals(): string[];
|
|
205
173
|
/**
|
|
206
|
-
* Get the selected building's id
|
|
174
|
+
* @description Get the selected building's id
|
|
175
|
+
* @deprecated You can use "indoor.building" instead
|
|
207
176
|
* @returns {string}
|
|
208
177
|
*/
|
|
209
178
|
get buildingId(): string;
|
|
210
179
|
/**
|
|
211
|
-
* Get current floor of the selected building
|
|
212
|
-
* @
|
|
180
|
+
* @description Get current floor of the selected building
|
|
181
|
+
* @deprecated You should use "indoor.floor" instead
|
|
182
|
+
* @returns {string | null}
|
|
213
183
|
*/
|
|
214
|
-
get currentFloor(): string;
|
|
184
|
+
get currentFloor(): string | null;
|
|
215
185
|
/**
|
|
216
|
-
* Get current ordinal of selecting building
|
|
186
|
+
* @description Get current ordinal of selecting building
|
|
187
|
+
* @deprecated you should use "indoor.floor" instead
|
|
188
|
+
* @returns {string | null}
|
|
217
189
|
*/
|
|
218
190
|
get ordinal(): string | null;
|
|
219
191
|
/**
|
|
220
|
-
* Get current venueId
|
|
192
|
+
* @description Get current venueId
|
|
193
|
+
* @deprecated You should use the new getter 'venue' instead
|
|
194
|
+
* @returns {string | null}
|
|
221
195
|
*/
|
|
222
196
|
get venueId(): string | null;
|
|
223
197
|
/**
|
|
224
|
-
* Get
|
|
225
|
-
* @
|
|
198
|
+
* @description Get current floor id
|
|
199
|
+
* @deprecated You can use "indoor.floor" instead
|
|
200
|
+
* @returns {string | null}
|
|
201
|
+
*/
|
|
202
|
+
get floorId(): string | null;
|
|
203
|
+
/**
|
|
204
|
+
* @description Get the current floor's information.
|
|
226
205
|
*/
|
|
227
|
-
get
|
|
206
|
+
get floor(): IFloor;
|
|
228
207
|
/**
|
|
229
|
-
* Get the
|
|
230
|
-
* @returns {
|
|
208
|
+
* @description Get the current building's information.
|
|
209
|
+
* @returns {MapGeoJSONFeature | null}
|
|
210
|
+
*/
|
|
211
|
+
get building(): MapGeoJSONFeature | null;
|
|
212
|
+
/**
|
|
213
|
+
* @description Get the current venue's information.
|
|
214
|
+
* @returns {MapGeoJSONFeature | null}
|
|
215
|
+
*/
|
|
216
|
+
get venue(): MapGeoJSONFeature | null;
|
|
217
|
+
/**
|
|
218
|
+
* @description Get the geo features of bbox.
|
|
231
219
|
*/
|
|
232
220
|
get features(): MapGeoJSONFeature[];
|
|
233
221
|
/**
|
|
234
|
-
* Get
|
|
235
|
-
* @param id
|
|
222
|
+
* @description Get specified feature of bbox by id.
|
|
223
|
+
* @param id
|
|
236
224
|
* @return {MapGeoJSONFeature | undefined}
|
|
237
225
|
*/
|
|
238
226
|
getFeature(id: string): MapGeoJSONFeature | undefined;
|
|
239
227
|
/**
|
|
240
|
-
* Get
|
|
241
|
-
* @
|
|
242
|
-
* @
|
|
228
|
+
* @description Get building feature at the point
|
|
229
|
+
* @deprecated You can use "map.onMapClickListener" instead
|
|
230
|
+
* @param point {PointLike}
|
|
231
|
+
* @return {MapGeoJSONFeature | null}
|
|
243
232
|
*/
|
|
244
|
-
getBuildingByPoint(point
|
|
233
|
+
getBuildingByPoint(point: PointLike): MapGeoJSONFeature | null;
|
|
245
234
|
/**
|
|
246
|
-
*
|
|
247
|
-
* @param
|
|
235
|
+
* @description Get level feature at the point
|
|
236
|
+
* @param point
|
|
237
|
+
* @return {MapGeoJSONFeature | null}
|
|
248
238
|
*/
|
|
249
|
-
|
|
239
|
+
getLevelByPoint(point: PointLike): MapGeoJSONFeature | null;
|
|
250
240
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @
|
|
241
|
+
* @description Pan to and select a building by buildingId and floorId
|
|
242
|
+
* @deprecated You should use the "panToBuilding" instead
|
|
243
|
+
* @param buildingId {string}
|
|
244
|
+
* @param floorId {string}
|
|
245
|
+
* @param callback
|
|
253
246
|
*/
|
|
254
|
-
|
|
247
|
+
goToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
255
248
|
/**
|
|
256
|
-
*
|
|
257
|
-
* @param buildingId
|
|
249
|
+
* @description Map pan to the building center and select the building.
|
|
250
|
+
* @param buildingId
|
|
251
|
+
* @param floorId
|
|
258
252
|
* @param callback
|
|
259
253
|
*/
|
|
260
|
-
|
|
254
|
+
panToBuilding(buildingId: string, floorId?: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
261
255
|
/**
|
|
262
|
-
* Switch floor
|
|
263
|
-
* @
|
|
256
|
+
* @description Switch floor by ordinal
|
|
257
|
+
* @deprecated You should use the "switchFloorByOrdinal" instead
|
|
258
|
+
* @param ordinal {string}
|
|
264
259
|
*/
|
|
265
260
|
switchFloor(ordinal: string): void;
|
|
266
261
|
/**
|
|
267
|
-
*
|
|
268
|
-
* @param
|
|
262
|
+
* @description Switch floor by ordinal.
|
|
263
|
+
* @param ordinal
|
|
264
|
+
*/
|
|
265
|
+
switchFloorByOrdinal(ordinal: string): void;
|
|
266
|
+
/**
|
|
267
|
+
* @description Hide the outdoor layer.
|
|
268
|
+
* @param isHiddenOutdoor
|
|
269
269
|
*/
|
|
270
270
|
hiddenOutdoorLayer(isHiddenOutdoor: boolean): void;
|
|
271
|
-
/**
|
|
271
|
+
/**
|
|
272
|
+
* @description Update map layout.
|
|
273
|
+
*/
|
|
272
274
|
updateLayers(): void;
|
|
273
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* @description Filter indoor layers.
|
|
277
|
+
*/
|
|
274
278
|
setFloorsFilter(): void;
|
|
279
|
+
/**
|
|
280
|
+
* @description Set the style of SelectedBuildingBorder.
|
|
281
|
+
* @param style {ISelectedBuildingBorderStyle | null}
|
|
282
|
+
*/
|
|
283
|
+
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): void;
|
|
284
|
+
/**
|
|
285
|
+
* @description Listen for the indoor map state, including the changes of venue, building and floor.
|
|
286
|
+
* @param listener
|
|
287
|
+
*/
|
|
288
|
+
onMapChange(listener: (params: {
|
|
289
|
+
venue: MapGeoJSONFeature | null;
|
|
290
|
+
building: MapGeoJSONFeature | null;
|
|
291
|
+
floor: IFloor;
|
|
292
|
+
}) => void): {
|
|
293
|
+
unsubscribe: VoidFunction;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* @description Select a building feature
|
|
297
|
+
* @deprecated Use map.selectBuildingById instead
|
|
298
|
+
* @param feature {MapGeoJSONFeature | null}
|
|
299
|
+
* @param floorId {string}
|
|
300
|
+
*/
|
|
301
|
+
selectBuilding(feature?: MapGeoJSONFeature | null, floorId?: string): void;
|
|
302
|
+
private _selectBuilding;
|
|
303
|
+
private _getBuildingByPoint;
|
|
275
304
|
private _getConditionsExpression;
|
|
276
305
|
private _loadData;
|
|
277
306
|
private _init;
|
|
@@ -281,30 +310,13 @@ export declare class Indoor extends Evented {
|
|
|
281
310
|
private _setPoiTextColor;
|
|
282
311
|
private _addTextHaloColor;
|
|
283
312
|
private _getFeatures;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
* @param buildingFeature: {MapGeoJSONFeature}
|
|
288
|
-
* @param floor?: {string}
|
|
289
|
-
* @private
|
|
290
|
-
*/
|
|
291
|
-
private _getBuildingOrdinal;
|
|
292
|
-
/**
|
|
293
|
-
* 获取当前 building floor
|
|
294
|
-
* @private
|
|
295
|
-
*/
|
|
296
|
-
private _getBuildingFloor;
|
|
297
|
-
/**
|
|
298
|
-
* @description Get building level_names and ordinals
|
|
299
|
-
* @param buildingFeature
|
|
300
|
-
* @private
|
|
301
|
-
*/
|
|
302
|
-
private _getBuildingProps;
|
|
313
|
+
private _getBuildingFloorByOrdinal;
|
|
314
|
+
private _getBuildingFloorByFloorId;
|
|
315
|
+
private _getBuildingFloorsAndOrdinals;
|
|
303
316
|
private _isNotCurrentFeature;
|
|
304
317
|
private _setOutdoorLayersHidden;
|
|
305
318
|
private _addCustomLevelFillLayer;
|
|
306
|
-
private
|
|
307
|
-
private _setLayerTransparency;
|
|
319
|
+
private _setIndoorState;
|
|
308
320
|
private _setBuildingHighlight;
|
|
309
321
|
private _addBuildingHighlightLayer;
|
|
310
322
|
private _filterBuildingHighlight;
|
|
@@ -312,39 +324,44 @@ export declare class Indoor extends Evented {
|
|
|
312
324
|
private _removeDisplayLevels;
|
|
313
325
|
private _setDisplayLevels;
|
|
314
326
|
private _cacheCurVenueLevels;
|
|
315
|
-
private
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
327
|
+
private _cacheCurBuildingLevels;
|
|
328
|
+
/**
|
|
329
|
+
* @description priority: history > default_displayed_floor > ordinal equal to or closest to 0
|
|
330
|
+
* @param building
|
|
331
|
+
* @private
|
|
332
|
+
*/
|
|
333
|
+
private _getBuildingOrdinal;
|
|
334
|
+
private _getFloorIdByOrdinal;
|
|
320
335
|
/**
|
|
321
336
|
* @description 判断当前 building 是否为隐藏式 building,即点击的 building 无显示元素
|
|
322
337
|
* @param building
|
|
323
338
|
* @private
|
|
324
339
|
*/
|
|
325
340
|
private _isHiddenBuilding;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
341
|
+
private _isVenueMode;
|
|
342
|
+
private _getDisplayLevelsByVenueMode;
|
|
343
|
+
private _getDisplayLevelsByBuildingMode;
|
|
344
|
+
private _getUnselectedVenueOrdinal;
|
|
345
|
+
private _getBuildingFloor;
|
|
346
|
+
private static isFilterHasBeenReset;
|
|
331
347
|
}
|
|
332
348
|
export interface IPoiEvent {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
349
|
+
coordinate: LngLat;
|
|
350
|
+
poi: MapGeoJSONFeature;
|
|
351
|
+
building: MapGeoJSONFeature | null;
|
|
352
|
+
venue: MapGeoJSONFeature | null;
|
|
353
|
+
floor: IFloor;
|
|
337
354
|
}
|
|
338
|
-
export interface
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
feature: Feature<GeometryObject>;
|
|
355
|
+
export interface IPointEvent {
|
|
356
|
+
coordinate: LngLat;
|
|
357
|
+
point: PointLike;
|
|
342
358
|
}
|
|
343
|
-
export interface IMapClickEvent
|
|
344
|
-
|
|
345
|
-
|
|
359
|
+
export interface IMapClickEvent {
|
|
360
|
+
coordinate: LngLat;
|
|
361
|
+
building: MapGeoJSONFeature | null;
|
|
362
|
+
venue: MapGeoJSONFeature | null;
|
|
363
|
+
floor: IFloor;
|
|
346
364
|
}
|
|
347
|
-
export type TPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
348
365
|
export declare class Map extends Evented {
|
|
349
366
|
private _map;
|
|
350
367
|
private _indoor;
|
|
@@ -353,389 +370,429 @@ export declare class Map extends Evented {
|
|
|
353
370
|
private _enableFloorControl;
|
|
354
371
|
private _enableBuildingSelector;
|
|
355
372
|
private _poi;
|
|
356
|
-
private _buildingId;
|
|
357
373
|
private _initialHiddenLayers;
|
|
358
374
|
private _attributionControl;
|
|
359
375
|
private _mapZoom;
|
|
360
376
|
private _dispatch;
|
|
361
|
-
private static _getThemeStyleName;
|
|
362
377
|
constructor(option: IMapOption);
|
|
363
378
|
/**
|
|
364
|
-
*
|
|
365
|
-
* @param
|
|
379
|
+
* @description This function will be called once the indoor source loaded.
|
|
380
|
+
* @param callback
|
|
366
381
|
*/
|
|
367
|
-
renderComplete(callback:
|
|
382
|
+
renderComplete(callback: VoidFunction): void;
|
|
368
383
|
/**
|
|
369
|
-
* Get indoor
|
|
370
|
-
* @returns {Indoor}
|
|
384
|
+
* @description Get map indoor instance.
|
|
371
385
|
*/
|
|
372
386
|
getIndoor(): Indoor;
|
|
373
|
-
/** Get map instance */
|
|
374
|
-
getMap(): maplibreMap;
|
|
375
387
|
/**
|
|
376
|
-
*
|
|
377
|
-
|
|
388
|
+
* @description Get maplibre map instance.
|
|
389
|
+
*/
|
|
390
|
+
getMap(): MaplibreMap;
|
|
391
|
+
/**
|
|
392
|
+
* @description Translate POI name to the specified language.
|
|
393
|
+
* @param language Window.navigator.language.
|
|
378
394
|
*/
|
|
379
395
|
transformPoiTextFieldLanguage(language: string): void;
|
|
380
|
-
/**
|
|
396
|
+
/**
|
|
397
|
+
* @description Turn on indoor-outdoor switching.
|
|
398
|
+
*/
|
|
381
399
|
enableSwitch(): this;
|
|
382
|
-
/**
|
|
400
|
+
/**
|
|
401
|
+
* @description Turn off indoor-outdoor switching.
|
|
402
|
+
*/
|
|
383
403
|
disableSwitch(): this;
|
|
384
|
-
/**
|
|
404
|
+
/**
|
|
405
|
+
* @description Turn on building-building switching.
|
|
406
|
+
*/
|
|
385
407
|
enableSwitchBuilding(): this;
|
|
386
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* @description Turn off building-building switching.
|
|
410
|
+
*/
|
|
387
411
|
disableSwitchBuilding(): this;
|
|
388
412
|
/**
|
|
389
|
-
*
|
|
390
|
-
* @
|
|
413
|
+
* @description Set outdoor layer to be shown or hidden.
|
|
414
|
+
* @deprecated You can use "map.setOutdoorLayerHidden" instead.
|
|
415
|
+
* @param isHiddenOutdoor True is hidden, false is shown.
|
|
391
416
|
*/
|
|
392
417
|
hiddenOutdoorLayer(isHiddenOutdoor: boolean): void;
|
|
393
418
|
/**
|
|
394
|
-
*
|
|
419
|
+
* @description Set outdoor layer to be shown or hidden.
|
|
420
|
+
* @param isHidden True is hidden, false is shown.
|
|
421
|
+
*/
|
|
422
|
+
setOutdoorLayerHidden(isHidden: boolean): void;
|
|
423
|
+
/**
|
|
424
|
+
* @description Get a list of floors of the selected building
|
|
425
|
+
* @deprecated You can use "map.building" instead
|
|
395
426
|
* @returns {string[]}
|
|
396
427
|
*/
|
|
397
428
|
get floors(): string[];
|
|
398
429
|
/**
|
|
399
|
-
* Get the current floor of the selected building
|
|
400
|
-
* @
|
|
430
|
+
* @description Get the current floor of the selected building
|
|
431
|
+
* @deprecated You can get the current floor by "map.floor"
|
|
432
|
+
* @returns {string | null}
|
|
401
433
|
*/
|
|
402
|
-
get currentFloor(): string;
|
|
434
|
+
get currentFloor(): string | null;
|
|
403
435
|
/**
|
|
404
|
-
* Get the current ordinal of the selected building
|
|
436
|
+
* @description Get the current ordinal of the selected building
|
|
437
|
+
* @deprecated You can use "map.floor" instead
|
|
438
|
+
* @returns {string | null}
|
|
405
439
|
*/
|
|
406
440
|
get ordinal(): string | null;
|
|
407
441
|
/**
|
|
408
|
-
* Get venueId which the selected building belongs
|
|
442
|
+
* @description Get venueId which the selected building belongs
|
|
443
|
+
* @deprecated You can use "map.venue" instead
|
|
444
|
+
* @returns {string | null}
|
|
409
445
|
*/
|
|
410
446
|
get venueId(): string | null;
|
|
411
447
|
/**
|
|
412
|
-
* Get
|
|
413
|
-
* @
|
|
448
|
+
* @description Get current selected floor info.
|
|
449
|
+
* @return {IFloor | null}
|
|
450
|
+
*/
|
|
451
|
+
get floor(): IFloor | null;
|
|
452
|
+
/**
|
|
453
|
+
* @description Get current selected building info.
|
|
454
|
+
* @return {MapGeoJSONFeature | null}
|
|
455
|
+
*/
|
|
456
|
+
get building(): MapGeoJSONFeature | null;
|
|
457
|
+
/**
|
|
458
|
+
* @description Get current selected venue info.
|
|
459
|
+
* @return {MapGeoJSONFeature | null}
|
|
414
460
|
*/
|
|
415
|
-
get
|
|
461
|
+
get venue(): MapGeoJSONFeature | null;
|
|
416
462
|
/**
|
|
417
|
-
* Get feature
|
|
418
|
-
* @param id
|
|
463
|
+
* @description Get feature in bbox by id.
|
|
464
|
+
* @param id
|
|
465
|
+
* @return {MapGeoJSONFeature | undefined}
|
|
419
466
|
*/
|
|
420
467
|
getFeature(id: string): MapGeoJSONFeature | undefined;
|
|
421
468
|
/**
|
|
422
|
-
* Select the building feature to enter its indoor
|
|
423
|
-
* @
|
|
469
|
+
* @description Select the building feature to enter its indoor
|
|
470
|
+
* @deprecated You can use "map.selectBuildingById" or "map.selectVenueById" instead
|
|
471
|
+
* @param feature {MapGeoJSONFeature | null} If feature is null then exit indoor
|
|
424
472
|
*/
|
|
425
|
-
selectBuilding(feature:
|
|
473
|
+
selectBuilding(feature: MapGeoJSONFeature | null): this;
|
|
426
474
|
/**
|
|
427
|
-
* Switch the selected building to be the specified id
|
|
428
|
-
* @
|
|
475
|
+
* @description Switch the selected building to be the specified id
|
|
476
|
+
* @deprecated You can use "map.selectBuildingById" instead
|
|
477
|
+
* @param buildingId {string}
|
|
429
478
|
* @param callback
|
|
430
479
|
*/
|
|
431
|
-
switchBuilding(buildingId: string, callback?: (feature:
|
|
480
|
+
switchBuilding(buildingId: string, callback?: (feature: MapGeoJSONFeature) => void): this;
|
|
432
481
|
/**
|
|
433
|
-
* Switch to the specified floor
|
|
434
|
-
* @
|
|
482
|
+
* @description Switch to the specified floor
|
|
483
|
+
* @deprecated You can use "map.selectFloorById" instead
|
|
484
|
+
* @param floor {string}
|
|
435
485
|
* @param callback
|
|
436
486
|
*/
|
|
437
|
-
switchFloor(floor: string, callback?: (
|
|
487
|
+
switchFloor(floor: string, callback?: (feature: MapGeoJSONFeature) => void): this;
|
|
488
|
+
/**
|
|
489
|
+
* @description Select floor by id.
|
|
490
|
+
* @param floorId
|
|
491
|
+
* @param callback Called after floor has been selected.
|
|
492
|
+
*/
|
|
493
|
+
selectFloorById(floorId: string, callback?: VoidFunction): Promise<this>;
|
|
438
494
|
/**
|
|
439
|
-
*
|
|
495
|
+
* @description Select building by id.
|
|
496
|
+
* @param buildingId
|
|
497
|
+
* @param callback Called after building has been selected
|
|
498
|
+
*/
|
|
499
|
+
selectBuildingById(buildingId: string, callback?: VoidFunction): this;
|
|
500
|
+
/**
|
|
501
|
+
* @description Select or exit venue by id.
|
|
502
|
+
* @param venueId Exit venue if venueId is null.
|
|
503
|
+
* @param callback Called after venue has been selected.
|
|
504
|
+
*/
|
|
505
|
+
selectVenueById(venueId: string | null, callback?: VoidFunction): Promise<this>;
|
|
506
|
+
/**
|
|
507
|
+
* @description Listen for mouse click events on the map.
|
|
440
508
|
* @param listener
|
|
441
|
-
* @return {unsubscribe}: to remove the event listener
|
|
442
509
|
*/
|
|
443
510
|
onMapClickListener(listener: (event: IMapClickEvent) => void): {
|
|
444
|
-
unsubscribe:
|
|
511
|
+
unsubscribe: VoidFunction;
|
|
445
512
|
};
|
|
446
513
|
/**
|
|
447
|
-
* Listen for
|
|
514
|
+
* @description Listen for mouse click events on indoor POI
|
|
448
515
|
* @param listener
|
|
449
|
-
* @return {unsubscribe}: to remove the event listener
|
|
450
516
|
*/
|
|
451
|
-
|
|
452
|
-
unsubscribe:
|
|
517
|
+
onPoiClickListener(listener: (param: IPoiEvent) => void): {
|
|
518
|
+
unsubscribe: VoidFunction;
|
|
453
519
|
};
|
|
454
520
|
/**
|
|
455
|
-
* Listen for
|
|
521
|
+
* @description Listen for mouse click events at a point.
|
|
456
522
|
* @param listener
|
|
457
|
-
* @return {unsubscribe}: to remove the event listener
|
|
458
523
|
*/
|
|
459
|
-
|
|
460
|
-
unsubscribe:
|
|
524
|
+
onPointClickListener(listener: (result: IPointEvent) => void): {
|
|
525
|
+
unsubscribe: VoidFunction;
|
|
461
526
|
};
|
|
462
527
|
/**
|
|
463
|
-
* Listen for the selected
|
|
464
|
-
* @
|
|
465
|
-
* @
|
|
528
|
+
* @description Listen for the selected floor changed event
|
|
529
|
+
* @deprecated You can use the "map.onMapChangeListener" instead
|
|
530
|
+
* @param listener {function} (feature: MapGeoJSONFeature | null) => void
|
|
531
|
+
* @return {unsubscribe} To remove the event listener
|
|
466
532
|
*/
|
|
467
|
-
|
|
468
|
-
unsubscribe:
|
|
533
|
+
onFloorChangeListener(listener: (feature: MapGeoJSONFeature | null) => void): {
|
|
534
|
+
unsubscribe: VoidFunction;
|
|
469
535
|
};
|
|
470
536
|
/**
|
|
471
|
-
* Listen for the selected
|
|
472
|
-
* @
|
|
473
|
-
* @
|
|
537
|
+
* @description Listen for the selected building changed event
|
|
538
|
+
* @deprecated You can use the "map.onMapChangeListener" instead
|
|
539
|
+
* @param listener {function} (feature: MapGeoJSONFeature | null) => void
|
|
540
|
+
* @return {unsubscribe} To remove the event listener
|
|
541
|
+
*/
|
|
542
|
+
onBuildingChangeListener(listener: (feature: MapGeoJSONFeature | null) => void): {
|
|
543
|
+
unsubscribe: VoidFunction;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* @description Listen for the selected venue changed event
|
|
547
|
+
* @deprecated You can use the "map.onMapChangeListener" instead
|
|
548
|
+
* @param listener {function} (feature: MapGeoJSONFeature | null) => void
|
|
549
|
+
* @return {unsubscribe} To remove the event listener
|
|
550
|
+
*/
|
|
551
|
+
onVenueChangeListener(listener: (feature: MapGeoJSONFeature | null) => void): {
|
|
552
|
+
unsubscribe: VoidFunction;
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* @description Listen for the indoor map status, including the changes of venue, building and floor.
|
|
556
|
+
* @param listener
|
|
474
557
|
*/
|
|
475
|
-
|
|
476
|
-
|
|
558
|
+
onMapChangeListener(listener: (params: {
|
|
559
|
+
venue: MapGeoJSONFeature | null;
|
|
560
|
+
building: MapGeoJSONFeature | null;
|
|
561
|
+
floor: IFloor;
|
|
562
|
+
}) => void): {
|
|
563
|
+
unsubscribe: VoidFunction;
|
|
477
564
|
};
|
|
478
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* @description Hide the FloorControl.
|
|
567
|
+
*/
|
|
479
568
|
disableFloorControl(): this;
|
|
480
569
|
/**
|
|
481
|
-
*
|
|
482
|
-
* @param position
|
|
570
|
+
* @description Show the FloorControl.
|
|
571
|
+
* @param position
|
|
572
|
+
*/
|
|
573
|
+
enableFloorControl(position?: ControlPosition): this;
|
|
574
|
+
/**
|
|
575
|
+
* @description Hide the BuildingSelector.
|
|
483
576
|
*/
|
|
484
|
-
enableFloorControl(position?: TPosition): this;
|
|
485
|
-
/** Hide the BuildingSelector */
|
|
486
577
|
disableBuildingSelector(): this;
|
|
487
578
|
/**
|
|
488
|
-
*
|
|
489
|
-
* @param position
|
|
579
|
+
* @description Show the BuildingSelector.
|
|
580
|
+
* @param position
|
|
490
581
|
*/
|
|
491
|
-
enableBuildingSelector(position?:
|
|
582
|
+
enableBuildingSelector(position?: ControlPosition): this;
|
|
492
583
|
/**
|
|
493
|
-
*
|
|
494
|
-
* @param theme
|
|
584
|
+
* @description Switch the map style
|
|
585
|
+
* @param theme ThemeType | string(customized map style file name)
|
|
495
586
|
*/
|
|
496
587
|
switchTheme(theme: string): void;
|
|
497
588
|
/**
|
|
498
|
-
*
|
|
499
|
-
* @param style
|
|
589
|
+
* @description Set the floorsControl's style.
|
|
590
|
+
* @param style
|
|
500
591
|
*/
|
|
501
592
|
setFloorsControlStyle(style: IFloorsControlStyle): void;
|
|
593
|
+
/**
|
|
594
|
+
* @description Set the SelectedBuildingBorder's style
|
|
595
|
+
* @param style {ISelectedBuildingBorderStyle | null}
|
|
596
|
+
*/
|
|
597
|
+
setSelectedBuildingBorderStyle(style: ISelectedBuildingBorderStyle | null): void;
|
|
598
|
+
private static _getThemeStyleName;
|
|
502
599
|
private _setIndoorFilter;
|
|
503
600
|
private _setStyle;
|
|
504
601
|
private _addControl;
|
|
505
602
|
private _defaultSetMapZoom;
|
|
506
|
-
private
|
|
507
|
-
private
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
] | [
|
|
513
|
-
number,
|
|
514
|
-
number
|
|
515
|
-
][];
|
|
516
|
-
/**
|
|
517
|
-
* Map marker
|
|
518
|
-
* support all browser event
|
|
519
|
-
* support floor and building switch
|
|
520
|
-
* allow to define icon and scale
|
|
521
|
-
*/
|
|
522
|
-
export declare class Marker extends Evented {
|
|
523
|
-
private _map;
|
|
603
|
+
private _selectPoiById;
|
|
604
|
+
private _getBuildingIdByVenueId;
|
|
605
|
+
private _getBuildingOrdinalByFloor;
|
|
606
|
+
}
|
|
607
|
+
export type TAnchorPosition = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
608
|
+
export declare class Marker {
|
|
524
609
|
private _maplibreMap;
|
|
525
|
-
private _coordinates;
|
|
526
|
-
private _floor;
|
|
527
|
-
private _buildingId;
|
|
528
|
-
private readonly _sourceId;
|
|
529
610
|
private readonly _layerId;
|
|
611
|
+
private readonly _sourceId;
|
|
530
612
|
private _imageName;
|
|
531
|
-
private
|
|
532
|
-
private
|
|
613
|
+
private _imageSize;
|
|
614
|
+
private _iconAnchor;
|
|
615
|
+
constructor(maplibreMap: MaplibreMap);
|
|
533
616
|
/**
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
* @private
|
|
537
|
-
* @returns {boolean}
|
|
617
|
+
* @description Set marker by sprite name.
|
|
618
|
+
* @param imageName Icon sprite name in map style.
|
|
538
619
|
*/
|
|
539
|
-
|
|
540
|
-
constructor(map?: Map);
|
|
620
|
+
setIconImage(imageName: string): void;
|
|
541
621
|
/**
|
|
542
|
-
* @
|
|
543
|
-
* @param
|
|
622
|
+
* @description Set marker by image url.
|
|
623
|
+
* @param imageUrl Network url, png format.
|
|
544
624
|
*/
|
|
545
|
-
|
|
625
|
+
setIconImageUrl(imageUrl: string): void;
|
|
546
626
|
/**
|
|
547
|
-
* Set
|
|
548
|
-
*
|
|
549
|
-
* @public
|
|
550
|
-
* @param {string} type browser event type, eq. click、dbclick、mouseenter
|
|
551
|
-
* @param {function} callback marker event callback
|
|
627
|
+
* @description Set marker image size.
|
|
628
|
+
* @param imageScale Default is 1.
|
|
552
629
|
*/
|
|
553
|
-
|
|
630
|
+
setIconSize(imageScale: number): void;
|
|
554
631
|
/**
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
* @public
|
|
558
|
-
* @param {number[] | number[][]} coordinates normal array is single point, two-dimensional array is multi points
|
|
559
|
-
* @param {string} floor optional, binding the marker floor, showing markers by floor
|
|
560
|
-
* @param {string} buildingId optional, binding the marker building, showing markers by building
|
|
632
|
+
* @description Set marker image anchor. Part of the icon placed closest to the anchor.
|
|
633
|
+
* @param anchor
|
|
561
634
|
*/
|
|
562
|
-
|
|
635
|
+
setIconAnchor(anchor: TAnchorPosition): void;
|
|
563
636
|
/**
|
|
564
|
-
*
|
|
565
|
-
* no data that will be hidden
|
|
566
|
-
*
|
|
567
|
-
* @public
|
|
637
|
+
* @description Marker layer id getter.
|
|
568
638
|
*/
|
|
569
|
-
|
|
639
|
+
get layerId(): string;
|
|
570
640
|
/**
|
|
571
|
-
* @
|
|
572
|
-
* @param floor
|
|
573
|
-
* @param buildingId
|
|
641
|
+
* @description Marker source id getter.
|
|
574
642
|
*/
|
|
575
|
-
|
|
643
|
+
get sourceId(): string;
|
|
576
644
|
/**
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
* @public
|
|
580
|
-
* @returns {string}
|
|
645
|
+
* @description Create marker[s] source and layer.
|
|
646
|
+
* @param array Coordinate and properties arrays of marker[s].
|
|
581
647
|
*/
|
|
582
|
-
|
|
648
|
+
create(array: Array<{
|
|
649
|
+
lngLat: [
|
|
650
|
+
number,
|
|
651
|
+
number
|
|
652
|
+
];
|
|
653
|
+
properties?: {
|
|
654
|
+
[k: string]: string;
|
|
655
|
+
};
|
|
656
|
+
}>): void;
|
|
583
657
|
/**
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
* @public
|
|
587
|
-
* @returns {string}
|
|
658
|
+
* @description Remove marker[s] layer and source.
|
|
588
659
|
*/
|
|
589
|
-
|
|
660
|
+
remove(): void;
|
|
590
661
|
/**
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* @
|
|
594
|
-
* @param {string} imageUrl network url, allow format is png、gif、jpg
|
|
662
|
+
* @description Add marker event listener.
|
|
663
|
+
* @param eventKey
|
|
664
|
+
* @param callback
|
|
595
665
|
*/
|
|
596
|
-
|
|
666
|
+
onEventListener(eventKey: keyof MapLayerEventType, callback: (marker: GeoJSONFeature) => void): void;
|
|
597
667
|
/**
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
668
|
+
* @description Filter marker by custom properties.
|
|
669
|
+
* @param filterExpression A expression specifying conditions on source features.
|
|
670
|
+
* Only features that match the filter are displayed. Refer:
|
|
671
|
+
* https://maplibre.org/maplibre-style-spec/expressions/
|
|
602
672
|
*/
|
|
603
|
-
|
|
604
|
-
private _bindEvents;
|
|
673
|
+
setFilter(filterExpression: FilterSpecification): void;
|
|
605
674
|
/**
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* @
|
|
675
|
+
* @description Filter marker by venueId and ordinal.
|
|
676
|
+
* Required 'venueId' and 'ordinal' in properties.
|
|
677
|
+
* Markers not matched 'venueId' and 'ordinal' would be hidden;
|
|
678
|
+
* Outdoor markers always are shown.
|
|
679
|
+
* @param venueId {string | null | undefined}
|
|
680
|
+
* @param ordinal {string | null | undefined}
|
|
611
681
|
*/
|
|
612
|
-
|
|
682
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
613
683
|
/**
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
* @param {
|
|
684
|
+
* @description Filter marker by buildingId and ordinal.
|
|
685
|
+
* Required 'buildingId' and 'ordinal' in properties.
|
|
686
|
+
* Markers not matched 'buildingId' and 'ordinal' would be hidden;
|
|
687
|
+
* Outdoor markers always are shown.
|
|
688
|
+
* @param buildingId {string | null | undefined}
|
|
689
|
+
* @param ordinal {string | null | undefined}
|
|
619
690
|
*/
|
|
620
|
-
|
|
691
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
621
692
|
/**
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
693
|
+
* @description Set marker's icon-opacity by custom properties.
|
|
694
|
+
* @param filterExpression A expression specifying conditions on source features.
|
|
695
|
+
* Only features that match the filter are displayed. Refer:
|
|
696
|
+
* https://maplibre.org/maplibre-style-spec/expressions/
|
|
625
697
|
*/
|
|
626
|
-
|
|
698
|
+
setOpacity(filterExpression: FilterSpecification): void;
|
|
627
699
|
/**
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
700
|
+
* @description Set marker's icon-opacity by venueId and ordinal.
|
|
701
|
+
* Required 'venueId' and 'ordinal' in properties.
|
|
702
|
+
* Opacities of markers matched 'venueId' and 'ordinal' are 1, others are 0.5.
|
|
703
|
+
* Outdoor markers' opacity always are 1.
|
|
704
|
+
* @param venueId {string | null | undefined}
|
|
705
|
+
* @param ordinal {string | null | undefined}
|
|
631
706
|
*/
|
|
632
|
-
|
|
633
|
-
|
|
707
|
+
setOpacityByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
708
|
+
/**
|
|
709
|
+
* @description Set marker's icon-opacity by buildingId and ordinal.
|
|
710
|
+
* Required 'buildingId' and 'ordinal' in properties.
|
|
711
|
+
* Opacities of markers matched 'buildingId' and 'ordinal' are 1, others are 0.5.
|
|
712
|
+
* Outdoor markers' opacity always are 1.
|
|
713
|
+
* @param buildingId {string | null | undefined}
|
|
714
|
+
* @param ordinal {string | null | undefined}
|
|
715
|
+
*/
|
|
716
|
+
setOpacityByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): void;
|
|
717
|
+
private _createIconFeature;
|
|
718
|
+
private _addIconSource;
|
|
719
|
+
private _addIconLayer;
|
|
634
720
|
}
|
|
635
721
|
export declare class Poi {
|
|
636
722
|
private _map;
|
|
637
|
-
private
|
|
723
|
+
private _layerIds;
|
|
638
724
|
private _dispatch;
|
|
639
|
-
constructor(map:
|
|
725
|
+
constructor(map: MaplibreMap);
|
|
640
726
|
/**
|
|
641
|
-
* Listen for
|
|
727
|
+
* @description Listen for POI click events.
|
|
642
728
|
* @param listener
|
|
643
|
-
* @return {unsubscribe}: to remove the event listener
|
|
644
729
|
*/
|
|
645
|
-
|
|
646
|
-
unsubscribe:
|
|
730
|
+
onPoiClick(listener: (param: IPoiEvent) => void): {
|
|
731
|
+
unsubscribe: VoidFunction;
|
|
647
732
|
};
|
|
648
|
-
|
|
649
|
-
* Init the data after the style data is loaded
|
|
650
|
-
* @private
|
|
651
|
-
*/
|
|
652
|
-
private _loadData;
|
|
653
|
-
/**
|
|
654
|
-
* 1. Get layer id is match `poi` name data
|
|
655
|
-
* 2. Init map on-click event
|
|
656
|
-
*
|
|
657
|
-
* @private
|
|
658
|
-
*/
|
|
733
|
+
private _bindEvents;
|
|
659
734
|
private _init;
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
* if have poiClickFunction callback
|
|
663
|
-
* and then return the poi data to callback function
|
|
664
|
-
*
|
|
665
|
-
* @private
|
|
666
|
-
*/
|
|
667
|
-
private _initClick;
|
|
735
|
+
private _initPoiClick;
|
|
736
|
+
private _getFloorDataByFloorId;
|
|
668
737
|
}
|
|
669
738
|
export declare class FloorsControl implements IControl {
|
|
670
|
-
private
|
|
671
|
-
private _$container;
|
|
739
|
+
private _container;
|
|
672
740
|
private _indoor;
|
|
673
|
-
private _$layout;
|
|
674
|
-
private _$outer;
|
|
675
|
-
private _$inner;
|
|
676
|
-
private _$arrowUp;
|
|
677
|
-
private _$arrowDown;
|
|
678
|
-
private _floor;
|
|
679
|
-
private _buildingId;
|
|
680
|
-
private _ordinal;
|
|
681
|
-
private _fontColor;
|
|
682
|
-
private _selectFontColor;
|
|
683
|
-
private _selectBoxColor;
|
|
684
|
-
private _$currentButton;
|
|
685
|
-
private _$floorControlButtons;
|
|
686
|
-
private _enableFloorControl;
|
|
687
741
|
private _position;
|
|
742
|
+
private _floorNames;
|
|
743
|
+
private _ordinals;
|
|
744
|
+
private _buildingId;
|
|
745
|
+
private _selectorStyle;
|
|
746
|
+
private _$innerFloors;
|
|
747
|
+
private _$activeFloor;
|
|
748
|
+
private _centerSelectorIdx;
|
|
749
|
+
private _lastNormalScrollableIdx;
|
|
750
|
+
private _$arrowBtnUp;
|
|
751
|
+
private _$arrowBtnDown;
|
|
752
|
+
private _maxScrollTop;
|
|
753
|
+
private _$selectorExpanded;
|
|
754
|
+
private _$selectorFolded;
|
|
688
755
|
private _dispatch;
|
|
689
|
-
private
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
onAdd(map: maplibreMap): HTMLElement;
|
|
756
|
+
private _componentDidMount;
|
|
757
|
+
private _isShown;
|
|
758
|
+
constructor(indoor: Indoor);
|
|
759
|
+
onAdd(): HTMLElement;
|
|
694
760
|
onRemove(): void;
|
|
695
|
-
|
|
696
|
-
onFloorClick(listener: (result: IFloorEvent) => void): {
|
|
697
|
-
unsubscribe: Function;
|
|
698
|
-
};
|
|
699
|
-
switchFloor(ordinal: string, callback?: (object: IFloorEvent) => void): void;
|
|
700
|
-
setStyle(style: IFloorsControlStyle): void;
|
|
701
|
-
setLayoutHidden(isHidden: boolean): void;
|
|
702
|
-
moveFloorControl(from: TPosition, to: TPosition): void;
|
|
703
|
-
private _listener;
|
|
761
|
+
getDefaultPosition(): ControlPosition;
|
|
704
762
|
/**
|
|
705
|
-
*
|
|
706
|
-
* 1. click current building
|
|
707
|
-
* 2. click other building (new building)
|
|
708
|
-
* @param event {IBuildingSelectEvent}
|
|
763
|
+
* @deprecated Use 'switchByOrdinal' instead
|
|
709
764
|
*/
|
|
710
|
-
|
|
765
|
+
switchByFloorName(floorName: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
766
|
+
switchByOrdinal(ordinal: string, callback?: (feature: MapGeoJSONFeature) => void): void;
|
|
767
|
+
setVisibility(visible: boolean): void;
|
|
768
|
+
setPosition(position: ControlPosition): void;
|
|
769
|
+
setStyle(style: Partial<IFloorsControlStyle> | null): void;
|
|
711
770
|
/**
|
|
712
|
-
*
|
|
771
|
+
* @deprecated
|
|
772
|
+
* @param listener
|
|
713
773
|
*/
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
private
|
|
718
|
-
private
|
|
719
|
-
private
|
|
720
|
-
private
|
|
721
|
-
private
|
|
722
|
-
private
|
|
723
|
-
private _$
|
|
724
|
-
private _$
|
|
774
|
+
onFloorClick(listener: (feature: MapGeoJSONFeature) => void): {
|
|
775
|
+
unsubscribe: VoidFunction;
|
|
776
|
+
};
|
|
777
|
+
private _bindEvents;
|
|
778
|
+
private _clearData;
|
|
779
|
+
private _render;
|
|
780
|
+
private _hide;
|
|
781
|
+
private _show;
|
|
782
|
+
private _createSelector;
|
|
783
|
+
private _$expandedSelector;
|
|
784
|
+
private _$foldedSelector;
|
|
785
|
+
private _clearSelector;
|
|
786
|
+
private _$createScrollButton;
|
|
725
787
|
private _$createFloors;
|
|
726
|
-
private
|
|
727
|
-
private
|
|
728
|
-
private
|
|
729
|
-
private
|
|
730
|
-
private
|
|
731
|
-
private
|
|
732
|
-
private
|
|
733
|
-
private
|
|
734
|
-
private _floorClickEvent;
|
|
735
|
-
private _floorScrollEvent;
|
|
736
|
-
private _bindEvent;
|
|
737
|
-
private _getCurrentFloor;
|
|
738
|
-
private _updateFloorControlStatus;
|
|
788
|
+
private _updateSelectorStatus;
|
|
789
|
+
private _resetArrowBtnStatus;
|
|
790
|
+
private _resetActiveFloor;
|
|
791
|
+
private _scrollCenterActiveFloor;
|
|
792
|
+
private _getScrollTop;
|
|
793
|
+
private _handleScroll;
|
|
794
|
+
private _expandSelector;
|
|
795
|
+
private _getCurrentLevelFeature;
|
|
739
796
|
}
|
|
740
797
|
export declare class BuildingFilterControl implements maplibregl.IControl {
|
|
741
798
|
private _map;
|
|
@@ -747,19 +804,18 @@ export declare class BuildingFilterControl implements maplibregl.IControl {
|
|
|
747
804
|
private _buildingNameList;
|
|
748
805
|
private _enableBuildingSelector;
|
|
749
806
|
private readonly _position;
|
|
750
|
-
constructor(map: Map, position?:
|
|
807
|
+
constructor(map: Map, position?: ControlPosition);
|
|
751
808
|
onAdd(map: MaplibreMap): HTMLElement;
|
|
752
809
|
onRemove(): void;
|
|
753
|
-
get position():
|
|
810
|
+
get position(): ControlPosition;
|
|
754
811
|
get enabled(): boolean;
|
|
755
812
|
setLayoutHidden(isHidden: boolean): void;
|
|
756
|
-
moveBuildingFilter(from:
|
|
813
|
+
moveBuildingFilter(from: ControlPosition, to: ControlPosition): void;
|
|
757
814
|
private _loadData;
|
|
758
815
|
private _init;
|
|
759
816
|
private _refresh;
|
|
760
817
|
private _select;
|
|
761
818
|
private _load;
|
|
762
|
-
private _getFeatureByName;
|
|
763
819
|
private _buildingFilterIconCreate;
|
|
764
820
|
private _buildingNameListCreate;
|
|
765
821
|
private _buildingNameListUpdate;
|
|
@@ -772,23 +828,179 @@ export declare class BuildingFilterControl implements maplibregl.IControl {
|
|
|
772
828
|
private _$showLayout;
|
|
773
829
|
private _$hideLayout;
|
|
774
830
|
}
|
|
775
|
-
export interface IResponseBuildings {
|
|
776
|
-
buildings: ISearchBuilding[];
|
|
777
|
-
total: number;
|
|
778
|
-
}
|
|
779
831
|
export interface IResponse<T> {
|
|
780
832
|
code: number;
|
|
781
833
|
message: string;
|
|
782
834
|
result: T;
|
|
783
835
|
}
|
|
836
|
+
export type IPresetLanguage = "en" | "zh-Hans" | "zh-Hant" | "ja" | "ko";
|
|
837
|
+
export interface IMultiLangName extends Partial<Record<IPresetLanguage, string>> {
|
|
838
|
+
default: string;
|
|
839
|
+
}
|
|
840
|
+
export type IMultiLangAddress = Record<keyof IMultiLangName, {
|
|
841
|
+
housenumber: string;
|
|
842
|
+
street: string;
|
|
843
|
+
}>;
|
|
844
|
+
export interface IBbox {
|
|
845
|
+
maxLat: number;
|
|
846
|
+
maxLon: string;
|
|
847
|
+
minLat: number;
|
|
848
|
+
minLon: number;
|
|
849
|
+
}
|
|
850
|
+
export interface ILabelCenter {
|
|
851
|
+
lat: number;
|
|
852
|
+
lon: number;
|
|
853
|
+
}
|
|
854
|
+
export interface IBuildingFloor {
|
|
855
|
+
id: string;
|
|
856
|
+
code: string;
|
|
857
|
+
ordinal: number;
|
|
858
|
+
visualMap: boolean;
|
|
859
|
+
signalMap: boolean;
|
|
860
|
+
}
|
|
861
|
+
export interface IBuilding {
|
|
862
|
+
address: IMultiLangAddress;
|
|
863
|
+
bbox: IBbox;
|
|
864
|
+
buildingId: string;
|
|
865
|
+
buildingOutlineId: number;
|
|
866
|
+
city?: string;
|
|
867
|
+
country: string;
|
|
868
|
+
floors: IBuildingFloor[];
|
|
869
|
+
groundFloor: string;
|
|
870
|
+
isPrivate: "yes" | "no";
|
|
871
|
+
labelCenter: ILabelCenter;
|
|
872
|
+
name: IMultiLangName;
|
|
873
|
+
organization: string;
|
|
874
|
+
region: string;
|
|
875
|
+
signalMap: boolean;
|
|
876
|
+
type: string;
|
|
877
|
+
venueId: string;
|
|
878
|
+
venueName: IMultiLangName;
|
|
879
|
+
defaultFloor?: string;
|
|
880
|
+
}
|
|
881
|
+
export interface IEntityPoint {
|
|
882
|
+
type: string;
|
|
883
|
+
coordinates: [
|
|
884
|
+
number,
|
|
885
|
+
number
|
|
886
|
+
];
|
|
887
|
+
}
|
|
888
|
+
export interface IVenueInlineBuilding {
|
|
889
|
+
id: string;
|
|
890
|
+
name: IMultiLangName;
|
|
891
|
+
buildingOutlineId: number;
|
|
892
|
+
point: IEntityPoint;
|
|
893
|
+
floors: IBuildingFloor[];
|
|
894
|
+
visualMap: boolean;
|
|
895
|
+
signalMap: boolean;
|
|
896
|
+
}
|
|
897
|
+
export interface IVenue {
|
|
898
|
+
id: string;
|
|
899
|
+
name: IMultiLangName;
|
|
900
|
+
address: IMultiLangAddress;
|
|
901
|
+
type: string;
|
|
902
|
+
venueOutlineId: number;
|
|
903
|
+
bbox: IBbox;
|
|
904
|
+
labelCenter: ILabelCenter;
|
|
905
|
+
point: IEntityPoint;
|
|
906
|
+
organization: string[];
|
|
907
|
+
restricted: boolean;
|
|
908
|
+
owner: string;
|
|
909
|
+
country: string;
|
|
910
|
+
region: string;
|
|
911
|
+
buildings: IVenueInlineBuilding[];
|
|
912
|
+
visualMap: boolean;
|
|
913
|
+
signalMap: boolean;
|
|
914
|
+
defaultBuilding?: string;
|
|
915
|
+
}
|
|
916
|
+
export interface IResponseVenues {
|
|
917
|
+
venues: IVenue[];
|
|
918
|
+
total: number;
|
|
919
|
+
}
|
|
920
|
+
export declare class VenuesService {
|
|
921
|
+
private _api;
|
|
922
|
+
private _request;
|
|
923
|
+
constructor();
|
|
924
|
+
/**
|
|
925
|
+
* @description Search venues by ids.
|
|
926
|
+
* @param ids The number of IDs cannot exceed 10.
|
|
927
|
+
*/
|
|
928
|
+
searchByIds(ids: string | string[]): AxiosPromise<IResponse<IResponseVenues>>;
|
|
929
|
+
/**
|
|
930
|
+
* @description Search venues by center and distance.
|
|
931
|
+
* @param keywords
|
|
932
|
+
* @param center
|
|
933
|
+
* @param distance Radius from center, unit is kilometers.
|
|
934
|
+
* @param offset The maximum value is 100, default is 10.
|
|
935
|
+
* @param page Default is 1.
|
|
936
|
+
*/
|
|
937
|
+
searchByDistance(keywords: string, center: [
|
|
938
|
+
number,
|
|
939
|
+
number
|
|
940
|
+
], distance: number, offset?: number, page?: number): AxiosPromise<IResponse<IResponseVenues>>;
|
|
941
|
+
/**
|
|
942
|
+
* @description Search venues in specified bbox.
|
|
943
|
+
* @param keywords
|
|
944
|
+
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
945
|
+
* @param offset The maximum value is 100, default is 10.
|
|
946
|
+
* @param page Default is 1.
|
|
947
|
+
*/
|
|
948
|
+
searchByBbox(keywords: string, bbox: [
|
|
949
|
+
number,
|
|
950
|
+
number,
|
|
951
|
+
number,
|
|
952
|
+
number
|
|
953
|
+
], offset?: number, page?: number): AxiosPromise<IResponse<IResponseVenues>>;
|
|
954
|
+
/**
|
|
955
|
+
* @description Search venues by global.
|
|
956
|
+
* @param keywords
|
|
957
|
+
* @param offset The maximum value is 100, default is 10.
|
|
958
|
+
* @param page Default is 1.
|
|
959
|
+
*/
|
|
960
|
+
searchByGlobal(keywords: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponseVenues>>;
|
|
961
|
+
}
|
|
962
|
+
export interface IResponseBuildings {
|
|
963
|
+
buildings: IBuilding[];
|
|
964
|
+
total: number;
|
|
965
|
+
}
|
|
784
966
|
export declare class BuildingsService {
|
|
785
967
|
private _api;
|
|
786
968
|
private _request;
|
|
787
969
|
constructor();
|
|
970
|
+
/**
|
|
971
|
+
* @description Search buildings by id[s].
|
|
972
|
+
* @param ids Single id string or id string array. The number of IDs cannot exceed 10.
|
|
973
|
+
*/
|
|
788
974
|
searchByIds(ids: string | string[]): AxiosPromise<IResponse<IResponseBuildings>>;
|
|
975
|
+
/**
|
|
976
|
+
* @description Search buildings by center and distance.
|
|
977
|
+
* @param keywords
|
|
978
|
+
* @param center
|
|
979
|
+
* @param distance Radius from center, unit is kilometers.
|
|
980
|
+
* @param offset The maximum value is 100, default is 10.
|
|
981
|
+
* @param page Default is 1.
|
|
982
|
+
*/
|
|
789
983
|
searchByDistance(keywords: string, center: number[], distance: number, offset?: number, page?: number): AxiosPromise<IResponse<IResponseBuildings>>;
|
|
984
|
+
/**
|
|
985
|
+
* @description Search buildings in specified bbox.
|
|
986
|
+
* @param keywords
|
|
987
|
+
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
988
|
+
* @param offset The maximum value is 100, default is 10.
|
|
989
|
+
* @param page Default is 1.
|
|
990
|
+
*/
|
|
790
991
|
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): AxiosPromise<IResponse<IResponseBuildings>>;
|
|
992
|
+
/**
|
|
993
|
+
* @description Search buildings global.
|
|
994
|
+
* @param keywords
|
|
995
|
+
* @param offset The maximum value is 100, default is 10.
|
|
996
|
+
* @param page Default is 1.
|
|
997
|
+
*/
|
|
791
998
|
searchByGlobal(keywords: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponseBuildings>>;
|
|
999
|
+
/**
|
|
1000
|
+
* @description Search building by floor id.
|
|
1001
|
+
* @param floorId
|
|
1002
|
+
*/
|
|
1003
|
+
searchByFloorId(floorId: string): AxiosPromise<IResponse<IResponseBuildings>>;
|
|
792
1004
|
private _changedRes;
|
|
793
1005
|
}
|
|
794
1006
|
export interface ILocation {
|
|
@@ -796,144 +1008,288 @@ export interface ILocation {
|
|
|
796
1008
|
lon: number;
|
|
797
1009
|
}
|
|
798
1010
|
export interface IPoi {
|
|
799
|
-
|
|
1011
|
+
accessibilityDetail: object;
|
|
800
1012
|
buildingId: string;
|
|
801
|
-
category
|
|
802
|
-
description?: string;
|
|
803
|
-
email?: string;
|
|
1013
|
+
category: string[];
|
|
804
1014
|
floor: string;
|
|
1015
|
+
floorId: string;
|
|
805
1016
|
id: string;
|
|
806
1017
|
location: ILocation;
|
|
807
1018
|
name: IMultiLangName;
|
|
1019
|
+
osmRefId: number;
|
|
1020
|
+
poiId: string;
|
|
1021
|
+
venueId: string;
|
|
1022
|
+
description?: string;
|
|
1023
|
+
email?: string;
|
|
808
1024
|
openingHours?: string;
|
|
809
|
-
osmRefId?: number;
|
|
810
1025
|
phone?: string;
|
|
811
|
-
poiId?: string;
|
|
812
1026
|
website?: string;
|
|
813
1027
|
}
|
|
814
1028
|
export interface IResponsePois {
|
|
815
1029
|
pois: IPoi[];
|
|
816
1030
|
total: number;
|
|
817
1031
|
}
|
|
1032
|
+
export interface IPoiCategory {
|
|
1033
|
+
category: string;
|
|
1034
|
+
description: string;
|
|
1035
|
+
id: string;
|
|
1036
|
+
title: Partial<Record<keyof IMultiLangName, string>>;
|
|
1037
|
+
}
|
|
818
1038
|
export interface IOrientationPoi {
|
|
819
1039
|
angle: number;
|
|
820
1040
|
buildingId: string;
|
|
1041
|
+
category: string[];
|
|
821
1042
|
distance: number;
|
|
1043
|
+
distanceSource: string;
|
|
822
1044
|
floor: string;
|
|
1045
|
+
floorId: string;
|
|
1046
|
+
id: string;
|
|
823
1047
|
location: ILocation;
|
|
824
|
-
name:
|
|
1048
|
+
name: IMultiLangName;
|
|
1049
|
+
osmRefId: number;
|
|
825
1050
|
poiId: string;
|
|
826
1051
|
}
|
|
827
|
-
export interface IResponseOrientationPoi {
|
|
828
|
-
orientationPois: IOrientationPoi[];
|
|
829
|
-
total: number;
|
|
830
|
-
}
|
|
831
1052
|
export declare class PoisService {
|
|
832
1053
|
private _api;
|
|
833
1054
|
private _categories;
|
|
1055
|
+
private _categoriesV2;
|
|
834
1056
|
private _request;
|
|
835
1057
|
constructor();
|
|
836
1058
|
/**
|
|
837
|
-
* Search
|
|
838
|
-
*
|
|
839
|
-
* @param ids: string | string[]
|
|
1059
|
+
* @description Search POIs by id[s].
|
|
1060
|
+
* @param ids Single id string or id string array. The number of IDs cannot exceed 100.
|
|
840
1061
|
*/
|
|
841
1062
|
searchByIds(ids: string | string[]): AxiosPromise<IResponse<IResponsePois>>;
|
|
842
1063
|
/**
|
|
843
|
-
* Search
|
|
844
|
-
*
|
|
845
|
-
* @param
|
|
846
|
-
* @param center
|
|
847
|
-
* @param
|
|
848
|
-
* @param
|
|
849
|
-
* @param page default 1
|
|
1064
|
+
* @description Search POIs by radius distance of the center point.
|
|
1065
|
+
* @param category
|
|
1066
|
+
* @param center
|
|
1067
|
+
* @param distance Radius from center, unit is meter, cannot exceed 10,000.
|
|
1068
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1069
|
+
* @param page Default is 1.
|
|
850
1070
|
*/
|
|
851
1071
|
searchByDistance(category: string, center: number[], distance: number, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
852
1072
|
/**
|
|
853
|
-
* Search
|
|
854
|
-
*
|
|
855
|
-
* @param
|
|
856
|
-
* @param
|
|
857
|
-
* @param
|
|
858
|
-
* @param page default 1
|
|
1073
|
+
* @description Search POIs in a bbox.
|
|
1074
|
+
* @param keywords
|
|
1075
|
+
* @param bbox Rectangular area, [minLon, minLat, maxLon, maxLat].
|
|
1076
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1077
|
+
* @param page Default is 1.
|
|
859
1078
|
*/
|
|
860
1079
|
searchByBbox(keywords: string, bbox: number[], offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
861
1080
|
/**
|
|
862
|
-
* Search
|
|
863
|
-
*
|
|
864
|
-
* @param
|
|
865
|
-
* @param
|
|
866
|
-
* @param
|
|
867
|
-
* @param page default 1
|
|
1081
|
+
* @description Search POIs of a building.
|
|
1082
|
+
* @param keywords
|
|
1083
|
+
* @param buildingId
|
|
1084
|
+
* @param offset The maximum value is 100, default is 10.
|
|
1085
|
+
* @param page Default is 1.
|
|
868
1086
|
*/
|
|
869
1087
|
searchByBuildingId(keywords: string, buildingId: string, offset?: number, page?: number): AxiosPromise<IResponse<IResponsePois>>;
|
|
870
1088
|
/**
|
|
871
|
-
* Search
|
|
872
|
-
*
|
|
1089
|
+
* @description Search POI categories by building id or floor name
|
|
1090
|
+
* @deprecated You can use 'searchCategories' instead
|
|
873
1091
|
* @param buildingId within the building
|
|
874
1092
|
* @param floor option param, within floor
|
|
875
1093
|
*/
|
|
876
1094
|
searchCategory(buildingId: string, floor?: string): AxiosPromise<IResponse<string[]>>;
|
|
877
1095
|
/**
|
|
878
|
-
* Search
|
|
879
|
-
*
|
|
880
|
-
* @param
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
* @
|
|
885
|
-
* @param
|
|
886
|
-
|
|
887
|
-
|
|
1096
|
+
* @description Search poi categories by building id and floor id.
|
|
1097
|
+
* @param buildingId
|
|
1098
|
+
* @param floorId
|
|
1099
|
+
*/
|
|
1100
|
+
searchCategories(buildingId: string, floorId?: string): AxiosPromise<IResponse<IPoiCategory[]>>;
|
|
1101
|
+
/**
|
|
1102
|
+
* @description Search orientation and poi
|
|
1103
|
+
* @param angle The angle between cellphone's orientation and the north.
|
|
1104
|
+
* @param buildingId
|
|
1105
|
+
* @param center User's current position, [lon, lat].
|
|
1106
|
+
* @param distance Radius from center, unit is meter.
|
|
1107
|
+
* @param distanceSearchType Search type, default is DistanceSearchType.POINT.
|
|
1108
|
+
* @param floorId
|
|
1109
|
+
*/
|
|
1110
|
+
searchOrientation(angle: number, buildingId: string, center: number[], distance: number, distanceSearchType?: string, floorId?: string): AxiosPromise<IResponse<IOrientationPoi[]>>;
|
|
888
1111
|
private _changedRes;
|
|
889
1112
|
}
|
|
890
1113
|
export interface IResponseRoute {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
paths: IRoutePaths[];
|
|
894
|
-
}
|
|
895
|
-
export interface IRouteHints {
|
|
896
|
-
"visited_nodes.average": string;
|
|
897
|
-
"visited_nodes.sum": string;
|
|
1114
|
+
infos: IRouteInfo | null;
|
|
1115
|
+
paths: IRoutePath[];
|
|
898
1116
|
}
|
|
899
1117
|
export interface IRouteInfo {
|
|
900
1118
|
copyrights: string[];
|
|
901
1119
|
took: number;
|
|
902
1120
|
}
|
|
903
|
-
export interface
|
|
904
|
-
|
|
905
|
-
bbox: number[];
|
|
906
|
-
descend: number;
|
|
907
|
-
details: object;
|
|
1121
|
+
export interface IInstruction {
|
|
1122
|
+
building_id: string;
|
|
908
1123
|
distance: number;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1124
|
+
floor_id: string;
|
|
1125
|
+
heading: number;
|
|
1126
|
+
interval: [
|
|
1127
|
+
number,
|
|
1128
|
+
number
|
|
1129
|
+
];
|
|
1130
|
+
ordinal: number;
|
|
1131
|
+
sign: number;
|
|
1132
|
+
street_name: string;
|
|
1133
|
+
text: string;
|
|
914
1134
|
time: number;
|
|
915
|
-
|
|
916
|
-
|
|
1135
|
+
type: string | null;
|
|
1136
|
+
venue_id: string;
|
|
1137
|
+
}
|
|
1138
|
+
export interface IRoutePath {
|
|
1139
|
+
bbox: [
|
|
1140
|
+
number,
|
|
1141
|
+
number,
|
|
1142
|
+
number,
|
|
1143
|
+
number
|
|
1144
|
+
];
|
|
1145
|
+
distance: number;
|
|
1146
|
+
instructions: IInstruction[];
|
|
1147
|
+
points: {
|
|
1148
|
+
coordinates: Array<[
|
|
1149
|
+
number,
|
|
1150
|
+
number
|
|
1151
|
+
]>;
|
|
1152
|
+
type: string;
|
|
1153
|
+
};
|
|
1154
|
+
snapped_waypoints: {
|
|
1155
|
+
coordinates: Array<[
|
|
1156
|
+
number,
|
|
1157
|
+
number
|
|
1158
|
+
]>;
|
|
1159
|
+
type: string;
|
|
1160
|
+
};
|
|
1161
|
+
time: number;
|
|
1162
|
+
}
|
|
1163
|
+
export declare enum WayFindingVehicleType {
|
|
1164
|
+
FOOT = "foot",
|
|
1165
|
+
WHEELCHAIR = "wheelchair",
|
|
1166
|
+
ESCALATOR = "escalator"
|
|
917
1167
|
}
|
|
918
1168
|
export declare class RouteService {
|
|
919
1169
|
private _api;
|
|
920
1170
|
private _request;
|
|
921
1171
|
constructor();
|
|
922
1172
|
/**
|
|
923
|
-
* Search
|
|
924
|
-
*
|
|
925
|
-
* @param
|
|
926
|
-
* @param
|
|
927
|
-
* @param
|
|
928
|
-
* @param
|
|
929
|
-
* @param
|
|
930
|
-
* @param
|
|
931
|
-
* @param
|
|
932
|
-
* @param
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1173
|
+
* @description Search the route of any two points.
|
|
1174
|
+
* @param fromCoordinate Coordinate [lng, lat] of start point.
|
|
1175
|
+
* @param toCoordinate Coordinate [lng, lat] of end point.
|
|
1176
|
+
* @param fromFloorId {string | null}
|
|
1177
|
+
* @param toFloorId {string | null}
|
|
1178
|
+
* @param fromBuildingId {string | null}
|
|
1179
|
+
* @param toBuildingId {string | null}
|
|
1180
|
+
* @param vehicle
|
|
1181
|
+
* @param locale Language-specific response.
|
|
1182
|
+
* @param toDoor Whether the end point of the route is in the room(otherwise at the door), default is "true".
|
|
1183
|
+
*/
|
|
1184
|
+
search(fromCoordinate: [
|
|
1185
|
+
number,
|
|
1186
|
+
number
|
|
1187
|
+
], toCoordinate: [
|
|
1188
|
+
number,
|
|
1189
|
+
number
|
|
1190
|
+
], fromFloorId: string | null, toFloorId: string | null, fromBuildingId: string | null, toBuildingId: string | null, vehicle?: WayFindingVehicleType, locale?: string, toDoor?: boolean): AxiosPromise<IResponse<IResponseRoute>>;
|
|
1191
|
+
}
|
|
1192
|
+
export declare class RoutePainter {
|
|
1193
|
+
private _maplibreMap;
|
|
1194
|
+
private _fromCoordinate;
|
|
1195
|
+
private _toCoordinate;
|
|
1196
|
+
private _fromMarkerIcon;
|
|
1197
|
+
private _toMarkerIcon;
|
|
1198
|
+
private _markerIconSize;
|
|
1199
|
+
private _paintProperties;
|
|
1200
|
+
constructor(maplibreMap: MaplibreMap);
|
|
1201
|
+
/**
|
|
1202
|
+
* @description Set image of the start marker.
|
|
1203
|
+
* @param icon Sprite name in map style or the image url, png format.
|
|
1204
|
+
*/
|
|
1205
|
+
setFromMarkerIcon(icon: string): this;
|
|
1206
|
+
/**
|
|
1207
|
+
* @description Set image of the end marker.
|
|
1208
|
+
* @param icon Sprite name in map style or the image url, png format.
|
|
1209
|
+
*/
|
|
1210
|
+
setToMarkerIcon(icon: string): this;
|
|
1211
|
+
/**
|
|
1212
|
+
* @description Set image icon scale.
|
|
1213
|
+
* @param size Default is 1.
|
|
1214
|
+
*/
|
|
1215
|
+
setMarkerIconSize(size: number): this;
|
|
1216
|
+
/**
|
|
1217
|
+
* @description Set the route color of the indoor part.
|
|
1218
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1219
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1220
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1221
|
+
*/
|
|
1222
|
+
setIndoorLineColor(color: string): this;
|
|
1223
|
+
/**
|
|
1224
|
+
* @description Set the route color of the outdoor part.
|
|
1225
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1226
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1227
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1228
|
+
*/
|
|
1229
|
+
setOutdoorLineColor(color: string): this;
|
|
1230
|
+
/**
|
|
1231
|
+
* @description Set color of dashed line which connected the start and end markers.
|
|
1232
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1233
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1234
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1235
|
+
*/
|
|
1236
|
+
setDashedLineColor(color: string): this;
|
|
1237
|
+
/**
|
|
1238
|
+
* @description Set color of shuttle bus line.
|
|
1239
|
+
* @param color The color type is a color in the sRGB color space.
|
|
1240
|
+
* Formats: HTML-style hex values, RGB, RGBA, HSL, and HSLA.
|
|
1241
|
+
* Predefined HTML colors names, like yellow and blue, are also permitted.
|
|
1242
|
+
*/
|
|
1243
|
+
setBusLineColor(color: string): this;
|
|
1244
|
+
/**
|
|
1245
|
+
* @description Render route on the map.
|
|
1246
|
+
* @param path Route path from RouteService.search response.
|
|
1247
|
+
* @param fromCoordinate Coordinate [lng, lat] of start point.
|
|
1248
|
+
* @param toCoordinate Coordinate [lng, lat] of end point.
|
|
1249
|
+
*/
|
|
1250
|
+
render(path: IRoutePath, fromCoordinate: [
|
|
1251
|
+
number,
|
|
1252
|
+
number
|
|
1253
|
+
], toCoordinate: [
|
|
1254
|
+
number,
|
|
1255
|
+
number
|
|
1256
|
+
]): this;
|
|
1257
|
+
/**
|
|
1258
|
+
* @description Remove route from the map.
|
|
1259
|
+
*/
|
|
1260
|
+
remove(): this;
|
|
1261
|
+
/**
|
|
1262
|
+
* @description Filter paths' opacity by venue and ordinal.
|
|
1263
|
+
* @param venueId {string | null | undefined}
|
|
1264
|
+
* @param ordinal {string | null | undefined}
|
|
1265
|
+
*/
|
|
1266
|
+
setFilterByVenue(venueId: string | null | undefined, ordinal: string | null | undefined): this;
|
|
1267
|
+
/**
|
|
1268
|
+
* @description Filter paths' opacity by building and ordinal.
|
|
1269
|
+
* @param buildingId {string | null | undefined}
|
|
1270
|
+
* @param ordinal {string | null | undefined}
|
|
1271
|
+
*/
|
|
1272
|
+
setFilterByBuilding(buildingId: string | null | undefined, ordinal: string | null | undefined): this;
|
|
1273
|
+
private _loadImage;
|
|
1274
|
+
private _classifyFeatures;
|
|
1275
|
+
private _createLineFeature;
|
|
1276
|
+
private _createIconFeature;
|
|
1277
|
+
private _renderSolidLines;
|
|
1278
|
+
private _renderDashedLines;
|
|
1279
|
+
private _renderConnectors;
|
|
1280
|
+
private _renderFromToMarkers;
|
|
1281
|
+
private _addCollectionSource;
|
|
1282
|
+
private _addLineLayer;
|
|
1283
|
+
private _addTriangleLayer;
|
|
1284
|
+
private _addIconLayer;
|
|
1285
|
+
}
|
|
1286
|
+
export declare const OFFSET: number;
|
|
1287
|
+
export declare const PAGE: number;
|
|
1288
|
+
export declare enum DistanceSearchType {
|
|
1289
|
+
POINT = "Point",
|
|
1290
|
+
POLYGON = "Polygon"
|
|
936
1291
|
}
|
|
937
1292
|
export declare const version: string;
|
|
1293
|
+
export type { ControlPosition, Map as MaplibreMap, MapLayerEventType, FilterSpecification, PointLike, } from "maplibre-gl";
|
|
938
1294
|
|
|
939
1295
|
export {};
|