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