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