@mapsindoors/react-native-maps-indoors-mapbox 0.0.5-beta

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.
Files changed (147) hide show
  1. package/LICENSE +11 -0
  2. package/README.md +178 -0
  3. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  4. package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
  5. package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
  6. package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  7. package/android/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
  8. package/android/.gradle/7.4/executionHistory/executionHistory.bin +0 -0
  9. package/android/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
  10. package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
  11. package/android/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
  12. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  13. package/android/.gradle/7.4/fileHashes/resourceHashesCache.bin +0 -0
  14. package/android/.gradle/7.4/gc.properties +0 -0
  15. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  16. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  17. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  18. package/android/.gradle/file-system.probe +0 -0
  19. package/android/.gradle/vcs-1/gc.properties +0 -0
  20. package/android/.idea/compiler.xml +6 -0
  21. package/android/.idea/gradle.xml +19 -0
  22. package/android/.idea/jarRepositories.xml +45 -0
  23. package/android/.idea/misc.xml +10 -0
  24. package/android/.idea/vcs.xml +6 -0
  25. package/android/README.md +14 -0
  26. package/android/build.gradle +169 -0
  27. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  29. package/android/gradle.properties +17 -0
  30. package/android/gradlew +234 -0
  31. package/android/gradlew.bat +89 -0
  32. package/android/local.properties +8 -0
  33. package/android/src/main/AndroidManifest.xml +6 -0
  34. package/android/src/main/java/com/reactlibrary/DirectionsRendererModule.java +207 -0
  35. package/android/src/main/java/com/reactlibrary/DirectionsServiceModule.java +130 -0
  36. package/android/src/main/java/com/reactlibrary/MPDisplayRuleModule.java +816 -0
  37. package/android/src/main/java/com/reactlibrary/MapControlModule.java +661 -0
  38. package/android/src/main/java/com/reactlibrary/MapsIndoorsModule.java +327 -0
  39. package/android/src/main/java/com/reactlibrary/MapsIndoorsPackage.java +46 -0
  40. package/android/src/main/java/com/reactlibrary/MapsIndoorsViewManager.java +119 -0
  41. package/android/src/main/java/com/reactlibrary/UtilsModule.java +165 -0
  42. package/android/src/main/java/com/reactlibrary/models/Bounds.java +19 -0
  43. package/android/src/main/java/com/reactlibrary/models/Filter.java +77 -0
  44. package/android/src/main/java/com/reactlibrary/models/Location.java +17 -0
  45. package/android/src/main/java/com/reactlibrary/models/MPCameraPosition.java +29 -0
  46. package/android/src/main/java/com/reactlibrary/models/MPCameraUpdate.java +92 -0
  47. package/android/src/main/java/com/reactlibrary/models/MPError.java +38 -0
  48. package/android/src/main/java/com/reactlibrary/models/PositionProvider.java +46 -0
  49. package/android/src/main/java/com/reactlibrary/models/PositionResult.java +117 -0
  50. package/android/src/main/java/com/reactlibrary/models/Query.java +30 -0
  51. package/android/src/main/res/values/google_maps_api_key.xml +4 -0
  52. package/android/src/main/res/values/mapbox_api_key.xml +5 -0
  53. package/index.ts +184 -0
  54. package/ios/DirectionsRendererBridge.m +53 -0
  55. package/ios/DirectionsRendererModule.swift +187 -0
  56. package/ios/DirectionsServiceBridge.m +46 -0
  57. package/ios/DirectionsServiceModule.swift +149 -0
  58. package/ios/MPDisplayRuleBridge.m +410 -0
  59. package/ios/MPDisplayRuleModule.swift +845 -0
  60. package/ios/MapControlBridge.m +178 -0
  61. package/ios/MapControlModule.swift +602 -0
  62. package/ios/MapsIndoors.xcodeproj/project.pbxproj +318 -0
  63. package/ios/MapsIndoors.xcworkspace/contents.xcworkspacedata +7 -0
  64. package/ios/MapsIndoors.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  65. package/ios/MapsIndoorsBridge.m +98 -0
  66. package/ios/MapsIndoorsData.swift +203 -0
  67. package/ios/MapsIndoorsModule.swift +247 -0
  68. package/ios/MapsIndoorsViewManager.swift +30 -0
  69. package/ios/MapsIndoorsViewManagerBridge.m +9 -0
  70. package/ios/ReactPositionProvider.swift +25 -0
  71. package/ios/UtilsBridge.m +63 -0
  72. package/ios/UtilsModule.swift +146 -0
  73. package/ios/helpers.swift +57 -0
  74. package/ios/react-native-maps-indoors-Bridging-Header.h +6 -0
  75. package/package.json +52 -0
  76. package/react-native-maps-indoors-mapbox.podspec +30 -0
  77. package/src/EventNames.ts +21 -0
  78. package/src/MPBounds.ts +137 -0
  79. package/src/MPBuilding.ts +334 -0
  80. package/src/MPBuildingCollection.ts +57 -0
  81. package/src/MPBuildingInfo.ts +63 -0
  82. package/src/MPCameraEvent.ts +17 -0
  83. package/src/MPCameraEventListener.ts +17 -0
  84. package/src/MPCameraPosition.ts +83 -0
  85. package/src/MPCameraUpdate.ts +174 -0
  86. package/src/MPCameraViewFitMode.ts +21 -0
  87. package/src/MPCategory.ts +76 -0
  88. package/src/MPCategoryCollection.ts +62 -0
  89. package/src/MPCollection.ts +59 -0
  90. package/src/MPCollisionHandling.ts +12 -0
  91. package/src/MPDataField.ts +69 -0
  92. package/src/MPDirectionsRenderer.ts +194 -0
  93. package/src/MPDirectionsService.ts +119 -0
  94. package/src/MPDisplayRule.ts +1027 -0
  95. package/src/MPEntity.ts +60 -0
  96. package/src/MPEntityInfo.ts +28 -0
  97. package/src/MPError.ts +122 -0
  98. package/src/MPFilter.ts +168 -0
  99. package/src/MPFilterBehavior.ts +95 -0
  100. package/src/MPFloor.ts +170 -0
  101. package/src/MPFloorSelectorInterface.ts +63 -0
  102. package/src/MPGeometry.ts +91 -0
  103. package/src/MPHighway.ts +14 -0
  104. package/src/MPIconSize.ts +39 -0
  105. package/src/MPLocation.ts +386 -0
  106. package/src/MPLocationPropertyNames.ts +30 -0
  107. package/src/MPLocationType.ts +16 -0
  108. package/src/MPMapConfig.ts +211 -0
  109. package/src/MPMapStyle.ts +57 -0
  110. package/src/MPMultiPolygon.ts +205 -0
  111. package/src/MPPoint.ts +165 -0
  112. package/src/MPPolygon.ts +206 -0
  113. package/src/MPPositionProviderInterface.ts +45 -0
  114. package/src/MPPositionResultInterface.ts +42 -0
  115. package/src/MPPropertyData.ts +215 -0
  116. package/src/MPQuery.ts +69 -0
  117. package/src/MPRoute.ts +95 -0
  118. package/src/MPRouteCoordinate.ts +95 -0
  119. package/src/MPRouteLeg.ts +128 -0
  120. package/src/MPRouteProperty.ts +83 -0
  121. package/src/MPRouteStep.ts +176 -0
  122. package/src/MPSelectionBehavior.ts +93 -0
  123. package/src/MPSettings3D.ts +107 -0
  124. package/src/MPSize.ts +21 -0
  125. package/src/MPSolution.ts +180 -0
  126. package/src/MPSolutionConfig.ts +127 -0
  127. package/src/MPSolutionDisplayRule.ts +13 -0
  128. package/src/MPUserRole.ts +60 -0
  129. package/src/MPUserRoleCollection.ts +37 -0
  130. package/src/MPUtils.ts +157 -0
  131. package/src/MPVenue.ts +294 -0
  132. package/src/MPVenueCollection.ts +58 -0
  133. package/src/MPVenueInfo.ts +62 -0
  134. package/src/MapControl.ts +861 -0
  135. package/src/MapView.tsx +34 -0
  136. package/src/MapsIndoors.ts +530 -0
  137. package/src/OnBuildingFoundAtCameraTargetListener.ts +17 -0
  138. package/src/OnFloorSelectionChangedListener.ts +17 -0
  139. package/src/OnFloorUpdateListener.ts +16 -0
  140. package/src/OnLegSelectedListener.ts +17 -0
  141. package/src/OnLiveLocationUpdateListener.ts +17 -0
  142. package/src/OnLocationSelectedListener.ts +17 -0
  143. package/src/OnMapClickListener.ts +20 -0
  144. package/src/OnMarkerClickListener.ts +17 -0
  145. package/src/OnMarkerInfoWindowClickListener.ts +17 -0
  146. package/src/OnPositionUpdateListener.ts +17 -0
  147. package/src/OnVenueFoundAtCameraTargetListener.ts +17 -0
