@mapsindoors/react-native-maps-indoors-mapbox 2.6.0 → 2.6.1

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 (135) hide show
  1. package/README.md +2 -2
  2. package/android/build.gradle +1 -1
  3. package/package.json +1 -1
  4. package/react-native-maps-indoors-mapbox.podspec +2 -2
  5. package/android/src/main/java/com/mapsindoorsrn/core/DirectionsRendererModule.java +0 -322
  6. package/android/src/main/java/com/mapsindoorsrn/core/DirectionsServiceModule.java +0 -166
  7. package/android/src/main/java/com/mapsindoorsrn/core/MPDisplayRuleModule.java +0 -1699
  8. package/android/src/main/java/com/mapsindoorsrn/core/MapControlModule.java +0 -761
  9. package/android/src/main/java/com/mapsindoorsrn/core/MapsIndoorsModule.java +0 -410
  10. package/android/src/main/java/com/mapsindoorsrn/core/RCMapView.java +0 -16
  11. package/android/src/main/java/com/mapsindoorsrn/core/README.md +0 -3
  12. package/android/src/main/java/com/mapsindoorsrn/core/UtilsModule.java +0 -227
  13. package/android/src/main/java/com/mapsindoorsrn/core/models/BitmapStopIconConfig.java +0 -22
  14. package/android/src/main/java/com/mapsindoorsrn/core/models/Bounds.java +0 -19
  15. package/android/src/main/java/com/mapsindoorsrn/core/models/Filter.java +0 -77
  16. package/android/src/main/java/com/mapsindoorsrn/core/models/Location.java +0 -17
  17. package/android/src/main/java/com/mapsindoorsrn/core/models/MPCameraPosition.java +0 -34
  18. package/android/src/main/java/com/mapsindoorsrn/core/models/MPCameraUpdate.java +0 -68
  19. package/android/src/main/java/com/mapsindoorsrn/core/models/MPError.java +0 -38
  20. package/android/src/main/java/com/mapsindoorsrn/core/models/PositionProvider.java +0 -46
  21. package/android/src/main/java/com/mapsindoorsrn/core/models/PositionResult.java +0 -117
  22. package/android/src/main/java/com/mapsindoorsrn/core/models/Query.java +0 -30
  23. package/android/src/main/java/com/mapsindoorsrn/core/models/RouteStopIconConfigModel.java +0 -35
  24. package/ios/core/CameraPosition.swift +0 -15
  25. package/ios/core/CameraUpdate.swift +0 -19
  26. package/ios/core/CameraUpdateError.swift +0 -11
  27. package/ios/core/DirectionsRendererBridge.m +0 -59
  28. package/ios/core/DirectionsRendererModule.swift +0 -359
  29. package/ios/core/DirectionsServiceBridge.m +0 -55
  30. package/ios/core/DirectionsServiceModule.swift +0 -186
  31. package/ios/core/IconStopUrl.swift +0 -17
  32. package/ios/core/LabelGraphic.swift +0 -15
  33. package/ios/core/MPDisplayRuleBridge.m +0 -696
  34. package/ios/core/MPDisplayRuleModule.swift +0 -1704
  35. package/ios/core/MapControlBridge.m +0 -213
  36. package/ios/core/MapControlModule.swift +0 -702
  37. package/ios/core/MapsIndoorsBridge.m +0 -128
  38. package/ios/core/MapsIndoorsData.swift +0 -288
  39. package/ios/core/MapsIndoorsModule.swift +0 -363
  40. package/ios/core/RCMapView.swift +0 -16
  41. package/ios/core/README.md +0 -3
  42. package/ios/core/ReactPositionProvider.swift +0 -27
  43. package/ios/core/RouteIcon.swift +0 -34
  44. package/ios/core/UtilsBridge.m +0 -73
  45. package/ios/core/UtilsModule.swift +0 -182
  46. package/ios/core/helpers.swift +0 -57
  47. package/src/core/EventNames.ts +0 -21
  48. package/src/core/MPAdditionalDetail.ts +0 -102
  49. package/src/core/MPBadgePosition.ts +0 -12
  50. package/src/core/MPBounds.ts +0 -155
  51. package/src/core/MPBuilding.ts +0 -333
  52. package/src/core/MPBuildingCollection.ts +0 -57
  53. package/src/core/MPBuildingInfo.ts +0 -63
  54. package/src/core/MPCameraEvent.ts +0 -17
  55. package/src/core/MPCameraEventListener.ts +0 -17
  56. package/src/core/MPCameraPosition.ts +0 -82
  57. package/src/core/MPCameraUpdate.ts +0 -174
  58. package/src/core/MPCameraViewFitMode.ts +0 -25
  59. package/src/core/MPCategory.ts +0 -85
  60. package/src/core/MPCategoryCollection.ts +0 -62
  61. package/src/core/MPCollection.ts +0 -59
  62. package/src/core/MPCollisionHandling.ts +0 -12
  63. package/src/core/MPDailyOpeningHours.ts +0 -67
  64. package/src/core/MPDataField.ts +0 -69
  65. package/src/core/MPDetailType.ts +0 -73
  66. package/src/core/MPDirectionsRenderer.ts +0 -238
  67. package/src/core/MPDirectionsService.ts +0 -152
  68. package/src/core/MPDisplayRule.ts +0 -1823
  69. package/src/core/MPEntity.ts +0 -60
  70. package/src/core/MPEntityInfo.ts +0 -28
  71. package/src/core/MPError.ts +0 -122
  72. package/src/core/MPFeatureTypes.ts +0 -8
  73. package/src/core/MPFilter.ts +0 -168
  74. package/src/core/MPFilterBehavior.ts +0 -115
  75. package/src/core/MPFloor.ts +0 -170
  76. package/src/core/MPFloorSelectorInterface.ts +0 -63
  77. package/src/core/MPGeometry.ts +0 -91
  78. package/src/core/MPHighlightBehavior.ts +0 -115
  79. package/src/core/MPHighway.ts +0 -14
  80. package/src/core/MPIconPlacement.ts +0 -13
  81. package/src/core/MPIconSize.ts +0 -39
  82. package/src/core/MPLabelGraphic.ts +0 -24
  83. package/src/core/MPLabelPosition.ts +0 -12
  84. package/src/core/MPLabelType.ts +0 -11
  85. package/src/core/MPLocation.ts +0 -440
  86. package/src/core/MPLocationPropertyNames.ts +0 -30
  87. package/src/core/MPLocationSettings.ts +0 -40
  88. package/src/core/MPLocationType.ts +0 -16
  89. package/src/core/MPMapConfig.ts +0 -280
  90. package/src/core/MPMapStyle.ts +0 -57
  91. package/src/core/MPMultiPolygon.ts +0 -218
  92. package/src/core/MPOpeningHours.ts +0 -48
  93. package/src/core/MPPOIType.ts +0 -43
  94. package/src/core/MPPoint.ts +0 -169
  95. package/src/core/MPPolygon.ts +0 -219
  96. package/src/core/MPPositionProviderInterface.ts +0 -45
  97. package/src/core/MPPositionResultInterface.ts +0 -42
  98. package/src/core/MPPropertyData.ts +0 -234
  99. package/src/core/MPQuery.ts +0 -69
  100. package/src/core/MPRoute.ts +0 -105
  101. package/src/core/MPRouteCoordinate.ts +0 -95
  102. package/src/core/MPRouteLeg.ts +0 -158
  103. package/src/core/MPRouteProperty.ts +0 -83
  104. package/src/core/MPRouteStep.ts +0 -186
  105. package/src/core/MPRouteStopIconConfig.ts +0 -82
  106. package/src/core/MPSelectionBehavior.ts +0 -114
  107. package/src/core/MPSelectionMode.ts +0 -4
  108. package/src/core/MPSettings3D.ts +0 -107
  109. package/src/core/MPSize.ts +0 -21
  110. package/src/core/MPSolution.ts +0 -189
  111. package/src/core/MPSolutionConfig.ts +0 -188
  112. package/src/core/MPSolutionDisplayRule.ts +0 -15
  113. package/src/core/MPUserRole.ts +0 -60
  114. package/src/core/MPUserRoleCollection.ts +0 -37
  115. package/src/core/MPUtils.ts +0 -178
  116. package/src/core/MPVenue.ts +0 -294
  117. package/src/core/MPVenueCollection.ts +0 -58
  118. package/src/core/MPVenueInfo.ts +0 -62
  119. package/src/core/MPWeeklyOpeningHours.ts +0 -129
  120. package/src/core/MapControl.ts +0 -961
  121. package/src/core/MapView.tsx +0 -34
  122. package/src/core/MapsIndoors.ts +0 -571
  123. package/src/core/OnBuildingFoundAtCameraTargetListener.ts +0 -17
  124. package/src/core/OnFloorSelectionChangedListener.ts +0 -17
  125. package/src/core/OnFloorUpdateListener.ts +0 -16
  126. package/src/core/OnLegSelectedListener.ts +0 -17
  127. package/src/core/OnLiveLocationUpdateListener.ts +0 -17
  128. package/src/core/OnLocationSelectedListener.ts +0 -17
  129. package/src/core/OnMapClickListener.ts +0 -20
  130. package/src/core/OnMarkerClickListener.ts +0 -17
  131. package/src/core/OnMarkerInfoWindowClickListener.ts +0 -17
  132. package/src/core/OnPositionUpdateListener.ts +0 -17
  133. package/src/core/OnVenueFoundAtCameraTargetListener.ts +0 -17
  134. package/src/core/README.md +0 -3
  135. package/src/core/RouteStopIconConfig.ts +0 -10
