@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,1027 @@
1
+ import { NativeModules } from 'react-native';
2
+ import { MPError, MPIconSize } from "../index";
3
+ const { DisplayRule } = NativeModules;
4
+
5
+
6
+ /**
7
+ * A collection of settings that dictate how MapsIndoors entities are displayed on the map.
8
+ *
9
+ * @export
10
+ * @class MPDisplayRule
11
+ * @typedef {MPDisplayRule}
12
+ */
13
+ export default class MPDisplayRule {
14
+
15
+ /**
16
+ * Creates an instance of MPDisplayRule.
17
+ *
18
+ * @constructor
19
+ * @private
20
+ * @param {string} id
21
+ */
22
+ private constructor(readonly id: string) { }
23
+
24
+ /**
25
+ * Creator for MPDisplayRule, used to decode JSON from the MapsIndoors SDK.
26
+ *
27
+ * This is primarily for internal use, and should not be used outside the SDK.
28
+ *
29
+ * @public
30
+ * @static
31
+ * @param {?*} [object]
32
+ * @returns {MPDisplayRule}
33
+ */
34
+ public static create(object?: any): MPDisplayRule {
35
+ const mpDisplayRule: MPDisplayRule = new MPDisplayRule(object?.id);
36
+ return mpDisplayRule;
37
+ }
38
+
39
+ /**
40
+ * Get the general visibility value.
41
+ *
42
+ * @public
43
+ * @async
44
+ * @returns {Promise<boolean>}
45
+ */
46
+ public async isVisible(): Promise<boolean> {
47
+ return DisplayRule.isVisible(this.id).catch((err: Error) => {
48
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Set the general visibility value.
54
+ *
55
+ * @public
56
+ * @async
57
+ * @param {boolean} visible
58
+ * @returns {Promise<void>}
59
+ */
60
+ public async setVisible(visible: boolean): Promise<void> {
61
+ return DisplayRule.setVisible(this.id, visible).catch((err: Error) => {
62
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
63
+ });
64
+ }
65
+
66
+ /**
67
+ * Get the icon's visibility value.
68
+ *
69
+ * @public
70
+ * @async
71
+ * @returns {Promise<boolean>}
72
+ */
73
+ public async isIconVisible(): Promise<boolean> {
74
+ return DisplayRule.isIconVisible(this.id).catch((err: Error) => {
75
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
76
+ });
77
+ }
78
+
79
+ /**
80
+ * Set the icon's visibility value.
81
+ *
82
+ * @public
83
+ * @async
84
+ * @param {boolean} iconVisible
85
+ * @returns {Promise<void>}
86
+ */
87
+ public async setIconVisible(iconVisible: boolean): Promise<void> {
88
+ return DisplayRule.setIconVisible(this.id, iconVisible).catch((err: Error) => {
89
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
90
+ });
91
+ }
92
+
93
+ /**
94
+ * Get the polygon's visibility value.
95
+ *
96
+ * @public
97
+ * @async
98
+ * @returns {Promise<boolean>}
99
+ */
100
+ public async isPolygonVisible(): Promise<boolean> {
101
+ return DisplayRule.isPolygonVisible(this.id,).catch((err: Error) => {
102
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
103
+ });
104
+ }
105
+
106
+ /**
107
+ * Set the polygon's visibility value.
108
+ *
109
+ * @public
110
+ * @async
111
+ * @param {boolean} polygonVisible
112
+ * @returns {Promise<void>}
113
+ */
114
+ public async setPolygonVisible(polygonVisible: boolean): Promise<void> {
115
+ return DisplayRule.setPolygonVisible(this.id, polygonVisible).catch((err: Error) => {
116
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
117
+ });
118
+ }
119
+
120
+ /**
121
+ * Get the label's visibility value.
122
+ *
123
+ * @public
124
+ * @async
125
+ * @returns {Promise<boolean>}
126
+ */
127
+ public async isLabelVisible(): Promise<boolean> {
128
+ return DisplayRule.isLabelVisible(this.id,).catch((err: Error) => {
129
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
130
+ });
131
+ }
132
+
133
+ /**
134
+ * Set the label's visibility value.
135
+ *
136
+ * @public
137
+ * @async
138
+ * @param {boolean} labelVisible
139
+ * @returns {Promise<void>}
140
+ */
141
+ public async setLabelVisible(labelVisible: boolean): Promise<void> {
142
+ return DisplayRule.setLabelVisible(this.id, labelVisible).catch((err: Error) => {
143
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
144
+ });
145
+ }
146
+
147
+ /**
148
+ * Get the 2D model's visibility value.
149
+ *
150
+ * @public
151
+ * @async
152
+ * @returns {Promise<boolean>}
153
+ */
154
+ public async isModel2DVisible(): Promise<boolean> {
155
+ return DisplayRule.isModel2DVisible(this.id,).catch((err: Error) => {
156
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
157
+ });
158
+ }
159
+
160
+ /**
161
+ * Set the 2D model's visibility value.
162
+ *
163
+ * @public
164
+ * @async
165
+ * @param {boolean} model2DVisible
166
+ * @returns {Promise<void>}
167
+ */
168
+ public async setModel2DVisible(model2DVisible: boolean): Promise<void> {
169
+ return DisplayRule.setModel2DVisible(this.id, model2DVisible).catch((err: Error) => {
170
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
171
+ });
172
+ }
173
+
174
+ /**
175
+ * Get the wall's visibility value.
176
+ *
177
+ * @public
178
+ * @async
179
+ * @returns {Promise<boolean>}
180
+ */
181
+ public async isWallVisible(): Promise<boolean> {
182
+ return DisplayRule.isWallVisible(this.id,).catch((err: Error) => {
183
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
184
+ });
185
+ }
186
+
187
+ /**
188
+ * Set the wall's visibility value.
189
+ *
190
+ * @public
191
+ * @async
192
+ * @param {boolean} wallVisible
193
+ * @returns {Promise<void>}
194
+ */
195
+ public async setWallVisible(wallVisible: boolean): Promise<void> {
196
+ return DisplayRule.setWallVisible(this.id, wallVisible).catch((err: Error) => {
197
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
198
+ });
199
+ }
200
+
201
+ /**
202
+ * Get the extrusion's visibility value.
203
+ *
204
+ * @public
205
+ * @async
206
+ * @returns {Promise<boolean>}
207
+ */
208
+ public async isExtrusionVisible(): Promise<boolean> {
209
+ return DisplayRule.isExtrusionVisible(this.id,).catch((err: Error) => {
210
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
211
+ });
212
+ }
213
+
214
+ /**
215
+ * Set the extrusion's visibility value.
216
+ *
217
+ * @public
218
+ * @async
219
+ * @param {boolean} extrusionVisible
220
+ * @returns {Promise<void>}
221
+ */
222
+ public async setExtrusionVisible(extrusionVisible: boolean): Promise<void> {
223
+ return DisplayRule.setExtrusionVisible(this.id, extrusionVisible).catch((err: Error) => {
224
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
225
+ });
226
+ }
227
+
228
+ /**
229
+ * Get the general zoom from value.
230
+ *
231
+ * @public
232
+ * @async
233
+ * @returns {Promise<number>}
234
+ */
235
+ public async getZoomFrom(): Promise<number> {
236
+ return DisplayRule.getZoomFrom(this.id,).catch((err: Error) => {
237
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
238
+ });
239
+ }
240
+
241
+ /**
242
+ * Set the general zoom from value.
243
+ *
244
+ * @public
245
+ * @async
246
+ * @param {number} zoomFrom
247
+ * @returns {Promise<void>}
248
+ */
249
+ public async setZoomFrom(zoomFrom: number): Promise<void> {
250
+ return DisplayRule.setZoomFrom(this.id, zoomFrom).catch((err: Error) => {
251
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
252
+ });
253
+ }
254
+
255
+ /**
256
+ * Get the general zoom to value.
257
+ *
258
+ * @public
259
+ * @async
260
+ * @returns {Promise<number>}
261
+ */
262
+ public async getZoomTo(): Promise<number> {
263
+ return DisplayRule.getZoomTo(this.id,).catch((err: Error) => {
264
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
265
+ });
266
+ }
267
+
268
+ /**
269
+ * Set the general zoom to value.
270
+ *
271
+ * @public
272
+ * @async
273
+ * @param {number} zoomTo
274
+ * @returns {Promise<void>}
275
+ */
276
+ public async setZoomTo(zoomTo: number): Promise<void> {
277
+ return DisplayRule.setZoomTo(this.id, zoomTo).catch((err: Error) => {
278
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
279
+ });
280
+ }
281
+
282
+ /**
283
+ * Get the icon's URL.
284
+ *
285
+ * @public
286
+ * @async
287
+ * @returns {Promise<string>}
288
+ */
289
+ public async getIconUrl(): Promise<string> {
290
+ return DisplayRule.getIconUrl(this.id,).catch((err: Error) => {
291
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
292
+ });
293
+ }
294
+
295
+ /**
296
+ * Set the icon's URL.
297
+ *
298
+ * @public
299
+ * @async
300
+ * @param {string} iconUrl
301
+ * @returns {Promise<void>}
302
+ */
303
+ public async setIcon(iconUrl: string): Promise<void> {
304
+ return DisplayRule.setIcon(this.id, iconUrl).catch((err: Error) => {
305
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
306
+ });
307
+ }
308
+
309
+ /**
310
+ * Get the icon's size.
311
+ *
312
+ * @public
313
+ * @async
314
+ * @returns {Promise<MPIconSize>}
315
+ */
316
+ public async getIconSize(): Promise<MPIconSize> {
317
+ //TODO: handle rejection propagation
318
+ let iconSize = await DisplayRule.getIconSize(this.id).catch((err: Error) => {
319
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
320
+ });
321
+ return Promise.resolve(MPIconSize.create(JSON.parse(iconSize))).catch((err: Error) => {
322
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
323
+ });
324
+ }
325
+
326
+ /**
327
+ * Set the icon's size.
328
+ *
329
+ * @public
330
+ * @async
331
+ * @param {MPIconSize} iconSize
332
+ * @returns {Promise<void>}
333
+ */
334
+ public async setIconSize(iconSize: MPIconSize): Promise<void> {
335
+ return DisplayRule.setIconSize(this.id, JSON.stringify(iconSize)).catch((err: Error) => {
336
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
337
+ });
338
+ }
339
+
340
+ /**
341
+ * Get the label string.
342
+ *
343
+ * @public
344
+ * @async
345
+ * @returns {Promise<string>}
346
+ */
347
+ public async getLabel(): Promise<string> {
348
+ return DisplayRule.getLabel(this.id,).catch((err: Error) => {
349
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
350
+ });
351
+ }
352
+
353
+ /**
354
+ * Set the label string.
355
+ *
356
+ * @public
357
+ * @async
358
+ * @param {string} label
359
+ * @returns {Promise<void>}
360
+ */
361
+ public async setLabel(label: string): Promise<void> {
362
+ return DisplayRule.setLabel(this.id, label).catch((err: Error) => {
363
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
364
+ });
365
+ }
366
+
367
+ /**
368
+ * Get the label's zoom from value.
369
+ *
370
+ * @public
371
+ * @async
372
+ * @returns {Promise<number>}
373
+ */
374
+ public async getLabelZoomFrom(): Promise<number> {
375
+ return DisplayRule.getLabelZoomFrom(this.id,).catch((err: Error) => {
376
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
377
+ });
378
+ }
379
+
380
+ /**
381
+ * Set the label's zoom from value.
382
+ *
383
+ * @public
384
+ * @async
385
+ * @param {number} zoomFrom
386
+ * @returns {Promise<void>}
387
+ */
388
+ public async setLabelZoomFrom(zoomFrom: number): Promise<void> {
389
+ return DisplayRule.setLabelZoomFrom(this.id, zoomFrom).catch((err: Error) => {
390
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
391
+ });
392
+ }
393
+
394
+ /**
395
+ * Get the label's zoom to value.
396
+ *
397
+ * @public
398
+ * @async
399
+ * @returns {Promise<number>}
400
+ */
401
+ public async getLabelZoomTo(): Promise<number> {
402
+ return DisplayRule.getLabelZoomTo(this.id,).catch((err: Error) => {
403
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
404
+ });
405
+ }
406
+
407
+ /**
408
+ * Set the label's zoom to value.
409
+ *
410
+ * @public
411
+ * @async
412
+ * @param {number} zoomTo
413
+ * @returns {Promise<void>}
414
+ */
415
+ public async setLabelZoomTo(zoomTo: number): Promise<void> {
416
+ return DisplayRule.setLabelZoomTo(this.id, zoomTo).catch((err: Error) => {
417
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
418
+ });
419
+ }
420
+
421
+ /**
422
+ * Get the label's max width value.
423
+ *
424
+ * @public
425
+ * @async
426
+ * @returns {Promise<number>}
427
+ */
428
+ public async getLabelMaxWidth(): Promise<number> {
429
+ return DisplayRule.getLabelMaxWidth(this.id,).catch((err: Error) => {
430
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
431
+ });
432
+ }
433
+
434
+ /**
435
+ * Set the label's max width value.
436
+ *
437
+ * @public
438
+ * @async
439
+ * @param {number} labelMaxWidth
440
+ * @returns {Promise<void>}
441
+ */
442
+ public async setLabelMaxWidth(labelMaxWidth: number): Promise<void> {
443
+ return DisplayRule.setLabelMaxWidth(this.id, labelMaxWidth).catch((err: Error) => {
444
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
445
+ });
446
+ }
447
+
448
+ /**
449
+ * Get the plygon's zoom from value.
450
+ *
451
+ * @public
452
+ * @async
453
+ * @returns {Promise<number>}
454
+ */
455
+ public async getPolygonZoomFrom(): Promise<number> {
456
+ return DisplayRule.getPolygonZoomFrom(this.id,).catch((err: Error) => {
457
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
458
+ });
459
+ }
460
+
461
+ /**
462
+ * Get the plygon's zoom from value.
463
+ *
464
+ * @public
465
+ * @async
466
+ * @param {number} polygonZoomFrom
467
+ * @returns {Promise<void>}
468
+ */
469
+ public async setPolygonZoomFrom(polygonZoomFrom: number): Promise<void> {
470
+ return DisplayRule.setPolygonZoomFrom(this.id, polygonZoomFrom).catch((err: Error) => {
471
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
472
+ });
473
+ }
474
+
475
+ /**
476
+ * Get the polygon's zoom to value.
477
+ *
478
+ * @public
479
+ * @async
480
+ * @returns {Promise<number>}
481
+ */
482
+ public async getPolygonZoomTo(): Promise<number> {
483
+ return DisplayRule.getPolygonZoomTo(this.id,).catch((err: Error) => {
484
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
485
+ });
486
+ }
487
+
488
+ /**
489
+ * Set the polygon's zoom to value.
490
+ *
491
+ * @public
492
+ * @async
493
+ * @param {number} polygonZoomTo
494
+ * @returns {Promise<void>}
495
+ */
496
+ public async setPolygonZoomTo(polygonZoomTo: number): Promise<void> {
497
+ return DisplayRule.setPolygonZoomFrom(this.id, polygonZoomTo).catch((err: Error) => {
498
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
499
+ });
500
+ }
501
+
502
+ /**
503
+ * Get the polygon's stroke width value.
504
+ *
505
+ * @public
506
+ * @async
507
+ * @returns {Promise<number>}
508
+ */
509
+ public async getPolygonStrokeWidth(): Promise<number> {
510
+ return DisplayRule.getPolygonStrokeWidth(this.id,).catch((err: Error) => {
511
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
512
+ });
513
+ }
514
+
515
+ /**
516
+ * Set the polygon's stroke width value.
517
+ *
518
+ * @public
519
+ * @async
520
+ * @param {number} strokeWidth
521
+ * @returns {Promise<void>}
522
+ */
523
+ public async setPolygonStrokeWidth(strokeWidth: number): Promise<void> {
524
+ return DisplayRule.setPolygonStrokeWidth(this.id, strokeWidth).catch((err: Error) => {
525
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
526
+ });
527
+ }
528
+
529
+ /**
530
+ * Get the polygon's stroke color value.
531
+ *
532
+ * @public
533
+ * @async
534
+ * @returns {Promise<string>}
535
+ */
536
+ public async getPolygonStrokeColor(): Promise<string> {
537
+ return DisplayRule.getPolygonStrokeColor(this.id,).catch((err: Error) => {
538
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
539
+ });
540
+ }
541
+
542
+ /**
543
+ * Set the polygon's stroke color value.
544
+ *
545
+ * @public
546
+ * @async
547
+ * @param {string} strokeColor
548
+ * @returns {Promise<void>}
549
+ */
550
+ public async setPolygonStrokeColor(strokeColor: string): Promise<void> {
551
+ return DisplayRule.setPolygonStrokeColor(this.id, strokeColor).catch((err: Error) => {
552
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
553
+ });
554
+ }
555
+
556
+ /**
557
+ * Get the polygon's stroke opacity value.
558
+ *
559
+ * @public
560
+ * @async
561
+ * @returns {Promise<number>}
562
+ */
563
+ public async getPolygonStrokeOpacity(): Promise<number> {
564
+ return DisplayRule.getPolygonStrokeOpacity(this.id,).catch((err: Error) => {
565
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
566
+ });
567
+ }
568
+
569
+ /**
570
+ * Set the polygon's stroke opacity value.
571
+ *
572
+ * @public
573
+ * @async
574
+ * @param {number} strokeOpacity
575
+ * @returns {Promise<void>}
576
+ */
577
+ public async setPolygonStrokeOpacity(strokeOpacity: number): Promise<void> {
578
+ return DisplayRule.setPolygonStrokeOpacity(this.id, strokeOpacity).catch((err: Error) => {
579
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
580
+ });
581
+ }
582
+
583
+ /**
584
+ * Get the polygon's fill opacity value.
585
+ *
586
+ * @public
587
+ * @async
588
+ * @returns {Promise<number>}
589
+ */
590
+ public async getPolygonFillOpacity(): Promise<number> {
591
+ return DisplayRule.getPolygonFillOpacity(this.id,).catch((err: Error) => {
592
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
593
+ });
594
+ }
595
+
596
+ /**
597
+ * Set the polygon's fill opacity value.
598
+ *
599
+ * @public
600
+ * @async
601
+ * @param {number} fillOpacity
602
+ * @returns {Promise<void>}
603
+ */
604
+ public async setPolygonFillOpacity(fillOpacity: number): Promise<void> {
605
+ return DisplayRule.setPolygonFillOpacity(this.id, fillOpacity).catch((err: Error) => {
606
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
607
+ });
608
+ }
609
+
610
+ /**
611
+ * Get the polygon's fill color value.
612
+ *
613
+ * @public
614
+ * @async
615
+ * @returns {Promise<string>}
616
+ */
617
+ public async getPolygonFillColor(): Promise<string> {
618
+ return DisplayRule.getPolygonFillColor(this.id,).catch((err: Error) => {
619
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
620
+ });
621
+ }
622
+
623
+ /**
624
+ * Set the polygon's fill color value.
625
+ *
626
+ * @public
627
+ * @async
628
+ * @param {string} fillColor
629
+ * @returns {Promise<void>}
630
+ */
631
+ public async setPolygonFillColor(fillColor: string): Promise<void> {
632
+ return DisplayRule.setPolygonFillColor(this.id, fillColor).catch((err: Error) => {
633
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
634
+ });
635
+ }
636
+
637
+ /**
638
+ * Get the wall's color value.
639
+ *
640
+ * @public
641
+ * @async
642
+ * @returns {Promise<string>}
643
+ */
644
+ public async getWallColor(): Promise<string> {
645
+ return DisplayRule.getWallColor(this.id,).catch((err: Error) => {
646
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
647
+ });
648
+ }
649
+
650
+ /**
651
+ * Set the wall's color value.
652
+ *
653
+ * @public
654
+ * @async
655
+ * @param {string} wallColor
656
+ * @returns {Promise<void>}
657
+ */
658
+ public async setWallColor(wallColor: string): Promise<void> {
659
+ return DisplayRule.setWallColor(this.id, wallColor).catch((err: Error) => {
660
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
661
+ });
662
+ }
663
+
664
+ /**
665
+ * Get the wall's height value.
666
+ *
667
+ * @public
668
+ * @async
669
+ * @returns {Promise<number>}
670
+ */
671
+ public async getWallHeight(): Promise<number> {
672
+ return DisplayRule.getWallHeight(this.id,).catch((err: Error) => {
673
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
674
+ });
675
+ }
676
+
677
+ /**
678
+ * Set the wall's height value.
679
+ *
680
+ * @public
681
+ * @async
682
+ * @param {number} wallHeight
683
+ * @returns {Promise<void>}
684
+ */
685
+ public async setWallHeight(wallHeight: number): Promise<void> {
686
+ return DisplayRule.setWallHeight(this.id, wallHeight).catch((err: Error) => {
687
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
688
+ });
689
+ }
690
+
691
+ /**
692
+ * Get the wall's zoom from value.
693
+ *
694
+ * @public
695
+ * @async
696
+ * @returns {Promise<number>}
697
+ */
698
+ public async getWallZoomFrom(): Promise<number> {
699
+ return DisplayRule.getWallZoomFrom(this.id,).catch((err: Error) => {
700
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
701
+ });
702
+ }
703
+
704
+ /**
705
+ * Set the wall's zoom from value.
706
+ *
707
+ * @public
708
+ * @async
709
+ * @param {number} wallZoomFrom
710
+ * @returns {Promise<void>}
711
+ */
712
+ public async setWallZoomFrom(wallZoomFrom: number): Promise<void> {
713
+ return DisplayRule.setWallZoomFrom(this.id, wallZoomFrom).catch((err: Error) => {
714
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
715
+ });
716
+ }
717
+
718
+ /**
719
+ * Get the wall's zoom to value.
720
+ *
721
+ * @public
722
+ * @async
723
+ * @returns {Promise<number>}
724
+ */
725
+ public async getWallZoomTo(): Promise<number> {
726
+ return DisplayRule.getWallZoomTo(this.id,).catch((err: Error) => {
727
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
728
+ });
729
+ }
730
+
731
+ /**
732
+ * Set the wall's zoom to value.
733
+ *
734
+ * @public
735
+ * @async
736
+ * @param {number} wallZoomTo
737
+ * @returns {Promise<void>}
738
+ */
739
+ public async setWallZoomTo(wallZoomTo: number): Promise<void> {
740
+ return DisplayRule.setWallZoomTo(this.id, wallZoomTo).catch((err: Error) => {
741
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
742
+ });
743
+ }
744
+
745
+ /**
746
+ * Get the extrusion's color value.
747
+ *
748
+ * @public
749
+ * @async
750
+ * @returns {Promise<string>}
751
+ */
752
+ public async getExtrusionColor(): Promise<string> {
753
+ return DisplayRule.getExtrusionColor(this.id,).catch((err: Error) => {
754
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
755
+ });
756
+ }
757
+
758
+ /**
759
+ * Set the extrusion's color value.
760
+ *
761
+ * @public
762
+ * @async
763
+ * @param {string} extrusionColor
764
+ * @returns {Promise<void>}
765
+ */
766
+ public async setExtrusionColor(extrusionColor: string): Promise<void> {
767
+ return DisplayRule.setExtrusionColor(this.id, extrusionColor).catch((err: Error) => {
768
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
769
+ });
770
+ }
771
+
772
+ /**
773
+ * Get the extrusion's height value.
774
+ *
775
+ * @public
776
+ * @async
777
+ * @returns {Promise<number>}
778
+ */
779
+ public async getExtrusionHeight(): Promise<number> {
780
+ return DisplayRule.getExtrusionHeight(this.id,).catch((err: Error) => {
781
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
782
+ });
783
+ }
784
+
785
+ /**
786
+ * Set the extrusion's height value.
787
+ *
788
+ * @public
789
+ * @async
790
+ * @param {number} extrusionHeight
791
+ * @returns {Promise<void>}
792
+ */
793
+ public async setExtrusionHeight(extrusionHeight: number): Promise<void> {
794
+ return DisplayRule.setExtrusionHeight(this.id, extrusionHeight).catch((err: Error) => {
795
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
796
+ });
797
+ }
798
+
799
+ /**
800
+ * Get the extrusion's zoom from value.
801
+ *
802
+ * @public
803
+ * @async
804
+ * @returns {Promise<number>}
805
+ */
806
+ public async getExtrusionZoomFrom(): Promise<number> {
807
+ return DisplayRule.getExtrusionZoomFrom(this.id,).catch((err: Error) => {
808
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
809
+ });
810
+ }
811
+
812
+ /**
813
+ * Set the extrusion's zoom from value.
814
+ *
815
+ * @public
816
+ * @async
817
+ * @param {number} extrusionZoomFrom
818
+ * @returns {Promise<void>}
819
+ */
820
+ public async setExtrusionZoomFrom(extrusionZoomFrom: number): Promise<void> {
821
+ return DisplayRule.setExtrusionZoomFrom(this.id, extrusionZoomFrom).catch((err: Error) => {
822
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
823
+ });
824
+ }
825
+
826
+ /**
827
+ * Get the extrusion's zoom to value.
828
+ *
829
+ * @public
830
+ * @async
831
+ * @returns {Promise<number>}
832
+ */
833
+ public async getExtrusionZoomTo(): Promise<number> {
834
+ return DisplayRule.getExtrusionZoomTo(this.id,).catch((err: Error) => {
835
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
836
+ });
837
+ }
838
+
839
+ /**
840
+ * Get the extrusion's zoom to value.
841
+ *
842
+ * @public
843
+ * @async
844
+ * @param {number} extrusionZoomTo
845
+ * @returns {Promise<void>}
846
+ */
847
+ public async setExtrusionZoomTo(extrusionZoomTo: number): Promise<void> {
848
+ return DisplayRule.setExtrusionZoomTo(this.id, extrusionZoomTo).catch((err: Error) => {
849
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
850
+ });
851
+ }
852
+
853
+ /**
854
+ * Get the 2D model's zoom from value.
855
+ *
856
+ * @public
857
+ * @async
858
+ * @returns {Promise<number>}
859
+ */
860
+ public async getModel2DZoomFrom(): Promise<number> {
861
+ return DisplayRule.getModel2DZoomFrom(this.id).catch((err: Error) => {
862
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
863
+ });
864
+ }
865
+
866
+ /**
867
+ * Set the 2D model's zoom from value.
868
+ *
869
+ * @public
870
+ * @async
871
+ * @param {number} zoomFrom
872
+ * @returns {Promise<void>}
873
+ */
874
+ public async setModel2DZoomFrom(zoomFrom: number): Promise<void> {
875
+ return DisplayRule.setModel2DZoomFrom(this.id, zoomFrom).catch((err: Error) => {
876
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
877
+ });
878
+ }
879
+
880
+ /**
881
+ * Get the 2D model's zoom to value.
882
+ *
883
+ * @public
884
+ * @async
885
+ * @returns {Promise<number>}
886
+ */
887
+ public async getModel2DZoomTo(): Promise<number> {
888
+ return DisplayRule.getModel2DZoomTo(this.id).catch((err: Error) => {
889
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
890
+ });
891
+ }
892
+
893
+ /**
894
+ * Set the 2D model's zoom to value.
895
+ *
896
+ * @public
897
+ * @async
898
+ * @param {number} zoomTo
899
+ * @returns {Promise<void>}
900
+ */
901
+ public async setModel2DZoomTo(zoomTo: number): Promise<void> {
902
+ return DisplayRule.setModel2DZoomTo(this.id, zoomTo).catch((err: Error) => {
903
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
904
+ });
905
+ }
906
+
907
+ /**
908
+ * Get the 2D model's URL.
909
+ *
910
+ * @public
911
+ * @async
912
+ * @returns {Promise<string>}
913
+ */
914
+ public async getModel2DModel(): Promise<string> {
915
+ return DisplayRule.getModel2DModel(this.id).catch((err: Error) => {
916
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
917
+ });
918
+ }
919
+
920
+ /**
921
+ * Set the 2D model's URL.
922
+ *
923
+ * @public
924
+ * @async
925
+ * @param {string} url
926
+ * @returns {Promise<void>}
927
+ */
928
+ public async setModel2DModel(url: string): Promise<void> {
929
+ return DisplayRule.setModel2DModel(this.id, url).catch((err: Error) => {
930
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
931
+ });
932
+ }
933
+
934
+ /**
935
+ * Get the 2D model's width in meters.
936
+ *
937
+ * @public
938
+ * @async
939
+ * @returns {Promise<number>}
940
+ */
941
+ public async getModel2DWidthMeters(): Promise<number> {
942
+ return DisplayRule.getModel2DWidthMeters(this.id).catch((err: Error) => {
943
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
944
+ });
945
+ }
946
+
947
+ /**
948
+ * Set the 2D model's width in meters.
949
+ *
950
+ * @public
951
+ * @async
952
+ * @param {number} width
953
+ * @returns {Promise<void>}
954
+ */
955
+ public async setModel2DWidthMeters(width: number): Promise<void> {
956
+ return DisplayRule.setModel2DWidthMeters(this.id, width).catch((err: Error) => {
957
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
958
+ });
959
+ }
960
+
961
+ /**
962
+ * Get the 2D model's height in meters.
963
+ *
964
+ * @public
965
+ * @async
966
+ * @returns {Promise<number>}
967
+ */
968
+ public async getModel2DHeightMeters(): Promise<number> {
969
+ return DisplayRule.getModel2DHeightMeters(this.id).catch((err: Error) => {
970
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
971
+ });
972
+ }
973
+
974
+ /**
975
+ * Set the 2D model's height in meters.
976
+ *
977
+ * @public
978
+ * @async
979
+ * @param {number} height
980
+ * @returns {Promise<void>}
981
+ */
982
+ public async setModel2DHeightMeters(height: number): Promise<void> {
983
+ return DisplayRule.setModel2DHeightMeters(this.id, height).catch((err: Error) => {
984
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
985
+ });
986
+ }
987
+
988
+ /**
989
+ * Get the 2D model's bearing value.
990
+ *
991
+ * @public
992
+ * @async
993
+ * @returns {Promise<number>}
994
+ */
995
+ public async getModel2DBearing(): Promise<number> {
996
+ return DisplayRule.getModel2DBearing(this.id).catch((err: Error) => {
997
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
998
+ });
999
+ }
1000
+
1001
+ /**
1002
+ * Get the 2D model's bearing value.
1003
+ *
1004
+ * @public
1005
+ * @async
1006
+ * @param {number} bearing
1007
+ * @returns {Promise<void>}
1008
+ */
1009
+ public async setModel2DBearing(bearing: number): Promise<void> {
1010
+ return DisplayRule.setModel2DBearing(this.id, bearing).catch((err: Error) => {
1011
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
1012
+ });
1013
+ }
1014
+
1015
+ /**
1016
+ * Resets the display rule to its default state.
1017
+ *
1018
+ * @public
1019
+ * @async
1020
+ * @returns {Promise<void>}
1021
+ */
1022
+ public async reset(): Promise<void> {
1023
+ return DisplayRule.reset(this.id).catch((err: Error) => {
1024
+ return Promise.reject(MPError.create(JSON.parse(err.message)));
1025
+ });
1026
+ }
1027
+ }