venue-js 1.0.0-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 +19 -0
- package/dist/index.d.mts +1158 -0
- package/dist/index.d.ts +1158 -0
- package/dist/index.js +5170 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5125 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1158 @@
|
|
|
1
|
+
import { QueryClient, QueryObserver, EnsureQueryDataOptions } from '@tanstack/query-core';
|
|
2
|
+
export { QueryObserver } from '@tanstack/query-core';
|
|
3
|
+
import * as geojson from 'geojson';
|
|
4
|
+
import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
|
|
5
|
+
import * as maptalks from 'maptalks';
|
|
6
|
+
import { Coordinate, Map, MapAnimationOptionsType, MapViewType, HandlerFn, EventParams, MapPaddingType, Extent, Marker, ui, LineString as LineString$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, MultiLineString } from 'maptalks';
|
|
7
|
+
import { ThreeLayer, BaseObject } from 'maptalks.three';
|
|
8
|
+
import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
|
|
9
|
+
import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
|
|
10
|
+
|
|
11
|
+
type Id = string;
|
|
12
|
+
type MediaFile = {
|
|
13
|
+
ext: string;
|
|
14
|
+
hash: string;
|
|
15
|
+
height: number;
|
|
16
|
+
mime: string;
|
|
17
|
+
name: string;
|
|
18
|
+
path: string | null;
|
|
19
|
+
size: number;
|
|
20
|
+
url: string;
|
|
21
|
+
width: number;
|
|
22
|
+
};
|
|
23
|
+
type Media = MediaFile & {
|
|
24
|
+
id: Id;
|
|
25
|
+
alternativeText: string | null;
|
|
26
|
+
caption: string | null;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
ext: string;
|
|
29
|
+
folderPath: string;
|
|
30
|
+
formats: Record<string, MediaFile>;
|
|
31
|
+
previewUrl: string | null;
|
|
32
|
+
provider: string;
|
|
33
|
+
provider_metadata: string | null;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
};
|
|
36
|
+
type Model3d = {
|
|
37
|
+
id: Id;
|
|
38
|
+
name: string;
|
|
39
|
+
properties: {
|
|
40
|
+
position: Position;
|
|
41
|
+
rotation: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
z?: number;
|
|
45
|
+
};
|
|
46
|
+
scale: [number, number, number];
|
|
47
|
+
url: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
type EntityTimestamps = {
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
publishedAt: string;
|
|
54
|
+
};
|
|
55
|
+
type SymbolProperties = {
|
|
56
|
+
lineColor?: string;
|
|
57
|
+
lineWidth?: string;
|
|
58
|
+
lineDasharray?: string;
|
|
59
|
+
lineOpacity?: string;
|
|
60
|
+
lineJoin?: string;
|
|
61
|
+
lineCap?: string;
|
|
62
|
+
linePatternFile?: string;
|
|
63
|
+
lineDx?: string;
|
|
64
|
+
lineDy?: string;
|
|
65
|
+
polygonFill?: string;
|
|
66
|
+
polygonOpacity?: string;
|
|
67
|
+
polygonPatternFile?: string;
|
|
68
|
+
};
|
|
69
|
+
type TransalatableString = Record<string, string>;
|
|
70
|
+
type ImdfFeature<G extends Geometry | null = Geometry, P = GeoJsonProperties> = Feature<G, P> & {
|
|
71
|
+
id: Id;
|
|
72
|
+
feature_type: string;
|
|
73
|
+
};
|
|
74
|
+
type AnchorGeometry = Point;
|
|
75
|
+
type AnchorProperties = EntityTimestamps & {
|
|
76
|
+
address_id: Id | null;
|
|
77
|
+
unit_id: Id;
|
|
78
|
+
locale: string;
|
|
79
|
+
};
|
|
80
|
+
type AnchorFeature = ImdfFeature<AnchorGeometry, AnchorProperties>;
|
|
81
|
+
type AmenityGeometry = Point;
|
|
82
|
+
type AmenityProperties = EntityTimestamps & {
|
|
83
|
+
amenity_logo: Media | null;
|
|
84
|
+
category: string;
|
|
85
|
+
description: TransalatableString | null;
|
|
86
|
+
gallery: Media[];
|
|
87
|
+
isNavigatable: boolean;
|
|
88
|
+
is_featured: boolean;
|
|
89
|
+
level_id: Id;
|
|
90
|
+
location_description: string;
|
|
91
|
+
logo: Media | null;
|
|
92
|
+
name: TransalatableString | null;
|
|
93
|
+
style: unknown;
|
|
94
|
+
unit_ids: Id[];
|
|
95
|
+
venue_id: Id;
|
|
96
|
+
};
|
|
97
|
+
type AmenityFeature = ImdfFeature<AmenityGeometry, AmenityProperties> & {
|
|
98
|
+
feature_type: "amenity";
|
|
99
|
+
};
|
|
100
|
+
type DetailGeometry = Point;
|
|
101
|
+
type DetailProperties = {
|
|
102
|
+
level_id: Id;
|
|
103
|
+
[k: string]: any;
|
|
104
|
+
};
|
|
105
|
+
type DetailFeature = ImdfFeature<DetailGeometry, DetailProperties>;
|
|
106
|
+
type FixtureGeometry = Point;
|
|
107
|
+
type FixtureProperties = EntityTimestamps & {
|
|
108
|
+
anchor_id: Id | null;
|
|
109
|
+
category: string;
|
|
110
|
+
is_landmark: boolean;
|
|
111
|
+
level_id: Id;
|
|
112
|
+
locale: string;
|
|
113
|
+
model3d: Model3d[];
|
|
114
|
+
name: string | null;
|
|
115
|
+
style: SymbolProperties;
|
|
116
|
+
venue_id: Id;
|
|
117
|
+
[k: string]: any;
|
|
118
|
+
};
|
|
119
|
+
type FixtureFeature = ImdfFeature<FixtureGeometry, FixtureProperties>;
|
|
120
|
+
type KioskGeometry = Polygon | MultiPolygon;
|
|
121
|
+
type KioskProperties = EntityTimestamps & {
|
|
122
|
+
alt_name: string;
|
|
123
|
+
anchor_id: Id;
|
|
124
|
+
is_landmark: boolean;
|
|
125
|
+
level_id: Id;
|
|
126
|
+
locale: string;
|
|
127
|
+
model3d: Model3d[];
|
|
128
|
+
name: TransalatableString;
|
|
129
|
+
style: SymbolProperties;
|
|
130
|
+
venue_id: Id;
|
|
131
|
+
};
|
|
132
|
+
type KioskFeature = ImdfFeature<KioskGeometry, KioskProperties>;
|
|
133
|
+
type LevelGeometry = Polygon | MultiPolygon;
|
|
134
|
+
type LevelProperties = EntityTimestamps & {
|
|
135
|
+
alt_name: string | null;
|
|
136
|
+
display_point: Point;
|
|
137
|
+
name: TransalatableString;
|
|
138
|
+
ordinal: number;
|
|
139
|
+
properties: unknown;
|
|
140
|
+
venue_id: Id;
|
|
141
|
+
};
|
|
142
|
+
type LevelFeature = ImdfFeature<LevelGeometry, LevelProperties>;
|
|
143
|
+
type OccupantGeometry = null;
|
|
144
|
+
type OccupantProperties = EntityTimestamps & {
|
|
145
|
+
anchor_id: Id;
|
|
146
|
+
category: string;
|
|
147
|
+
cover_image: Media | null;
|
|
148
|
+
description: TransalatableString;
|
|
149
|
+
featured_image: Media | null;
|
|
150
|
+
gallery: Media[] | null;
|
|
151
|
+
group_ids: Id[];
|
|
152
|
+
hours: string;
|
|
153
|
+
is_featured: boolean;
|
|
154
|
+
is_landmark: boolean;
|
|
155
|
+
is_maintenance: boolean;
|
|
156
|
+
keywords: string[];
|
|
157
|
+
kiosk_id: Id | null;
|
|
158
|
+
local_category_ids: Id[];
|
|
159
|
+
logo: Media | null;
|
|
160
|
+
maintenance_end_date: string | null;
|
|
161
|
+
maintenance_start_date: string | null;
|
|
162
|
+
name: TransalatableString;
|
|
163
|
+
phone: string | null;
|
|
164
|
+
privilege_ids: Id[];
|
|
165
|
+
promotion_ids: Id[];
|
|
166
|
+
render_priority: number;
|
|
167
|
+
render_type: string;
|
|
168
|
+
room_no: string | null;
|
|
169
|
+
short_name: string | null;
|
|
170
|
+
start_date: string;
|
|
171
|
+
style: SymbolProperties | null;
|
|
172
|
+
temp_anchor_id: Id | null;
|
|
173
|
+
temp_kiosk_id: Id | null;
|
|
174
|
+
temp_unit_id: Id | null;
|
|
175
|
+
unit_id: Id | null;
|
|
176
|
+
venue_id: Id;
|
|
177
|
+
kiosk_ids: Id[];
|
|
178
|
+
unit_ids: Id[];
|
|
179
|
+
website_link: string | null;
|
|
180
|
+
};
|
|
181
|
+
type OccupantFeature = ImdfFeature<OccupantGeometry, OccupantProperties>;
|
|
182
|
+
type OpeningGeometry = LineString;
|
|
183
|
+
type OpeningProperties = EntityTimestamps & {
|
|
184
|
+
alt_name: string;
|
|
185
|
+
category: string;
|
|
186
|
+
door: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
level_id: Id;
|
|
190
|
+
name: TransalatableString;
|
|
191
|
+
style: SymbolProperties;
|
|
192
|
+
venue_id: Id;
|
|
193
|
+
};
|
|
194
|
+
type OpeningFeature = ImdfFeature<OpeningGeometry, OpeningProperties>;
|
|
195
|
+
type RelationshipGeometry = Geometry | null;
|
|
196
|
+
type RelationshipProperties = EntityTimestamps & {
|
|
197
|
+
category: string;
|
|
198
|
+
destination: {
|
|
199
|
+
id: Id;
|
|
200
|
+
feature_type: FeatureType;
|
|
201
|
+
};
|
|
202
|
+
direction: string;
|
|
203
|
+
hours: string | null;
|
|
204
|
+
intermediary: {
|
|
205
|
+
id: Id;
|
|
206
|
+
feature_type: FeatureType;
|
|
207
|
+
}[];
|
|
208
|
+
locale: string;
|
|
209
|
+
name: TransalatableString;
|
|
210
|
+
origin: {
|
|
211
|
+
id: Id;
|
|
212
|
+
feature_type: FeatureType;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
type RelationshipFeature = ImdfFeature<RelationshipGeometry, RelationshipProperties>;
|
|
216
|
+
type SectionGeometry = Polygon | MultiPolygon;
|
|
217
|
+
type SectionProperties = EntityTimestamps & {
|
|
218
|
+
venue_id: Id;
|
|
219
|
+
level_id: Id;
|
|
220
|
+
correlation_id: Id | null;
|
|
221
|
+
category: string;
|
|
222
|
+
ordinal: number;
|
|
223
|
+
imdf_category: string;
|
|
224
|
+
[k: string]: any;
|
|
225
|
+
};
|
|
226
|
+
type SectionFeature = ImdfFeature<SectionGeometry, SectionProperties>;
|
|
227
|
+
type UnitGeometry = Polygon | MultiPolygon;
|
|
228
|
+
type UnitProperties = EntityTimestamps & {
|
|
229
|
+
alt_name: string | null;
|
|
230
|
+
category: string;
|
|
231
|
+
is_landmark: boolean;
|
|
232
|
+
level_id: Id;
|
|
233
|
+
locale: string;
|
|
234
|
+
model3d: Model3d[];
|
|
235
|
+
name: TransalatableString;
|
|
236
|
+
style: SymbolProperties;
|
|
237
|
+
venue_id: Id;
|
|
238
|
+
};
|
|
239
|
+
type UnitFeature = ImdfFeature<UnitGeometry, UnitProperties>;
|
|
240
|
+
type VenueGeometry = Polygon | MultiPolygon;
|
|
241
|
+
type VenueProperties = EntityTimestamps & {
|
|
242
|
+
address: string;
|
|
243
|
+
address_id: Id | null;
|
|
244
|
+
country: string;
|
|
245
|
+
display_point: Point;
|
|
246
|
+
hours: string;
|
|
247
|
+
imdf_category: string;
|
|
248
|
+
locale: string;
|
|
249
|
+
locality: string;
|
|
250
|
+
logo: Media | null;
|
|
251
|
+
logo_simple: Media | null;
|
|
252
|
+
model3d: Model3d[];
|
|
253
|
+
name: TransalatableString;
|
|
254
|
+
phone: string;
|
|
255
|
+
postal_code: string;
|
|
256
|
+
province: string;
|
|
257
|
+
reference: string;
|
|
258
|
+
style: SymbolProperties | null;
|
|
259
|
+
supported_locales: string[];
|
|
260
|
+
theme_color: string;
|
|
261
|
+
zoom: string | null;
|
|
262
|
+
};
|
|
263
|
+
type VenueFeature = ImdfFeature<VenueGeometry, VenueProperties>;
|
|
264
|
+
/**
|
|
265
|
+
* Non-IMDF
|
|
266
|
+
*********************** */
|
|
267
|
+
type TaxonomyGeometry = null;
|
|
268
|
+
type TaxonomyProperties = EntityTimestamps & {
|
|
269
|
+
description: string;
|
|
270
|
+
icon_image: string;
|
|
271
|
+
icon_path: string;
|
|
272
|
+
is_featured: boolean;
|
|
273
|
+
local_id: string;
|
|
274
|
+
locale: string;
|
|
275
|
+
name: TransalatableString;
|
|
276
|
+
order: number;
|
|
277
|
+
parent_id: Id | null;
|
|
278
|
+
reference: string;
|
|
279
|
+
taxonomy: string;
|
|
280
|
+
venue_id: Id | null;
|
|
281
|
+
};
|
|
282
|
+
type TaxonomyFeature = ImdfFeature<TaxonomyGeometry, TaxonomyProperties>;
|
|
283
|
+
type EventGeometry = Polygon;
|
|
284
|
+
type EventProperties = {
|
|
285
|
+
name: string;
|
|
286
|
+
ordinal: number;
|
|
287
|
+
venue_id: Id;
|
|
288
|
+
angle: number;
|
|
289
|
+
fontSize: number;
|
|
290
|
+
};
|
|
291
|
+
type EventFeature = ImdfFeature<EventGeometry, EventProperties>;
|
|
292
|
+
type PromotionProperties = {
|
|
293
|
+
name: TransalatableString;
|
|
294
|
+
category: string;
|
|
295
|
+
cover_image: Media;
|
|
296
|
+
daily_end_time: string;
|
|
297
|
+
daily_start_time: string;
|
|
298
|
+
description: TransalatableString;
|
|
299
|
+
end_date: string;
|
|
300
|
+
feature_id: string | null;
|
|
301
|
+
gallery: Media[];
|
|
302
|
+
is_featured: boolean;
|
|
303
|
+
local_category_ids: string[];
|
|
304
|
+
locale: string;
|
|
305
|
+
publishedAt: string;
|
|
306
|
+
start_date: string;
|
|
307
|
+
updatedAt: string;
|
|
308
|
+
venue_id: Id;
|
|
309
|
+
website_link: string | null;
|
|
310
|
+
};
|
|
311
|
+
type PromotionFeature = ImdfFeature<null, PromotionProperties>;
|
|
312
|
+
type PrivilegeGeometry = null;
|
|
313
|
+
type PrivilegeProperties = {
|
|
314
|
+
createdAt: string;
|
|
315
|
+
description: TransalatableString;
|
|
316
|
+
locale: string;
|
|
317
|
+
occupant_id: Id;
|
|
318
|
+
publishedAt: string;
|
|
319
|
+
updatedAt: string;
|
|
320
|
+
venue_id: Id;
|
|
321
|
+
};
|
|
322
|
+
type PrivilegeFeature = ImdfFeature<PrivilegeGeometry, PrivilegeProperties>;
|
|
323
|
+
type LabelGeometry = {
|
|
324
|
+
geometry_type: string;
|
|
325
|
+
cooordinates: Position[][];
|
|
326
|
+
};
|
|
327
|
+
type LabelProperties = {
|
|
328
|
+
name: string;
|
|
329
|
+
ordinal: number;
|
|
330
|
+
venue_id: Id;
|
|
331
|
+
angle: number;
|
|
332
|
+
fontSize: number;
|
|
333
|
+
};
|
|
334
|
+
type LabelFeature = {
|
|
335
|
+
type: "Feature";
|
|
336
|
+
geometry: LabelGeometry;
|
|
337
|
+
id: Id;
|
|
338
|
+
properties: LabelProperties;
|
|
339
|
+
};
|
|
340
|
+
type ElementGeometry = null;
|
|
341
|
+
type ElementProperties = EntityTimestamps & {
|
|
342
|
+
geometries: Array<{
|
|
343
|
+
type: string;
|
|
344
|
+
id: Id;
|
|
345
|
+
geometry: Exclude<Geometry, GeometryCollection>;
|
|
346
|
+
options: Record<string, unknown>;
|
|
347
|
+
properties: {
|
|
348
|
+
additionalField: string;
|
|
349
|
+
name: string | null;
|
|
350
|
+
image: Media | null;
|
|
351
|
+
ordinal: number;
|
|
352
|
+
};
|
|
353
|
+
}>;
|
|
354
|
+
locale: string;
|
|
355
|
+
name: TransalatableString;
|
|
356
|
+
};
|
|
357
|
+
type ElementFeature = ImdfFeature<ElementGeometry, ElementProperties>;
|
|
358
|
+
/**
|
|
359
|
+
* Sponsored Content
|
|
360
|
+
*/
|
|
361
|
+
type SponsoredContentLegacyType = "HOMEPAGE_SPOTLIGHT" | "SCREENSAVER" | "SUGGESTED_BRAND" | "SEARCH_RESULT" | "POPUP_BANNER" | "FOOTER_BANNER" | "RECOMMENDED_EVENT" | "RECOMMENDED_PROMOTION" | "RECOMMENDED_DIRECTORY";
|
|
362
|
+
type SponsoredContentPlacementType = "HOMEPAGE_SPOTLIGHT" | "SEARCH_SUGGESTION" | "SEARCH_RESULT" | "LIST_TOPITEM" | "POPUP_BANNER" | "FOOTER_BANNER";
|
|
363
|
+
type SponsoredContentAttributes = {
|
|
364
|
+
venue_id: string;
|
|
365
|
+
project_id: string;
|
|
366
|
+
name: {
|
|
367
|
+
en: string;
|
|
368
|
+
};
|
|
369
|
+
type: SponsoredContentLegacyType;
|
|
370
|
+
placement_type: SponsoredContentPlacementType;
|
|
371
|
+
start_date: string;
|
|
372
|
+
end_date: string;
|
|
373
|
+
daily_start_time: string;
|
|
374
|
+
daily_end_time: string;
|
|
375
|
+
order: number;
|
|
376
|
+
url: string | null;
|
|
377
|
+
feature_id: string | null;
|
|
378
|
+
createdAt: string;
|
|
379
|
+
updatedAt: string;
|
|
380
|
+
publishedAt: string;
|
|
381
|
+
media?: Media;
|
|
382
|
+
locale: string;
|
|
383
|
+
};
|
|
384
|
+
type SponsoredContentStrapiV4ApiResponse = {
|
|
385
|
+
id: string;
|
|
386
|
+
attributes: SponsoredContentAttributes;
|
|
387
|
+
};
|
|
388
|
+
/** Parsed for internal use */
|
|
389
|
+
type SponsoredContentFeature = SponsoredContentAttributes & {
|
|
390
|
+
id: string;
|
|
391
|
+
};
|
|
392
|
+
type Page = {
|
|
393
|
+
id: Id;
|
|
394
|
+
attributes: Record<string, unknown>;
|
|
395
|
+
};
|
|
396
|
+
type FeatureResponseMap = {
|
|
397
|
+
address: ImdfFeature;
|
|
398
|
+
amenity: AmenityFeature;
|
|
399
|
+
anchor: AnchorFeature;
|
|
400
|
+
building: ImdfFeature;
|
|
401
|
+
detail: DetailFeature;
|
|
402
|
+
fixture: FixtureFeature;
|
|
403
|
+
footprint: ImdfFeature;
|
|
404
|
+
geofence: ImdfFeature;
|
|
405
|
+
kiosk: KioskFeature;
|
|
406
|
+
level: LevelFeature;
|
|
407
|
+
occupant: OccupantFeature;
|
|
408
|
+
opening: OpeningFeature;
|
|
409
|
+
relationship: RelationshipFeature;
|
|
410
|
+
section: SectionFeature;
|
|
411
|
+
unit: UnitFeature;
|
|
412
|
+
venue: VenueFeature;
|
|
413
|
+
taxonomy: TaxonomyFeature;
|
|
414
|
+
privilege: PrivilegeFeature;
|
|
415
|
+
event: EventFeature;
|
|
416
|
+
promotion: PromotionFeature;
|
|
417
|
+
label: LabelFeature;
|
|
418
|
+
element: ElementFeature;
|
|
419
|
+
"sponsored-content": SponsoredContentFeature;
|
|
420
|
+
page: Page;
|
|
421
|
+
};
|
|
422
|
+
type FeatureType = keyof FeatureResponseMap;
|
|
423
|
+
type PolygonalFeature = UnitFeature | KioskFeature | LevelFeature | SectionFeature;
|
|
424
|
+
|
|
425
|
+
type AmenityFeaturePopulated = AmenityFeature & {
|
|
426
|
+
properties: AmenityFeature["properties"] & {
|
|
427
|
+
/**
|
|
428
|
+
* [IMDF] Unit(s) the Amenity is associated with
|
|
429
|
+
*/
|
|
430
|
+
units: UnitFeaturePopulated[];
|
|
431
|
+
/**
|
|
432
|
+
* [venue.in.th] Venue that kiosk is in
|
|
433
|
+
*/
|
|
434
|
+
venue: VenueFeaturePopulated;
|
|
435
|
+
/**
|
|
436
|
+
* [Derived] From units[0] --> level's ordinal
|
|
437
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
438
|
+
*/
|
|
439
|
+
ordinal: number;
|
|
440
|
+
/**
|
|
441
|
+
* [Derived] From units[0] --> level's name
|
|
442
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
443
|
+
*/
|
|
444
|
+
level_name: string;
|
|
445
|
+
/**
|
|
446
|
+
* [Derived] The section this amenity is on.
|
|
447
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
448
|
+
*/
|
|
449
|
+
section?: SectionFeaturePopulated;
|
|
450
|
+
/**
|
|
451
|
+
* [Experimental | Derived] The kiosk this amenity is on.
|
|
452
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
453
|
+
*/
|
|
454
|
+
_experimental_kiosk?: KioskFeaturePopulated;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
type AnchorFeaturePopulated = AnchorFeature & {
|
|
458
|
+
properties: AnchorFeature["properties"] & {
|
|
459
|
+
/**
|
|
460
|
+
* [IMDF] The unit this anchor is on.
|
|
461
|
+
*/
|
|
462
|
+
unit: UnitFeaturePopulated;
|
|
463
|
+
/**
|
|
464
|
+
* [IMDF] Level that kiosk is on
|
|
465
|
+
*/
|
|
466
|
+
level: LevelFeaturePopulated;
|
|
467
|
+
/**
|
|
468
|
+
* [Derived] The section this anchor is on.
|
|
469
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
470
|
+
*/
|
|
471
|
+
section?: SectionFeaturePopulated;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
type KioskFeaturePopulated = KioskFeature & {
|
|
475
|
+
properties: KioskFeature["properties"] & {
|
|
476
|
+
/**
|
|
477
|
+
* [IMDF] An Occupant MUST be positioned (via Anchor) within a Kiosk that models a space that is leased to a business entity
|
|
478
|
+
*/
|
|
479
|
+
anchor: AnchorFeaturePopulated;
|
|
480
|
+
/**
|
|
481
|
+
* [IMDF] Level that kiosk is on
|
|
482
|
+
*/
|
|
483
|
+
level: LevelFeaturePopulated;
|
|
484
|
+
/**
|
|
485
|
+
* [venue.in.th] Venue that kiosk is in
|
|
486
|
+
*/
|
|
487
|
+
venue: VenueFeaturePopulated;
|
|
488
|
+
/**
|
|
489
|
+
* [Derived] The unit this kiosk is on, usually a walkway.
|
|
490
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
491
|
+
*/
|
|
492
|
+
unit: UnitFeaturePopulated;
|
|
493
|
+
/**
|
|
494
|
+
* [Derived] The section this kiosk is in
|
|
495
|
+
* This is added during feature enrichment and not part of the original IMDF dataset.
|
|
496
|
+
*/
|
|
497
|
+
section?: SectionFeaturePopulated;
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
type LevelFeaturePopulated = LevelFeature & {
|
|
501
|
+
properties: LevelFeature["properties"] & {
|
|
502
|
+
/**
|
|
503
|
+
* [venue.in.th] Venue that level is in
|
|
504
|
+
*/
|
|
505
|
+
venue: VenueFeaturePopulated;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
type OccupantFeaturePopulated = OccupantFeature & {
|
|
509
|
+
properties: OccupantFeature["properties"] & {
|
|
510
|
+
/**
|
|
511
|
+
* [IMDF] Occupant's position
|
|
512
|
+
*/
|
|
513
|
+
anchor: AnchorFeaturePopulated;
|
|
514
|
+
/**
|
|
515
|
+
* [venue.in.th] Occupant's category
|
|
516
|
+
*/
|
|
517
|
+
local_categories: TaxonomyFeaturePopulated[];
|
|
518
|
+
/**
|
|
519
|
+
* [venue.in.th] Bind correlation between units on an occupant,
|
|
520
|
+
* which will be used for highlighting in the floor plan and
|
|
521
|
+
* displaying location details later.
|
|
522
|
+
*/
|
|
523
|
+
units: UnitFeaturePopulated[];
|
|
524
|
+
/**
|
|
525
|
+
* [venue.in.th] Bind correlation between kiosks on an occupant,
|
|
526
|
+
* which will be used for highlighting in the floor plan and
|
|
527
|
+
* displaying location details later.
|
|
528
|
+
*/
|
|
529
|
+
kiosks: KioskFeaturePopulated[];
|
|
530
|
+
/**
|
|
531
|
+
* [venue.in.th] Venue that level is in
|
|
532
|
+
*/
|
|
533
|
+
venue: VenueFeaturePopulated;
|
|
534
|
+
/**
|
|
535
|
+
* [venue.in.th] Occupant's promotions
|
|
536
|
+
*/
|
|
537
|
+
promotions: PromotionFeature[];
|
|
538
|
+
/**
|
|
539
|
+
* [venue.in.th] Occupant's privileges
|
|
540
|
+
*/
|
|
541
|
+
privileges: PrivilegeFeature[];
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
type SectionFeaturePopulated = SectionFeature & {
|
|
545
|
+
properties: SectionFeature["properties"] & {
|
|
546
|
+
/**
|
|
547
|
+
* [IMDF] Level that section is on
|
|
548
|
+
*/
|
|
549
|
+
level: LevelFeaturePopulated;
|
|
550
|
+
/**
|
|
551
|
+
* [venue.in.th] Venue that level is in
|
|
552
|
+
*/
|
|
553
|
+
venue: VenueFeaturePopulated;
|
|
554
|
+
/**
|
|
555
|
+
* [Derived] Level's ordinal that unit is on
|
|
556
|
+
*/
|
|
557
|
+
ordinal: number;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
type UnitFeaturePopulated = UnitFeature & {
|
|
561
|
+
properties: UnitFeature["properties"] & {
|
|
562
|
+
/**
|
|
563
|
+
* [IMDF] Level that unit is on
|
|
564
|
+
*/
|
|
565
|
+
level: LevelFeaturePopulated;
|
|
566
|
+
/**
|
|
567
|
+
* [venue.in.th] Venue that level is in
|
|
568
|
+
*/
|
|
569
|
+
venue: VenueFeaturePopulated;
|
|
570
|
+
/**
|
|
571
|
+
* [Derived] Level's ordinal that unit is on
|
|
572
|
+
*/
|
|
573
|
+
ordinal: number;
|
|
574
|
+
/**
|
|
575
|
+
* [Derived] Secion that unit is in
|
|
576
|
+
*/
|
|
577
|
+
section?: SectionFeaturePopulated;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
type VenueFeaturePopulated = VenueFeature;
|
|
581
|
+
type TaxonomyFeaturePopulated = TaxonomyFeature & {
|
|
582
|
+
properties: TaxonomyFeature["properties"] & {
|
|
583
|
+
venue: VenueFeaturePopulated;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
type FeaturePopulatedResponseMap = {
|
|
587
|
+
address: ImdfFeature;
|
|
588
|
+
amenity: AmenityFeaturePopulated;
|
|
589
|
+
anchor: AnchorFeaturePopulated;
|
|
590
|
+
building: ImdfFeature;
|
|
591
|
+
detail: DetailFeature;
|
|
592
|
+
fixture: FixtureFeature;
|
|
593
|
+
footprint: ImdfFeature;
|
|
594
|
+
geofence: ImdfFeature;
|
|
595
|
+
kiosk: KioskFeaturePopulated;
|
|
596
|
+
level: LevelFeaturePopulated;
|
|
597
|
+
occupant: OccupantFeaturePopulated;
|
|
598
|
+
opening: OpeningFeature;
|
|
599
|
+
relationship: RelationshipFeature;
|
|
600
|
+
section: SectionFeaturePopulated;
|
|
601
|
+
unit: UnitFeaturePopulated;
|
|
602
|
+
venue: VenueFeaturePopulated;
|
|
603
|
+
taxonomy: TaxonomyFeaturePopulated;
|
|
604
|
+
privilege: PrivilegeFeature;
|
|
605
|
+
event: EventFeature;
|
|
606
|
+
promotion: PromotionFeature;
|
|
607
|
+
label: LabelFeature;
|
|
608
|
+
element: ImdfFeature;
|
|
609
|
+
"sponsored-content": SponsoredContentFeature;
|
|
610
|
+
page: Page;
|
|
611
|
+
};
|
|
612
|
+
type PopulatableFeatureType = keyof FeaturePopulatedResponseMap;
|
|
613
|
+
|
|
614
|
+
interface VenueClientOptions {
|
|
615
|
+
projectId: string;
|
|
616
|
+
apiKey: string;
|
|
617
|
+
baseUrl?: string;
|
|
618
|
+
queryClient?: QueryClient;
|
|
619
|
+
}
|
|
620
|
+
interface FindParams {
|
|
621
|
+
populate?: boolean;
|
|
622
|
+
}
|
|
623
|
+
interface FilterParams {
|
|
624
|
+
populate?: boolean;
|
|
625
|
+
}
|
|
626
|
+
interface PopulatedParams {
|
|
627
|
+
populate: true;
|
|
628
|
+
}
|
|
629
|
+
interface FeatureQueryOptions {
|
|
630
|
+
refetchInterval?: number;
|
|
631
|
+
staleTime?: number;
|
|
632
|
+
cacheTime?: number;
|
|
633
|
+
enabled?: boolean;
|
|
634
|
+
retry?: boolean | number;
|
|
635
|
+
}
|
|
636
|
+
type InternalFindById = <T extends FeatureType>(id: Id) => Promise<FeatureResponseMap[T]>;
|
|
637
|
+
type InternalFilterByType = <T extends FeatureType>(featureType: T) => Promise<FeatureResponseMap[T][]>;
|
|
638
|
+
interface VenueDataClient {
|
|
639
|
+
projectId: string;
|
|
640
|
+
queryClient: QueryClient;
|
|
641
|
+
registerObserver: (featureType: FeatureType, refetchInterval: number) => QueryObserver;
|
|
642
|
+
destroyObservers: () => void;
|
|
643
|
+
createFilterByTypeQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, params: FilterParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
|
|
644
|
+
createFindByIdQueryOptions: <T extends FeatureType = FeatureType>(featureType: T, id: string, params: FindParams, options: FeatureQueryOptions) => EnsureQueryDataOptions<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
|
|
645
|
+
filterByType: <T extends FeatureType>(featureType: T, params?: FilterParams) => Promise<FeatureResponseMap[T][] | FeaturePopulatedResponseMap[T][]>;
|
|
646
|
+
findById: <T extends FeatureType>(featureType: T, id: string, params?: FindParams) => Promise<FeatureResponseMap[T] | FeaturePopulatedResponseMap[T]>;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
declare const DEFAULT_BASE_URL = "https://service.venue.in.th/api";
|
|
650
|
+
declare const IMDF_FEATURE_TYPES: FeatureType[];
|
|
651
|
+
declare const NONIMDF_FEATURE_TYPES: FeatureType[];
|
|
652
|
+
declare const GEOJSON_FEATURE_TYPES: FeatureType[];
|
|
653
|
+
declare const ALL_FEATURE_TYPES: FeatureType[];
|
|
654
|
+
declare const defaultFeatureQueryOptionsMap: Record<FeatureType, FeatureQueryOptions>;
|
|
655
|
+
|
|
656
|
+
declare function fetchFeature<T extends FeatureType = FeatureType>(projectId: string, apiKey: string, featureType: FeatureType, baseUrl?: string): Promise<FeatureResponseMap[T][]>;
|
|
657
|
+
declare const safeFetchFeature: <T extends FeatureType = FeatureType>(projectId: string, apiKey: string, featureType: FeatureType, baseUrl?: string) => Promise<FeatureResponseMap[T][]>;
|
|
658
|
+
|
|
659
|
+
declare const getDataClient: (options: VenueClientOptions) => VenueDataClient;
|
|
660
|
+
|
|
661
|
+
/** 2D */
|
|
662
|
+
type TypeRenderOptions<TOptionsType> = {
|
|
663
|
+
default: TOptionsType;
|
|
664
|
+
byCategory?: Record<string, TOptionsType>;
|
|
665
|
+
};
|
|
666
|
+
type Element2DRendererOptions = {
|
|
667
|
+
unit?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
668
|
+
kiosk?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
669
|
+
door?: TypeRenderOptions<maptalks.LineStringOptionsType>;
|
|
670
|
+
occupant?: TypeRenderOptions<maptalks.UIMarkerOptionsType>;
|
|
671
|
+
};
|
|
672
|
+
/** 3D */
|
|
673
|
+
type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
|
|
674
|
+
color?: string;
|
|
675
|
+
offset?: number;
|
|
676
|
+
};
|
|
677
|
+
type Element3DRendererOptions = {
|
|
678
|
+
unit?: TypeRenderOptions<CreateExtrudePolygonOptionType>;
|
|
679
|
+
kiosk?: TypeRenderOptions<CreateExtrudePolygonOptionType>;
|
|
680
|
+
};
|
|
681
|
+
/** RendererManager */
|
|
682
|
+
type RendererManagerOptions = {
|
|
683
|
+
type: "2D";
|
|
684
|
+
elements: Element2DRendererOptions;
|
|
685
|
+
} | {
|
|
686
|
+
type: "3D";
|
|
687
|
+
elements: Element3DRendererOptions;
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
declare class RendererManager {
|
|
691
|
+
#private;
|
|
692
|
+
options: RendererManagerOptions;
|
|
693
|
+
/** Elements: Responsible for converting feature info elements and add to map */
|
|
694
|
+
private elementRenderer;
|
|
695
|
+
private elementsMap;
|
|
696
|
+
private elementsByOrdinal;
|
|
697
|
+
constructor(map: maptalks.Map, options: RendererManagerOptions);
|
|
698
|
+
set dataClient(value: any);
|
|
699
|
+
changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
|
|
700
|
+
createMarker(coordinate: Position, ordinal: number, label: string): void;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
interface IndoorMapOptions {
|
|
704
|
+
center?: [number, number];
|
|
705
|
+
defaultZoom?: number;
|
|
706
|
+
pixelRatio?: number;
|
|
707
|
+
locale?: string;
|
|
708
|
+
onMapReady?: () => void;
|
|
709
|
+
onMapLoading?: () => void;
|
|
710
|
+
dataClient: VenueDataClient;
|
|
711
|
+
renderer?: RendererManagerOptions;
|
|
712
|
+
}
|
|
713
|
+
type AmenityHighlightMode = "2DMarker";
|
|
714
|
+
type SymbolSet = string | null;
|
|
715
|
+
interface IHighlightOptions {
|
|
716
|
+
symbolSet?: SymbolSet;
|
|
717
|
+
}
|
|
718
|
+
interface ISetHighlight2DElementIdsOptions {
|
|
719
|
+
symbolSet?: SymbolSet;
|
|
720
|
+
defaultMarker?: boolean;
|
|
721
|
+
}
|
|
722
|
+
interface ISetHighlightElementIdsOptions {
|
|
723
|
+
highlight3DOptions?: IHighlightOptions;
|
|
724
|
+
highlight2DOptions?: ISetHighlight2DElementIdsOptions;
|
|
725
|
+
}
|
|
726
|
+
interface IMapExtrudeConfig {
|
|
727
|
+
height: number;
|
|
728
|
+
category: string;
|
|
729
|
+
}
|
|
730
|
+
interface ILightConfig {
|
|
731
|
+
ambientLight: IMapLightConfig;
|
|
732
|
+
directionalLight: IMapLightConfig;
|
|
733
|
+
}
|
|
734
|
+
interface IMapLightConfig {
|
|
735
|
+
color: string;
|
|
736
|
+
position?: number[];
|
|
737
|
+
intensity: number;
|
|
738
|
+
}
|
|
739
|
+
interface IExtrudeConfig {
|
|
740
|
+
kiosk: IMapExtrudeConfig[];
|
|
741
|
+
unit: IMapExtrudeConfig[];
|
|
742
|
+
}
|
|
743
|
+
interface IShortestPathConfig {
|
|
744
|
+
resolution: number;
|
|
745
|
+
}
|
|
746
|
+
interface IAllVenuesViewConfig {
|
|
747
|
+
zoom?: number;
|
|
748
|
+
pitch?: number;
|
|
749
|
+
center?: Coordinate;
|
|
750
|
+
bearing?: number;
|
|
751
|
+
}
|
|
752
|
+
interface IMapAnimation {
|
|
753
|
+
[k: string]: {
|
|
754
|
+
enable?: boolean;
|
|
755
|
+
speed?: number;
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
interface IUnitDistanceModifier {
|
|
759
|
+
[k: string]: number;
|
|
760
|
+
}
|
|
761
|
+
type IGraphOptions = {
|
|
762
|
+
baseDistance?: number;
|
|
763
|
+
multiplier?: number;
|
|
764
|
+
};
|
|
765
|
+
type IVerticalGraphOptions = IGraphOptions & {
|
|
766
|
+
scaleDistanceByLevel?: boolean;
|
|
767
|
+
};
|
|
768
|
+
interface IGraphFeatureOptions {
|
|
769
|
+
traversal?: IUnitDistanceModifier;
|
|
770
|
+
escalator?: IGraphOptions;
|
|
771
|
+
ramp?: IGraphOptions;
|
|
772
|
+
elevator?: IGraphOptions;
|
|
773
|
+
stairs?: IVerticalGraphOptions;
|
|
774
|
+
}
|
|
775
|
+
interface IMapConfig {
|
|
776
|
+
amenity_highlight_mode?: AmenityHighlightMode;
|
|
777
|
+
default_zoom?: number;
|
|
778
|
+
max_zoom?: number;
|
|
779
|
+
min_zoom?: number;
|
|
780
|
+
kiosk_pixel_ratio?: number;
|
|
781
|
+
mobile_pixel_ratio?: number;
|
|
782
|
+
extrude?: IExtrudeConfig;
|
|
783
|
+
light?: ILightConfig;
|
|
784
|
+
shortest_path?: IShortestPathConfig;
|
|
785
|
+
text_marker_type?: "marker" | "ui-marker";
|
|
786
|
+
extent_features_scale_factor?: number;
|
|
787
|
+
extent_scale_map_view_factor?: number;
|
|
788
|
+
all_venues_view?: IAllVenuesViewConfig;
|
|
789
|
+
animations?: IMapAnimation[];
|
|
790
|
+
prepare_steps?: IGraphFeatureOptions;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
interface CameraManagerOptions {
|
|
794
|
+
defaultCenter: [number, number];
|
|
795
|
+
defaultZoom: number;
|
|
796
|
+
}
|
|
797
|
+
declare class CameraManager {
|
|
798
|
+
#private;
|
|
799
|
+
map: Map;
|
|
800
|
+
constructor(map: Map, { defaultCenter, defaultZoom }: CameraManagerOptions);
|
|
801
|
+
set defaultBearing(value: number);
|
|
802
|
+
set defaultPitch(value: number);
|
|
803
|
+
set defaultCenter(value: [number, number]);
|
|
804
|
+
set defaultZoom(value: number);
|
|
805
|
+
get defaultCenter(): [number, number];
|
|
806
|
+
get defaultZoom(): number;
|
|
807
|
+
get defaultBearing(): number;
|
|
808
|
+
get defaultPitch(): number;
|
|
809
|
+
getBearing: () => number;
|
|
810
|
+
getPitch: () => number;
|
|
811
|
+
getZoom: () => number;
|
|
812
|
+
setBearing: (bearing: any) => Map;
|
|
813
|
+
/** Public methods */
|
|
814
|
+
flyTo: (center: any, options?: MapAnimationOptionsType & MapViewType) => void;
|
|
815
|
+
flyToAndZoomIn: (centerPoint: any, options?: MapAnimationOptionsType & MapViewType) => void;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
declare class IndoorMap {
|
|
819
|
+
#private;
|
|
820
|
+
map: Map | null;
|
|
821
|
+
cameraManager: CameraManager;
|
|
822
|
+
rendererManager: RendererManager;
|
|
823
|
+
showVenueObject: boolean;
|
|
824
|
+
threeLayer: ThreeLayer | null;
|
|
825
|
+
onMapReady: () => void;
|
|
826
|
+
onMapLoading: () => void;
|
|
827
|
+
constructor(elementId: any, options: IndoorMapOptions);
|
|
828
|
+
set dataClient(value: any);
|
|
829
|
+
/**
|
|
830
|
+
* Events
|
|
831
|
+
*/
|
|
832
|
+
handleMapClick: HandlerFn;
|
|
833
|
+
handleMapTouchEnd: HandlerFn;
|
|
834
|
+
/**
|
|
835
|
+
* Getters & Setters
|
|
836
|
+
*/
|
|
837
|
+
set defaultBearing(value: number);
|
|
838
|
+
set defaultPitch(value: number);
|
|
839
|
+
set defaultCenter(value: [number, number]);
|
|
840
|
+
set defaultZoom(value: number);
|
|
841
|
+
get defaultBearing(): number;
|
|
842
|
+
get defaultPitch(): number;
|
|
843
|
+
get defaultCenter(): [number, number];
|
|
844
|
+
get defaultZoom(): number;
|
|
845
|
+
get elementsLoaded(): boolean;
|
|
846
|
+
get pixelRatio(): number;
|
|
847
|
+
get locale(): string;
|
|
848
|
+
set mapTheme(value: any);
|
|
849
|
+
get venues(): any[];
|
|
850
|
+
set detectVenueInView(value: any);
|
|
851
|
+
get ordinals(): any[];
|
|
852
|
+
set ordinals(value: any[]);
|
|
853
|
+
set billboards(value: any);
|
|
854
|
+
set mapConfig(value: IMapConfig);
|
|
855
|
+
set mapDecorations(value: any);
|
|
856
|
+
set maxZoom(value: number);
|
|
857
|
+
set minZoom(value: number);
|
|
858
|
+
set groundLabels(value: any);
|
|
859
|
+
set pixelRatio(value: number);
|
|
860
|
+
set onClickElement(func: any);
|
|
861
|
+
set locale(value: string);
|
|
862
|
+
handleClickElement: (e: EventParams) => void;
|
|
863
|
+
setCenter(center: Coordinate, padding?: MapPaddingType): void;
|
|
864
|
+
/**
|
|
865
|
+
* Change Level & animate to path / geometry / view / etc.
|
|
866
|
+
* ================================== */
|
|
867
|
+
changeLevelByOrdinal(ordinal: number | number[]): void;
|
|
868
|
+
getFeatureExtent: (feature: any, scaleFactor?: number) => Extent;
|
|
869
|
+
getExtentCenter: (extent: Extent) => maptalks.PositionType;
|
|
870
|
+
getExtentZoom: (extent: Extent, options?: {
|
|
871
|
+
isFraction?: boolean;
|
|
872
|
+
padding?: MapPaddingType;
|
|
873
|
+
}) => number;
|
|
874
|
+
findVenueInView: () => {
|
|
875
|
+
venueId: string;
|
|
876
|
+
distance: number;
|
|
877
|
+
};
|
|
878
|
+
flyTo: (center: any, options: any) => void;
|
|
879
|
+
getLineStringBearing: (feature: any) => number;
|
|
880
|
+
addAnimations(animation: {
|
|
881
|
+
id: string;
|
|
882
|
+
callback: () => void;
|
|
883
|
+
}): void;
|
|
884
|
+
removeAnimationById(id: string): void;
|
|
885
|
+
clearAnimations(): void;
|
|
886
|
+
/**
|
|
887
|
+
* Hilighting Elements
|
|
888
|
+
* ========================================= */
|
|
889
|
+
setHighlightElementIds(targetElementIds: any, options?: ISetHighlightElementIdsOptions): geojson.FeatureCollection<geojson.Geometry, {
|
|
890
|
+
[name: string]: any;
|
|
891
|
+
}>;
|
|
892
|
+
setHighlight2DElementIds(targetElementIds: any, options?: {}): geojson.FeatureCollection<geojson.Geometry, {
|
|
893
|
+
[name: string]: any;
|
|
894
|
+
}>;
|
|
895
|
+
clearHighlightElements(): void;
|
|
896
|
+
setHighlightedObject(targetObjectIds: any, options?: {}): void;
|
|
897
|
+
clearHighlightObject(): void;
|
|
898
|
+
/**
|
|
899
|
+
* User Location
|
|
900
|
+
****************************/
|
|
901
|
+
addUserLocation(value: any): void;
|
|
902
|
+
updateUserLocationSymbolByLocale(locale: string): void;
|
|
903
|
+
removeUserLocation(): void;
|
|
904
|
+
showUserLocationMarker(): void;
|
|
905
|
+
hideUserLocationMarker(): void;
|
|
906
|
+
addLastUserLocation(value: any): void;
|
|
907
|
+
removeLastUserLocation(): void;
|
|
908
|
+
hideLastUserLocationMarker(): void;
|
|
909
|
+
/**
|
|
910
|
+
* END of User Location
|
|
911
|
+
****************************/
|
|
912
|
+
showGeometryByElementId: (elementId: any) => void;
|
|
913
|
+
hideGeometryByElementId: (elementId: any) => void;
|
|
914
|
+
setSpriteMarkersOpacity: (opacity?: number) => void;
|
|
915
|
+
setFeatureObject3DsOpacity: (opacity?: number) => void;
|
|
916
|
+
disableLayersFadingOnZoom: () => void;
|
|
917
|
+
enableLayersFadingOnZoom: () => void;
|
|
918
|
+
/**
|
|
919
|
+
* Navigation
|
|
920
|
+
****************************/
|
|
921
|
+
combineNearbyLineStrings(lineStrings: Feature<LineString, GeoJsonProperties>[], options?: {
|
|
922
|
+
properties?: GeoJsonProperties;
|
|
923
|
+
distance?: number;
|
|
924
|
+
}): any[];
|
|
925
|
+
createNavigationGeometries: (stepGeometries: any, destinationFeature: any) => void;
|
|
926
|
+
createOverviewStepPathByOrdinal: (stepGeometries: any, viewingOrdinal: any) => any;
|
|
927
|
+
clearNavigationGeometries(): void;
|
|
928
|
+
/**
|
|
929
|
+
* END of Navigation
|
|
930
|
+
****************************/
|
|
931
|
+
/**
|
|
932
|
+
* hide/show venue 3dmodel
|
|
933
|
+
**/
|
|
934
|
+
hideVenueObjects: () => void;
|
|
935
|
+
showVenueObjects: () => void;
|
|
936
|
+
/**
|
|
937
|
+
* Other functions
|
|
938
|
+
*/
|
|
939
|
+
enableClick: () => Map | maptalks.ClassOptions;
|
|
940
|
+
disableClick: () => Map | maptalks.ClassOptions;
|
|
941
|
+
freeze: () => Map | maptalks.ClassOptions;
|
|
942
|
+
unfreeze: () => Map | maptalks.ClassOptions;
|
|
943
|
+
/**
|
|
944
|
+
* render (frame)
|
|
945
|
+
*/
|
|
946
|
+
getTargetViewCenter: (targetView: any, options?: {
|
|
947
|
+
offset: {
|
|
948
|
+
top: number;
|
|
949
|
+
left: number;
|
|
950
|
+
right: number;
|
|
951
|
+
bottom: number;
|
|
952
|
+
};
|
|
953
|
+
}) => Coordinate;
|
|
954
|
+
setMaxExtent(extent: Extent): Map;
|
|
955
|
+
render(): void;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
declare class Billboard extends BaseObject {
|
|
959
|
+
constructor(coordinate: any, options: any, src: any, layer: any, properties: any);
|
|
960
|
+
properties: any;
|
|
961
|
+
setLineHeight(altitude: any): void;
|
|
962
|
+
#private;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
declare class GroundLabel extends BaseObject {
|
|
966
|
+
#private;
|
|
967
|
+
constructor(bound: any, options: any, layer: any);
|
|
968
|
+
set bearing(value: any);
|
|
969
|
+
get angle(): number;
|
|
970
|
+
get currentAngle(): number;
|
|
971
|
+
get text(): string;
|
|
972
|
+
get offsetX(): number;
|
|
973
|
+
get offsetY(): number;
|
|
974
|
+
get offset(): {
|
|
975
|
+
x: number;
|
|
976
|
+
y: number;
|
|
977
|
+
};
|
|
978
|
+
set offsetX(value: number);
|
|
979
|
+
set offsetY(value: number);
|
|
980
|
+
set angle(newAngle: number);
|
|
981
|
+
setOffset(offsetX: any, offsetY: any): void;
|
|
982
|
+
addOffset(deltaX: any, deltaY: any): void;
|
|
983
|
+
resetOffset(): void;
|
|
984
|
+
moveToPosition(targetX: any, targetY: any): void;
|
|
985
|
+
updateText(newText: any, options?: Record<string, unknown>): void;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
interface IOptions {
|
|
989
|
+
scale: number;
|
|
990
|
+
altitude: number;
|
|
991
|
+
alphaTest?: number;
|
|
992
|
+
highlight?: {
|
|
993
|
+
options: {
|
|
994
|
+
altitude?: number;
|
|
995
|
+
scale?: number;
|
|
996
|
+
};
|
|
997
|
+
material?: SpriteMaterial;
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
declare class SpriteMarker extends BaseObject {
|
|
1001
|
+
#private;
|
|
1002
|
+
constructor(coordinate: any, options: IOptions, material: SpriteMaterial, layer: ThreeLayer, properties: object);
|
|
1003
|
+
setSymbol(material: SpriteMaterial): this;
|
|
1004
|
+
setScale(scaleX: number, scaleY?: number, scaleZ?: number): this;
|
|
1005
|
+
getSymbol(): SpriteMaterial;
|
|
1006
|
+
highlight(): this;
|
|
1007
|
+
removeHighlight(): this;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
declare class NavigationPath extends BaseObject {
|
|
1011
|
+
constructor(feature: any, layer: any, properties: any, options: any, lineOptions?: {
|
|
1012
|
+
color: string;
|
|
1013
|
+
opacity: number;
|
|
1014
|
+
}, outlineOption?: {
|
|
1015
|
+
color: string;
|
|
1016
|
+
opacity: number;
|
|
1017
|
+
});
|
|
1018
|
+
_animation(): void;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
declare function getExtrudeConfigByFeature(baseExtrudeConfig: any, feature?: any): any | undefined;
|
|
1022
|
+
declare function createSpriteMaterialByLabelSymbol(labelSymbol?: any[]): SpriteMaterial;
|
|
1023
|
+
declare function createStyledUIMarkerElement({ style, textContent, className, }: {
|
|
1024
|
+
style: any;
|
|
1025
|
+
textContent: any;
|
|
1026
|
+
className: any;
|
|
1027
|
+
}): string;
|
|
1028
|
+
declare function styledFeatureGenerator(mapTheme: any): {
|
|
1029
|
+
getElementSymbol: (key: any) => any;
|
|
1030
|
+
getHilighPolygonalSymbol: (type: any) => any;
|
|
1031
|
+
getHighlightMarkerSymbol: () => any;
|
|
1032
|
+
createVenue: (feature: any) => any;
|
|
1033
|
+
createLevel: (feature: any) => any;
|
|
1034
|
+
createUnit: (feature: any) => any;
|
|
1035
|
+
createMarker: (feature: any) => Marker;
|
|
1036
|
+
createOriginMarker: (feature: any) => Marker;
|
|
1037
|
+
createDestinationPinMarker: (feature: any, mapConfig: any) => Marker;
|
|
1038
|
+
createDestinationLogoMarker: (feature: any, mapConfig?: {}) => Marker;
|
|
1039
|
+
createUserLocationMarker: (feature: any) => Marker;
|
|
1040
|
+
createLastUserLocationMarker: (feature: any) => Marker;
|
|
1041
|
+
createHighlightOccupantMarker: (feature: any, mapConfig: any) => Marker;
|
|
1042
|
+
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => Marker;
|
|
1043
|
+
createKiosk: (feature: any) => any;
|
|
1044
|
+
createSection: (feature: any) => any;
|
|
1045
|
+
createOccupant: (feature: any, location: any, mapConfig: any) => ui.UIMarker | Marker;
|
|
1046
|
+
createOpening: (feature: any) => LineString$1;
|
|
1047
|
+
createFixture: (feature: any) => any;
|
|
1048
|
+
createLineStringFromGeometries: (geometries: any) => LineString$1;
|
|
1049
|
+
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1050
|
+
createDecoration: (decoration: any, options: any) => Polygon$1 | MultiPolygon$1 | LineString$1 | MultiLineString;
|
|
1051
|
+
/** Three JS */
|
|
1052
|
+
create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
|
|
1053
|
+
create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
|
|
1054
|
+
createOccupantGroundLabel: (feature: any, location: any, mapConfig: any, threeLayer: any) => GroundLabel;
|
|
1055
|
+
create3DBillboard: (billboard: any, threeLayer: any) => Billboard;
|
|
1056
|
+
create3DAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
1057
|
+
create3DOccupantAmenityMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
1058
|
+
create3DOpeningMarker: (feature: any, threeLayer: any, config: any) => SpriteMarker;
|
|
1059
|
+
create3DUnit: (unit: any, threeLayer: any) => Promise<any[]>;
|
|
1060
|
+
create3DKiosk: (kiosk: any, threeLayer: any) => Promise<any[]>;
|
|
1061
|
+
createVenue3DModel: (venue: any, threeLayer: any) => Promise<any[]>;
|
|
1062
|
+
create3DFixture: (fixture: any, threeLayer: any) => Promise<any[]>;
|
|
1063
|
+
createExtrudedUnit: (unit: any, threeLayer: any, options: any) => any;
|
|
1064
|
+
createExtrudedKiosk: (kiosk: any, threeLayer: any, options: any) => any;
|
|
1065
|
+
createExtrudedLevel: (level: any, threeLayer: any, options: any) => any;
|
|
1066
|
+
createAmbientLight: (config: any) => AmbientLight;
|
|
1067
|
+
createDirectionalLight: (config: any) => DirectionalLight;
|
|
1068
|
+
};
|
|
1069
|
+
declare function getLocationByAmenity(feature: any): any;
|
|
1070
|
+
declare function getLocationByOccupant(feature: any): any;
|
|
1071
|
+
declare function getLocationIdByFeature(feature: any): any;
|
|
1072
|
+
declare function getFeatureByLocationId(id: any, features?: any[]): any;
|
|
1073
|
+
declare function isClickableFeature(feature: any): any;
|
|
1074
|
+
declare function getLocationByFeature(feature: any): any;
|
|
1075
|
+
declare function getRelatedLocationsByOccupant(feature: any): any[];
|
|
1076
|
+
declare function getRelatedLocationsByAmenity(feature: any): any;
|
|
1077
|
+
declare function getRelatedLocationIdsByFeature(feature: any): any;
|
|
1078
|
+
declare function getRelatedLocationsByFeature(feature: any): any;
|
|
1079
|
+
declare function getOrdinalByLocationId(locationId: any, feature: any): any;
|
|
1080
|
+
|
|
1081
|
+
interface ICoordinate {
|
|
1082
|
+
x: number;
|
|
1083
|
+
y: number;
|
|
1084
|
+
z?: number;
|
|
1085
|
+
}
|
|
1086
|
+
type GetBearingBetweenPoints = (origin: ICoordinate, destination: ICoordinate) => number;
|
|
1087
|
+
type GetSuitablyValueBetweenBearings = (newBearing: number, currentBearing: number) => number;
|
|
1088
|
+
declare const getBearingBetweenPoints: GetBearingBetweenPoints;
|
|
1089
|
+
declare const getSuitablyValueBetweenBearings: GetSuitablyValueBetweenBearings;
|
|
1090
|
+
|
|
1091
|
+
declare const getCenterFromGeometry: (geometry?: Polygon | MultiPolygon | Point | LineString) => number[] | null;
|
|
1092
|
+
declare const createPolygonFromLineString: (geometry: any) => geojson.Position[][];
|
|
1093
|
+
|
|
1094
|
+
declare const ALWAYS_VISIBLE_FEATURE_TYPES: string[];
|
|
1095
|
+
declare const BASE_LAYER_NAME = "base";
|
|
1096
|
+
declare const POI_MARKER_LAYER_NAME = "poi";
|
|
1097
|
+
declare const MARKER_LAYER_NAME = "marker";
|
|
1098
|
+
declare const HIGHLIGHT_LAYER_NAME = "highlight";
|
|
1099
|
+
declare const USER_LOCATION_LAYER_NAME = "user_location";
|
|
1100
|
+
declare const ORIGIN_MARKER_ID = "master-origin-marker";
|
|
1101
|
+
declare const DESTINATION_MARKER_ID = "master-destination-marker";
|
|
1102
|
+
declare const USER_LOCATION_ELEMENT_ID = "user_location";
|
|
1103
|
+
declare const LAST_USER_LOCATION_ELEMENT_ID_PREFIX = "last_user_location-";
|
|
1104
|
+
declare const LOCALE_SYMBOL_KEY = "locale_symbol";
|
|
1105
|
+
declare const DEFAULT_LOCALE = "en";
|
|
1106
|
+
declare const DEFAULT_HIGHLIGHT_OPTIONS: IHighlightOptions;
|
|
1107
|
+
declare const DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS: ISetHighlight2DElementIdsOptions;
|
|
1108
|
+
declare const LAYERS: string[];
|
|
1109
|
+
declare const LAYER_OPTIONS: {
|
|
1110
|
+
base: {
|
|
1111
|
+
forceRenderOnMoving: boolean;
|
|
1112
|
+
forceRenderOnRotating: boolean;
|
|
1113
|
+
forceRenderOnZooming: boolean;
|
|
1114
|
+
enableAltitude: boolean;
|
|
1115
|
+
};
|
|
1116
|
+
poi: {
|
|
1117
|
+
forceRenderOnMoving: boolean;
|
|
1118
|
+
forceRenderOnRotating: boolean;
|
|
1119
|
+
forceRenderOnZooming: boolean;
|
|
1120
|
+
zIndex: number;
|
|
1121
|
+
collision: boolean;
|
|
1122
|
+
collisionDelay: number;
|
|
1123
|
+
enableAltitude: boolean;
|
|
1124
|
+
};
|
|
1125
|
+
marker: {
|
|
1126
|
+
enableAltitude: boolean;
|
|
1127
|
+
};
|
|
1128
|
+
highlight: {
|
|
1129
|
+
zIndex: number;
|
|
1130
|
+
enableAltitude: boolean;
|
|
1131
|
+
};
|
|
1132
|
+
user_location: {
|
|
1133
|
+
zIndex: number;
|
|
1134
|
+
enableAltitude: boolean;
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
declare const LAYER_FEATURE_TYPE_OBJ: {
|
|
1138
|
+
venue: string;
|
|
1139
|
+
level: string;
|
|
1140
|
+
unit: string;
|
|
1141
|
+
fixture: string;
|
|
1142
|
+
kiosk: string;
|
|
1143
|
+
opening: string;
|
|
1144
|
+
section: string;
|
|
1145
|
+
footprint: string;
|
|
1146
|
+
amenity: string;
|
|
1147
|
+
occupant: string;
|
|
1148
|
+
geolocation: string;
|
|
1149
|
+
"origin-marker": string;
|
|
1150
|
+
"destination-marker": string;
|
|
1151
|
+
decoration: string;
|
|
1152
|
+
};
|
|
1153
|
+
/** Custom Venue Platform Events. Prefix with "venue:" to avoid collision */
|
|
1154
|
+
declare const VENUE_EVENTS: {
|
|
1155
|
+
VENUE_MOVEINTOVIEW: string;
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
export { ALL_FEATURE_TYPES, ALWAYS_VISIBLE_FEATURE_TYPES, type AmenityFeature, type AmenityFeaturePopulated, type AmenityGeometry, type AmenityProperties, type AnchorFeature, type AnchorFeaturePopulated, type AnchorGeometry, type AnchorProperties, BASE_LAYER_NAME, DEFAULT_BASE_URL, DEFAULT_HIGHLIGHT_OPTIONS, DEFAULT_LOCALE, DEFAULT_SET_HIGHLIGHT_2DELEMENT_IDS_OPTIONS, DESTINATION_MARKER_ID, type DetailFeature, type DetailGeometry, type DetailProperties, type ElementFeature, type ElementGeometry, type ElementProperties, type EventFeature, type EventGeometry, type EventProperties, type FeaturePopulatedResponseMap, type FeatureQueryOptions, type FeatureResponseMap, type FeatureType, type FilterParams, type FindParams, type FixtureFeature, type FixtureGeometry, type FixtureProperties, GEOJSON_FEATURE_TYPES, HIGHLIGHT_LAYER_NAME, IMDF_FEATURE_TYPES, type Id, type ImdfFeature, IndoorMap, type InternalFilterByType, type InternalFindById, type KioskFeature, type KioskFeaturePopulated, type KioskGeometry, type KioskProperties, LAST_USER_LOCATION_ELEMENT_ID_PREFIX, LAYERS, LAYER_FEATURE_TYPE_OBJ, LAYER_OPTIONS, LOCALE_SYMBOL_KEY, type LabelFeature, type LabelGeometry, type LabelProperties, type LevelFeature, type LevelFeaturePopulated, type LevelGeometry, type LevelProperties, MARKER_LAYER_NAME, type Media, type MediaFile, type Model3d, NONIMDF_FEATURE_TYPES, ORIGIN_MARKER_ID, type OccupantFeature, type OccupantFeaturePopulated, type OccupantGeometry, type OccupantProperties, type OpeningFeature, type OpeningGeometry, type OpeningProperties, POI_MARKER_LAYER_NAME, type Page, type PolygonalFeature, type PopulatableFeatureType, type PopulatedParams, type PrivilegeFeature, type PrivilegeGeometry, type PrivilegeProperties, type PromotionFeature, type PromotionProperties, type RelationshipFeature, type RelationshipGeometry, type RelationshipProperties, type SectionFeature, type SectionFeaturePopulated, type SectionGeometry, type SectionProperties, type SponsoredContentFeature, type SponsoredContentLegacyType, type SponsoredContentPlacementType, type SponsoredContentStrapiV4ApiResponse, type TaxonomyFeature, type TaxonomyFeaturePopulated, type TaxonomyGeometry, type TaxonomyProperties, USER_LOCATION_ELEMENT_ID, USER_LOCATION_LAYER_NAME, type UnitFeature, type UnitFeaturePopulated, type UnitGeometry, type UnitProperties, VENUE_EVENTS, type VenueClientOptions, type VenueDataClient, type VenueFeature, type VenueFeaturePopulated, type VenueGeometry, type VenueProperties, createPolygonFromLineString, createSpriteMaterialByLabelSymbol, createStyledUIMarkerElement, defaultFeatureQueryOptionsMap, fetchFeature, getBearingBetweenPoints, getCenterFromGeometry, getDataClient, getExtrudeConfigByFeature, getFeatureByLocationId, getLocationByAmenity, getLocationByFeature, getLocationByOccupant, getLocationIdByFeature, getOrdinalByLocationId, getRelatedLocationIdsByFeature, getRelatedLocationsByAmenity, getRelatedLocationsByFeature, getRelatedLocationsByOccupant, getSuitablyValueBetweenBearings, isClickableFeature, safeFetchFeature, styledFeatureGenerator };
|