@@ -1,440 +0,0 @@
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
- import MPLocationSettings from "./MPLocationSettings";
6
- import { MPAdditionalDetail } from "./MPAdditionalDetail";
7
- import { MPDetailType } from "./MPDetailType";
8
-
9
- /**
10
- * A MapsIndoors geographical entity. A location can exist anywhere,
11
- * but it is usually only used inside {@link MPVenue}s and {@link MPBuilding}s.
12
- *
13
- * @export
14
- * @class MPLocation
15
- * @typedef {MPLocation}
16
- * @extends {MPEntity}
17
- */
18
- export default class MPLocation extends MPEntity {
19
- /**
20
- * The locations bounds
21
- *
22
- * @private
23
- * @type {?MPBounds}
24
- */
25
- public bounds?: MPBounds;
26
-
27
- /**
28
- * Get whether this location's geometry is a {@link MPPoint}.
29
- *
30
- * @public
31
- * @readonly
32
- * @type {boolean}
33
- */
34
- public get isPoint(): boolean {
35
- return this.geometry instanceof MPPoint;
36
- }
37
-
38
- /**
39
- * Get the location's position.
40
- *
41
- * @public
42
- * @override
43
- * @readonly
44
- * @type {MPPoint}
45
- */
46
- public override get position(): MPPoint {
47
- return this.properties?.anchor ? this.properties.anchor : new MPPoint(0, 0);
48
- }
49
-
50
- /**
51
- * Creates an instance of MPLocation.
52
- *
53
- * @constructor
54
- * @private
55
- * @param {string} id The location's ID.
56
- * @param {string[]} restrictions An array of restrictions placed on the location.
57
- * @param {?MPGeometry} [geometry] The geometry of the location.
58
- * @param {?MPPropertyData} [properties] The location's properties.
59
- */
60
- private constructor(
61
- readonly id: string,
62
- readonly restrictions: string[],
63
- readonly geometry?: MPGeometry,
64
- private properties?: MPPropertyData,
65
- ) {
66
- super("MPLocation");
67
- switch (this.geometry?.type) {
68
- case MPGeometry.multiPolygon:
69
- case MPGeometry.polygon: {
70
- this.bounds = (this.geometry as MPPolygon | MPMultiPolygon).bounds;
71
- break;
72
- }
73
- case MPGeometry.point:
74
- default: {
75
- this.bounds = new MPBounds(this.position, this.position);
76
- break;
77
- }
78
- }
79
- }
80
-
81
- /**
82
- * Creator for MPLocation, used to decode JSON from the MapsIndoors SDK.
83
- *
84
- * @public
85
- * @static
86
- * @param {?*} [object]
87
- * @returns {MPLocation}
88
- */
89
- public static create(object?: any): MPLocation {
90
- // TODO: make sure iOS sends geometry too
91
-
92
- let geo: MPGeometry | undefined;
93
- if (object?.geometry) {
94
- if (Platform.OS === 'ios') {
95
- switch (object?.geometryType) {
96
- case MPGeometry.point:
97
- geo = MPPoint.create(object?.geometry);
98
- break;
99
- case MPGeometry.polygon:
100
- geo = MPPolygon.create({coordinates: object?.geometry, bbox: [].concat(object?.entityBounds?.southwest, object?.entityBounds?.northeast)});
101
- break;
102
- case MPGeometry.multiPolygon:
103
- geo = MPMultiPolygon.create({coordinates: object?.geometry, bbox: [].concat(object?.entityBounds?.southwest, object?.entityBounds?.northeast)})
104
- break;
105
- default:
106
- break;
107
- }
108
- }else {
109
- switch (object?.geometry?.type) {
110
- case MPGeometry.point:
111
- geo = MPPoint.create(object?.geometry);
112
- break;
113
- case MPGeometry.polygon:
114
- geo = MPPolygon.create(object?.geometry);
115
- break;
116
- case MPGeometry.multiPolygon:
117
- geo = MPMultiPolygon.create(object?.geometry);
118
- break;
119
- default:
120
- break;
121
- }
122
- }
123
- }
124
-
125
- if (object && object.properties && Platform.OS === 'ios') {
126
- object.properties.locationSettings = object.locationSettings
127
- }
128
-
129
- return new MPLocation(
130
- object?.id,
131
- object?.restrictions,
132
- geo,
133
- MPPropertyData.create(object?.properties, object?.id),
134
- );
135
-
136
- }
137
-
138
- /**
139
- * Get the location's name.
140
- *
141
- * @public
142
- * @readonly
143
- * @type {string}
144
- */
145
- public get name(): string {
146
- return this.properties?.name!;
147
- }
148
-
149
- /**
150
- * Get the location's aliases.
151
- *
152
- * @public
153
- * @readonly
154
- * @type {string[]}
155
- */
156
- public get aliases(): string[] {
157
- return this.properties?.aliases!;
158
- }
159
-
160
- /**
161
- * Get the location's categories.
162
- *
163
- * @public
164
- * @readonly
165
- * @type {(string[] | undefined)}
166
- */
167
- public get categories(): string[] | undefined {
168
- return (this.properties?.categories !== undefined) ?
169
- Array.from(this.properties!.categories!.values()) :
170
- undefined;
171
- }
172
-
173
- /**
174
- * Get the location's floorIndex.
175
- *
176
- * @public
177
- * @readonly
178
- * @type {number}
179
- */
180
- public get floorIndex(): number {
181
- return this.properties?.floor!;
182
- }
183
-
184
- /**
185
- * Get the name of the floor the location is on.
186
- *
187
- * @public
188
- * @readonly
189
- * @type {string}
190
- */
191
- public get floorName(): string {
192
- return this.properties?.floorName!;
193
- }
194
-
195
- /**
196
- * Get the name of the building the location is in.
197
- *
198
- * @public
199
- * @readonly
200
- * @type {string}
201
- */
202
- public get buildingName(): string {
203
- return this.properties?.building!;
204
- }
205
-
206
- /**
207
- * Get the name of the venue the location is on.
208
- *
209
- * @public
210
- * @readonly
211
- * @type {string}
212
- */
213
- public get venueName(): string {
214
- return this.properties?.venue!;
215
- }
216
-
217
- /**
218
- * Get the location's type name.
219
- *
220
- * @public
221
- * @readonly
222
- * @type {string}
223
- */
224
- public get typeName(): string {
225
- return this.properties?.type!;
226
- }
227
-
228
- /**
229
- * Get the location's description.
230
- *
231
- * @public
232
- * @readonly
233
- * @type {string}
234
- */
235
- public get description(): string {
236
- return this.properties?.description!;
237
- }
238
-
239
- /**
240
- * Get the location's external identifier.
241
- *
242
- * @public
243
- * @readonly
244
- * @type {string}
245
- */
246
- public get externalId(): string {
247
- return this.properties?.externalId!;
248
- }
249
-
250
- /**
251
- * Get the time location is active from.
252
- *
253
- * @public
254
- * @readonly
255
- * @type {number}
256
- */
257
- public get activeFrom(): number {
258
- return this.properties?.activeFrom!;
259
- }
260
-
261
- /**
262
- * Get the time location is active to.
263
- *
264
- * @public
265
- * @readonly
266
- * @type {number}
267
- */
268
- public get activeTo(): number {
269
- return this.properties?.activeTo!;
270
- }
271
-
272
- /**
273
- * Get the URL of the location's icon image.
274
- *
275
- * @public
276
- * @readonly
277
- * @type {string}
278
- */
279
- public get imageUrl(): string {
280
- return this.properties?.imageUrl!;
281
- }
282
-
283
- /**
284
- * Get whether the location is bookable.
285
- *
286
- * @public
287
- * @returns {boolean}
288
- */
289
- public isBookable(): boolean {
290
- return this.properties?.bookable ? this.properties.bookable : false;
291
- }
292
-
293
- /**
294
- * Set the location's selectable flag.
295
- */
296
- set selectable(selectable: boolean | undefined) {
297
- if (this.properties?.locationSettings) {
298
- this.properties.locationSettings.selectable = selectable;
299
- }else if (this.properties) {
300
- this.properties.locationSettings = MPLocationSettings.create(this.name, { selectable });
301
- this.properties.locationSettings.selectable = selectable;
302
- }
303
- }
304
-
305
- /**
306
- * Get the location's selectable flag.
307
- */
308
- get selectable(): boolean | null {
309
- return this.properties?.locationSettings?.selectable ?? null;
310
- }
311
-
312
- /**
313
- * Get the location's basetype.
314
- *
315
- * @public
316
- * @readonly
317
- * @type {MPLocationType}
318
- */
319
- public get baseType(): MPLocationType {
320
- switch (this.properties?.type) {
321
- case "area": {
322
- return MPLocationType.area;
323
- }
324
- case "venue": {
325
- return MPLocationType.venue;
326
- }
327
- case "building": {
328
- return MPLocationType.building;
329
- }
330
- case "room": {
331
- return MPLocationType.room;
332
- }
333
- case "floor": {
334
- return MPLocationType.floor;
335
- }
336
- case "asset": {
337
- return MPLocationType.asset;
338
- }
339
- case "poi":
340
- default: {
341
- return MPLocationType.poi;
342
- }
343
- }
344
- }
345
-
346
- /**
347
- * Get a property of the location.
348
- *
349
- * @public
350
- * @param {MPLocationPropertyNames} key
351
- * @returns {*}
352
- */
353
- public getProperty(key: MPLocationPropertyNames): any {
354
- switch (key) {
355
- case MPLocationPropertyNames.name: {
356
- return this.properties?.name;
357
- }
358
- case MPLocationPropertyNames.aliases: {
359
- return this.properties?.aliases;
360
- }
361
- case MPLocationPropertyNames.categories: {
362
- return this.properties?.categories;
363
- }
364
- case MPLocationPropertyNames.floor: {
365
- return this.properties?.floor;
366
- }
367
- case MPLocationPropertyNames.floorName: {
368
- return this.properties?.floorName;
369
- }
370
- case MPLocationPropertyNames.building: {
371
- return this.properties?.building;
372
- }
373
- case MPLocationPropertyNames.venue: {
374
- return this.properties?.venue;
375
- }
376
- case MPLocationPropertyNames.type: {
377
- return this.properties?.type;
378
- }
379
- case MPLocationPropertyNames.description: {
380
- return this.properties?.description;
381
- }
382
- case MPLocationPropertyNames.roomId:
383
- case MPLocationPropertyNames.externalId: {
384
- return this.properties?.externalId;
385
- }
386
- case MPLocationPropertyNames.activeFrom: {
387
- return this.properties?.activeFrom;
388
- }
389
- case MPLocationPropertyNames.activeTo: {
390
- return this.properties?.activeTo;
391
- }
392
- case MPLocationPropertyNames.contact: {
393
- return this.properties?.contact;
394
- }
395
- case MPLocationPropertyNames.fields: {
396
- return this.properties?.fields;
397
- }
398
- case MPLocationPropertyNames.imageURL: {
399
- return this.properties?.imageUrl;
400
- }
401
- case MPLocationPropertyNames.locationType: {
402
- return this.properties?.locationType;
403
- }
404
- case MPLocationPropertyNames.anchor: {
405
- return this.properties?.anchor;
406
- }
407
- case MPLocationPropertyNames.bookable: {
408
- return this.properties?.bookable;
409
- }
410
- }
411
- }
412
-
413
- /**
414
- * Gets the location's additional details, if any
415
- * @returns a list of additional details, or null if none were set
416
- */
417
- public getAdditionalDetails(): MPAdditionalDetail[] | null {
418
- if (this.properties?.additionalDetails) {
419
- // Return a readonly copy of the array to prevent external modifications
420
- return [...this.properties.additionalDetails];
421
- }
422
- return null;
423
- }
424
-
425
- /**
426
- * Gets a specific additional detail from the location's additional details
427
- * @param type the type of the additional detail to get
428
- * @returns the additional detail of the specified type, or null if it does not exist
429
- */
430
- public getAdditionalDetail(type: MPDetailType): MPAdditionalDetail | null {
431
- if (this.properties?.additionalDetails) {
432
- for (const detail of this.properties.additionalDetails) {
433
- if (detail.detailType.toLowerCase() === type.toLowerCase() ) {
434
- return detail;
435
- }
436
- }
437
- }
438
- return null;
439
- }
440
- }
@@ -1,30 +0,0 @@
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
- }
@@ -1,40 +0,0 @@
1
- import MPUtils from "./MPUtils";
2
-
3
- export default class MPLocationSettings {
4
- /**
5
- * @constructor
6
- * @private
7
- * @param selectable
8
- */
9
- private constructor(
10
- readonly id: string,
11
- private _selectable?: boolean,
12
- ) {}
13
-
14
- /**
15
- * Creator for MPLocationSettings, used to decode JSON from the MapsIndoors SDK.
16
- *
17
- * @static
18
- * @param {MPLocationSettingsParams} object
19
- * @returns {MPLocationSettings}
20
- */
21
- public static create(id: string, object: MPLocationSettingsParams): MPLocationSettings {
22
- return new MPLocationSettings(
23
- id,
24
- object?.selectable,
25
- );
26
- }
27
-
28
- set selectable(selectable: boolean | undefined) {
29
- this._selectable = selectable;
30
- MPUtils.setSelectable(this.id, selectable);
31
- }
32
-
33
- get selectable(): boolean | undefined {
34
- return this._selectable;
35
- }
36
- }
37
-
38
- export interface MPLocationSettingsParams {
39
- selectable?: boolean;
40
- }
@@ -1,16 +0,0 @@
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
- }