@@ -0,0 +1,91 @@
1
+ import MPPoint from "./MPPoint";
2
+ import MPPolygon from "./MPPolygon";
3
+ import MPMultiPolygon from "./MPMultiPolygon";
4
+ import MPUtils from "./MPUtils";
5
+
6
+ /**
7
+ * Superclass of all MapsIndoors geometry classes.
8
+ *
9
+ * @export
10
+ * @abstract
11
+ * @class MPGeometry
12
+ * @typedef {MPGeometry}
13
+ */
14
+ export default abstract class MPGeometry {
15
+ /**
16
+ * Typename for {@link MPPoint}.
17
+ *
18
+ * @public
19
+ * @static
20
+ * @readonly
21
+ * @type {string}
22
+ */
23
+ public static readonly point: string = "Point";
24
+ /**
25
+ * Typename for {@link MPPolygon}.
26
+ *
27
+ * @public
28
+ * @static
29
+ * @readonly
30
+ * @type {string}
31
+ */
32
+ public static readonly polygon: string = "Polygon";
33
+ /**
34
+ * Typename for {@link MPMultiPolygon}.
35
+ *
36
+ * @public
37
+ * @static
38
+ * @readonly
39
+ * @type {string}
40
+ */
41
+ public static readonly multiPolygon: string = "MultiPolygon";
42
+ /**
43
+ * Position of geometry, used as anchor for markers.
44
+ *
45
+ * @public
46
+ * @abstract
47
+ * @readonly
48
+ * @type {MPPoint}
49
+ */
50
+ public abstract readonly position: MPPoint;
51
+ /**
52
+ * Type of geometry, see {@link point}.
53
+ *
54
+ * @public
55
+ * @abstract
56
+ * @readonly
57
+ * @type {string}
58
+ */
59
+ public abstract readonly type: string;
60
+
61
+ /**
62
+ * Computes the area of the geometry.
63
+ *
64
+ * @public
65
+ * @abstract
66
+ * @returns {Promise<number>}
67
+ */
68
+ public abstract getArea(): Promise<number>;
69
+
70
+ /**
71
+ * Checks whether a point is contained within the geometry.
72
+ *
73
+ * @public
74
+ * @async
75
+ * @param {MPPoint} point
76
+ * @returns {Promise<boolean>}
77
+ */
78
+ public async contains(point: MPPoint): Promise<boolean> {
79
+ return MPUtils.geometryIsInside(point, this);
80
+ }
81
+
82
+ /**
83
+ * Stringifies the geometry to JSON.
84
+ *
85
+ * @public
86
+ * @returns {string}
87
+ */
88
+ public toJson(): string {
89
+ return JSON.stringify(this);
90
+ }
91
+ }
@@ -0,0 +1,14 @@
1
+ export enum MPHighway {
2
+ unclassified = "unclassified",
3
+ footway = "footway",
4
+ residential = "residential",
5
+ service = "service",
6
+ ramp = "ramp",
7
+ steps = "steps",
8
+ escalator = "escalator",
9
+ travelator = "travelator",
10
+ elevator = "elevator",
11
+ wheelChairRamp = "wheelchairramp",
12
+ wheelChairLift = "wheelchairlift",
13
+ ladder = "ladder",
14
+ }
@@ -0,0 +1,39 @@
1
+ import MPSize from "./MPSize";
2
+
3
+ /**
4
+ * Class to hold height and width information for an icon.
5
+ *
6
+ * @export
7
+ * @class MPIconSize
8
+ * @typedef {MPIconSize}
9
+ * @implements {MPSize}
10
+ */
11
+ export default class MPIconSize implements MPSize {
12
+ /**
13
+ * Creates an instance of MPIconSize.
14
+ *
15
+ * @constructor
16
+ * @private
17
+ * @param {number} height The height measure.
18
+ * @param {number} width The width measure.
19
+ */
20
+ private constructor(
21
+ public readonly height: number,
22
+ public readonly width: number
23
+ ) { }
24
+
25
+ /**
26
+ * Creator for MPIconSize, used to decode JSON from the MapsIndoors SDK.
27
+ *
28
+ * @public
29
+ * @static
30
+ * @param {MPSize} object
31
+ * @returns {MPIconSize}
32
+ */
33
+ public static create(object: MPSize): MPIconSize {
34
+ return new MPIconSize(
35
+ object?.height,
36
+ object?.width,
37
+ );
38
+ }
39
+ }
@@ -0,0 +1,386 @@
1
+ import { Platform } from "react-native";
2
+ import { MPGeometry, MPPoint, MPPolygon, MPBuilding, MPVenue, MPMultiPolygon, MPBounds, MPLocationType, MPLocationPropertyNames } from "../index";
3
+ import MPEntity from "./MPEntity";
4
+ import MPPropertyData from "./MPPropertyData";
5
+
6
+ /**
7
+ * A MapsIndoors geographical entity. A location can exist anywhere,
8
+ * but it is usually only used inside {@link MPVenue}s and {@link MPBuilding}s.
9
+ *
10
+ * @export
11
+ * @class MPLocation
12
+ * @typedef {MPLocation}
13
+ * @extends {MPEntity}
14
+ */
15
+ export default class MPLocation extends MPEntity {
16
+ /**
17
+ * The locations bounds
18
+ *
19
+ * @private
20
+ * @type {?MPBounds}
21
+ */
22
+ public bounds?: MPBounds;
23
+
24
+ /**
25
+ * Get whether this location's geometry is a {@link MPPoint}.
26
+ *
27
+ * @public
28
+ * @readonly
29
+ * @type {boolean}
30
+ */
31
+ public get isPoint(): boolean {
32
+ return this.geometry instanceof MPPoint;
33
+ }
34
+
35
+ /**
36
+ * Get the location's position.
37
+ *
38
+ * @public
39
+ * @override
40
+ * @readonly
41
+ * @type {MPPoint}
42
+ */
43
+ public override get position(): MPPoint {
44
+ return this.properties?.anchor ?? new MPPoint(0, 0);
45
+ }
46
+
47
+ /**
48
+ * Creates an instance of MPLocation.
49
+ *
50
+ * @constructor
51
+ * @private
52
+ * @param {string} id The location's ID.
53
+ * @param {string[]} restrictions An array of restrictions placed on the location.
54
+ * @param {?MPGeometry} [geometry] The geometry of the location.
55
+ * @param {?MPPropertyData} [properties] The location's properties.
56
+ */
57
+ private constructor(
58
+ readonly id: string,
59
+ readonly restrictions: string[],
60
+ readonly geometry?: MPGeometry,
61
+ private properties?: MPPropertyData,
62
+ ) {
63
+ super("MPLocation");
64
+ switch (this.geometry?.type) {
65
+ case MPGeometry.multiPolygon:
66
+ case MPGeometry.polygon: {
67
+ this.bounds = (this.geometry as MPPolygon | MPMultiPolygon).bounds;
68
+ break;
69
+ }
70
+ case MPGeometry.point:
71
+ default: {
72
+ this.bounds = new MPBounds(this.position, this.position);
73
+ break;
74
+ }
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Creator for MPLocation, used to decode JSON from the MapsIndoors SDK.
80
+ *
81
+ * @public
82
+ * @static
83
+ * @param {?*} [object]
84
+ * @returns {MPLocation}
85
+ */
86
+ public static create(object?: any): MPLocation {
87
+ // TODO: make sure iOS sends geometry too
88
+
89
+ let geo: MPGeometry | undefined;
90
+ if (object?.geometry) {
91
+ if (Platform.OS === 'ios') {
92
+ switch (object?.geometryType) {
93
+ case MPGeometry.point:
94
+ geo = MPPoint.create(object?.geometry);
95
+ break;
96
+ case MPGeometry.polygon:
97
+ geo = MPPolygon.create({coordinates: object?.geometry, bbox: [].concat(object?.entityBounds?.northeast, object?.entityBounds?.southwest)});
98
+ break;
99
+ case MPGeometry.multiPolygon:
100
+ geo = MPMultiPolygon.create({coordinates: object?.geometry, bbox: [].concat(object?.entityBounds?.northeast, object?.entityBounds?.southwest)})
101
+ break;
102
+ default:
103
+ break;
104
+ }
105
+ }else {
106
+ switch (object?.geometry?.type) {
107
+ case MPGeometry.point:
108
+ geo = MPPoint.create(object?.geometry);
109
+ break;
110
+ case MPGeometry.polygon:
111
+ geo = MPPolygon.create(object?.geometry);
112
+ break;
113
+ case MPGeometry.multiPolygon:
114
+ geo = MPMultiPolygon.create(object?.geometry);
115
+ break;
116
+ default:
117
+ break;
118
+ }
119
+ }
120
+ }
121
+
122
+ return new MPLocation(
123
+ object?.id,
124
+ object?.restrictions,
125
+ geo,
126
+ MPPropertyData.create(object?.properties),
127
+ );
128
+
129
+ }
130
+
131
+ /**
132
+ * Get the location's name.
133
+ *
134
+ * @public
135
+ * @readonly
136
+ * @type {string}
137
+ */
138
+ public get name(): string {
139
+ return this.properties?.name!;
140
+ }
141
+
142
+ /**
143
+ * Get the location's aliases.
144
+ *
145
+ * @public
146
+ * @readonly
147
+ * @type {string[]}
148
+ */
149
+ public get aliases(): string[] {
150
+ return this.properties?.aliases!;
151
+ }
152
+
153
+ /**
154
+ * Get the location's categories.
155
+ *
156
+ * @public
157
+ * @readonly
158
+ * @type {(string[] | undefined)}
159
+ */
160
+ public get categories(): string[] | undefined {
161
+ return (this.properties?.categories !== undefined) ?
162
+ Array.from(this.properties!.categories!.values()) :
163
+ undefined;
164
+ }
165
+
166
+ /**
167
+ * Get the location's floorIndex.
168
+ *
169
+ * @public
170
+ * @readonly
171
+ * @type {number}
172
+ */
173
+ public get floorIndex(): number {
174
+ return this.properties?.floor!;
175
+ }
176
+
177
+ /**
178
+ * Get the name of the floor the location is on.
179
+ *
180
+ * @public
181
+ * @readonly
182
+ * @type {string}
183
+ */
184
+ public get floorName(): string {
185
+ return this.properties?.floorName!;
186
+ }
187
+
188
+ /**
189
+ * Get the name of the building the location is in.
190
+ *
191
+ * @public
192
+ * @readonly
193
+ * @type {string}
194
+ */
195
+ public get buildingName(): string {
196
+ return this.properties?.building!;
197
+ }
198
+
199
+ /**
200
+ * Get the name of the venue the location is on.
201
+ *
202
+ * @public
203
+ * @readonly
204
+ * @type {string}
205
+ */
206
+ public get venueName(): string {
207
+ return this.properties?.venue!;
208
+ }
209
+
210
+ /**
211
+ * Get the location's type name.
212
+ *
213
+ * @public
214
+ * @readonly
215
+ * @type {string}
216
+ */
217
+ public get typeName(): string {
218
+ return this.properties?.type!;
219
+ }
220
+
221
+ /**
222
+ * Get the location's description.
223
+ *
224
+ * @public
225
+ * @readonly
226
+ * @type {string}
227
+ */
228
+ public get description(): string {
229
+ return this.properties?.description!;
230
+ }
231
+
232
+ /**
233
+ * Get the location's external identifier.
234
+ *
235
+ * @public
236
+ * @readonly
237
+ * @type {string}
238
+ */
239
+ public get externalId(): string {
240
+ return this.properties?.externalId!;
241
+ }
242
+
243
+ /**
244
+ * Get the time location is active from.
245
+ *
246
+ * @public
247
+ * @readonly
248
+ * @type {number}
249
+ */
250
+ public get activeFrom(): number {
251
+ return this.properties?.activeFrom!;
252
+ }
253
+
254
+ /**
255
+ * Get the time location is active to.
256
+ *
257
+ * @public
258
+ * @readonly
259
+ * @type {number}
260
+ */
261
+ public get activeTo(): number {
262
+ return this.properties?.activeTo!;
263
+ }
264
+
265
+ /**
266
+ * Get the URL of the location's icon image.
267
+ *
268
+ * @public
269
+ * @readonly
270
+ * @type {string}
271
+ */
272
+ public get imageUrl(): string {
273
+ return this.properties?.imageUrl!;
274
+ }
275
+
276
+ /**
277
+ * Get whether the location is bookable.
278
+ *
279
+ * @public
280
+ * @returns {boolean}
281
+ */
282
+ public isBookable(): boolean {
283
+ return this.properties?.bookable ?? false;
284
+ }
285
+
286
+ /**
287
+ * Get the location's basetype.
288
+ *
289
+ * @public
290
+ * @readonly
291
+ * @type {MPLocationType}
292
+ */
293
+ public get baseType(): MPLocationType {
294
+ switch (this.properties?.type) {
295
+ case "area": {
296
+ return MPLocationType.area;
297
+ }
298
+ case "venue": {
299
+ return MPLocationType.venue;
300
+ }
301
+ case "building": {
302
+ return MPLocationType.building;
303
+ }
304
+ case "room": {
305
+ return MPLocationType.room;
306
+ }
307
+ case "floor": {
308
+ return MPLocationType.floor;
309
+ }
310
+ case "asset": {
311
+ return MPLocationType.asset;
312
+ }
313
+ case "poi":
314
+ default: {
315
+ return MPLocationType.poi;
316
+ }
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Get a property of the location.
322
+ *
323
+ * @public
324
+ * @param {MPLocationPropertyNames} key
325
+ * @returns {*}
326
+ */
327
+ public getProperty(key: MPLocationPropertyNames): any {
328
+ switch (key) {
329
+ case MPLocationPropertyNames.name: {
330
+ return this.properties?.name;
331
+ }
332
+ case MPLocationPropertyNames.aliases: {
333
+ return this.properties?.aliases;
334
+ }
335
+ case MPLocationPropertyNames.categories: {
336
+ return this.properties?.categories;
337
+ }
338
+ case MPLocationPropertyNames.floor: {
339
+ return this.properties?.floor;
340
+ }
341
+ case MPLocationPropertyNames.floorName: {
342
+ return this.properties?.floorName;
343
+ }
344
+ case MPLocationPropertyNames.building: {
345
+ return this.properties?.building;
346
+ }
347
+ case MPLocationPropertyNames.venue: {
348
+ return this.properties?.venue;
349
+ }
350
+ case MPLocationPropertyNames.type: {
351
+ return this.properties?.type;
352
+ }
353
+ case MPLocationPropertyNames.description: {
354
+ return this.properties?.description;
355
+ }
356
+ case MPLocationPropertyNames.roomId:
357
+ case MPLocationPropertyNames.externalId: {
358
+ return this.properties?.externalId;
359
+ }
360
+ case MPLocationPropertyNames.activeFrom: {
361
+ return this.properties?.activeFrom;
362
+ }
363
+ case MPLocationPropertyNames.activeTo: {
364
+ return this.properties?.activeTo;
365
+ }
366
+ case MPLocationPropertyNames.contact: {
367
+ return this.properties?.contact;
368
+ }
369
+ case MPLocationPropertyNames.fields: {
370
+ return this.properties?.fields;
371
+ }
372
+ case MPLocationPropertyNames.imageURL: {
373
+ return this.properties?.imageUrl;
374
+ }
375
+ case MPLocationPropertyNames.locationType: {
376
+ return this.properties?.locationType;
377
+ }
378
+ case MPLocationPropertyNames.anchor: {
379
+ return this.properties?.anchor;
380
+ }
381
+ case MPLocationPropertyNames.bookable: {
382
+ return this.properties?.bookable;
383
+ }
384
+ }
385
+ }
386
+ }
@@ -0,0 +1,30 @@
1
+ import MPLocation from "./MPLocation";
2
+
3
+ /**
4
+ * Enumerated names of properties on {@link MPLocation}s.
5
+ *
6
+ * @export
7
+ * @enum {number}
8
+ */
9
+ export enum MPLocationPropertyNames {
10
+ name = "name",
11
+ aliases = "aliases",
12
+ categories = "categories",
13
+ floor = "floor",
14
+ floorName = "floorName",
15
+ building = "building",
16
+ venue = "venue",
17
+ //DISPLAY_RULE,
18
+ type = "type",
19
+ description = "description",
20
+ roomId = "roomId",
21
+ externalId = "externalId",
22
+ activeFrom = "activeFrom",
23
+ activeTo = "activeTo",
24
+ contact = "contact",
25
+ fields = "fields",
26
+ imageURL = "imageURL",
27
+ locationType = "locationType",
28
+ anchor = "anchor",
29
+ bookable = "bookable",
30
+ }
@@ -0,0 +1,16 @@
1
+ import MPLocation from "./MPLocation";
2
+ /**
3
+ * Base type of a {@link MPLocation}.
4
+ *
5
+ * @export
6
+ * @enum {number}
7
+ */
8
+ export enum MPLocationType {
9
+ room,
10
+ poi,
11
+ building,
12
+ venue,
13
+ area,
14
+ asset,
15
+ floor
16
+ }