@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,1823 +0,0 @@
1
- import { NativeModules } from 'react-native';
2
- import { MPError, MPIconSize } from "../../index";
3
- import { MPIconPlacement } from './MPIconPlacement';
4
- import { MPLabelType } from './MPLabelType';
5
- import { MPBadgePosition } from './MPBadgePosition';
6
- import MPLabelGraphic from './MPLabelGraphic';
7
- import { MPLabelPosition } from './MPLabelPosition';
8
- const { DisplayRule } = NativeModules;
9
-
10
-
11
- /**
12
- * A collection of settings that dictate how MapsIndoors entities are displayed on the map.
13
- *
14
- * @export
15
- * @class MPDisplayRule
16
- * @typedef {MPDisplayRule}
17
- */
18
- export default class MPDisplayRule {
19
-
20
- /**
21
- * Creates an instance of MPDisplayRule.
22
- *
23
- * @constructor
24
- * @private
25
- * @param {string} id
26
- */
27
- private constructor(readonly id: string) { }
28
-
29
- /**
30
- * Creator for MPDisplayRule, used to decode JSON from the MapsIndoors SDK.
31
- *
32
- * This is primarily for internal use, and should not be used outside the SDK.
33
- *
34
- * @public
35
- * @static
36
- * @param {?*} [object]
37
- * @returns {MPDisplayRule}
38
- */
39
- public static create(object?: any): MPDisplayRule {
40
- const mpDisplayRule: MPDisplayRule = new MPDisplayRule(object?.id);
41
- return mpDisplayRule;
42
- }
43
-
44
- /**
45
- * Get the general visibility value.
46
- *
47
- * @public
48
- * @async
49
- * @returns {Promise<boolean>}
50
- */
51
- public async isVisible(): Promise<boolean> {
52
- return DisplayRule.isVisible(this.id).catch((err: Error) => {
53
- return Promise.reject(MPError.create(JSON.parse(err.message)));
54
- });
55
- }
56
-
57
- /**
58
- * Set the general visibility value.
59
- *
60
- * @public
61
- * @async
62
- * @param {boolean} visible
63
- * @returns {Promise<void>}
64
- */
65
- public async setVisible(visible: boolean): Promise<void> {
66
- return DisplayRule.setVisible(this.id, JSON.stringify(visible)).catch((err: Error) => {
67
- return Promise.reject(MPError.create(JSON.parse(err.message)));
68
- });
69
- }
70
-
71
- /**
72
- * Get the icon's visibility value.
73
- *
74
- * @public
75
- * @async
76
- * @returns {Promise<boolean>}
77
- */
78
- public async isIconVisible(): Promise<boolean> {
79
- return DisplayRule.isIconVisible(this.id).catch((err: Error) => {
80
- return Promise.reject(MPError.create(JSON.parse(err.message)));
81
- });
82
- }
83
-
84
- /**
85
- * Set the icon's visibility value.
86
- *
87
- * @public
88
- * @async
89
- * @param {boolean} iconVisible
90
- * @returns {Promise<void>}
91
- */
92
- public async setIconVisible(iconVisible: boolean): Promise<void> {
93
- return DisplayRule.setIconVisible(this.id, JSON.stringify(iconVisible)).catch((err: Error) => {
94
- return Promise.reject(MPError.create(JSON.parse(err.message)));
95
- });
96
- }
97
-
98
- /**
99
- * Get the polygon's visibility value.
100
- *
101
- * @public
102
- * @async
103
- * @returns {Promise<boolean>}
104
- */
105
- public async isPolygonVisible(): Promise<boolean> {
106
- return DisplayRule.isPolygonVisible(this.id,).catch((err: Error) => {
107
- return Promise.reject(MPError.create(JSON.parse(err.message)));
108
- });
109
- }
110
-
111
- /**
112
- * Set the polygon's visibility value.
113
- *
114
- * @public
115
- * @async
116
- * @param {boolean} polygonVisible
117
- * @returns {Promise<void>}
118
- */
119
- public async setPolygonVisible(polygonVisible: boolean): Promise<void> {
120
- return DisplayRule.setPolygonVisible(this.id, JSON.stringify(polygonVisible)).catch((err: Error) => {
121
- return Promise.reject(MPError.create(JSON.parse(err.message)));
122
- });
123
- }
124
-
125
- /**
126
- * Get the label's visibility value.
127
- *
128
- * @public
129
- * @async
130
- * @returns {Promise<boolean>}
131
- */
132
- public async isLabelVisible(): Promise<boolean> {
133
- return DisplayRule.isLabelVisible(this.id,).catch((err: Error) => {
134
- return Promise.reject(MPError.create(JSON.parse(err.message)));
135
- });
136
- }
137
-
138
- /**
139
- * Set the label's visibility value.
140
- *
141
- * @public
142
- * @async
143
- * @param {boolean} labelVisible
144
- * @returns {Promise<void>}
145
- */
146
- public async setLabelVisible(labelVisible: boolean): Promise<void> {
147
- return DisplayRule.setLabelVisible(this.id, JSON.stringify(labelVisible)).catch((err: Error) => {
148
- return Promise.reject(MPError.create(JSON.parse(err.message)));
149
- });
150
- }
151
-
152
- /**
153
- * Get the 2D model's visibility value.
154
- *
155
- * @public
156
- * @async
157
- * @returns {Promise<boolean>}
158
- */
159
- public async isModel2DVisible(): Promise<boolean> {
160
- return DisplayRule.isModel2DVisible(this.id,).catch((err: Error) => {
161
- return Promise.reject(MPError.create(JSON.parse(err.message)));
162
- });
163
- }
164
-
165
- /**
166
- * Set the 2D model's visibility value.
167
- *
168
- * @public
169
- * @async
170
- * @param {boolean} model2DVisible
171
- * @returns {Promise<void>}
172
- */
173
- public async setModel2DVisible(model2DVisible: boolean): Promise<void> {
174
- return DisplayRule.setModel2DVisible(this.id, JSON.stringify(model2DVisible)).catch((err: Error) => {
175
- return Promise.reject(MPError.create(JSON.parse(err.message)));
176
- });
177
- }
178
-
179
- /**
180
- * Get the wall's visibility value.
181
- *
182
- * @public
183
- * @async
184
- * @returns {Promise<boolean>}
185
- */
186
- public async isWallVisible(): Promise<boolean> {
187
- return DisplayRule.isWallVisible(this.id,).catch((err: Error) => {
188
- return Promise.reject(MPError.create(JSON.parse(err.message)));
189
- });
190
- }
191
-
192
- /**
193
- * Set the wall's visibility value.
194
- *
195
- * @public
196
- * @async
197
- * @param {boolean} wallVisible
198
- * @returns {Promise<void>}
199
- */
200
- public async setWallVisible(wallVisible: boolean): Promise<void> {
201
- return DisplayRule.setWallVisible(this.id, JSON.stringify(wallVisible)).catch((err: Error) => {
202
- return Promise.reject(MPError.create(JSON.parse(err.message)));
203
- });
204
- }
205
-
206
- /**
207
- * Get the extrusion's visibility value.
208
- *
209
- * @public
210
- * @async
211
- * @returns {Promise<boolean>}
212
- */
213
- public async isExtrusionVisible(): Promise<boolean> {
214
- return DisplayRule.isExtrusionVisible(this.id,).catch((err: Error) => {
215
- return Promise.reject(MPError.create(JSON.parse(err.message)));
216
- });
217
- }
218
-
219
- /**
220
- * Set the extrusion's visibility value.
221
- *
222
- * @public
223
- * @async
224
- * @param {boolean} extrusionVisible
225
- * @returns {Promise<void>}
226
- */
227
- public async setExtrusionVisible(extrusionVisible: boolean): Promise<void> {
228
- return DisplayRule.setExtrusionVisible(this.id, JSON.stringify(extrusionVisible)).catch((err: Error) => {
229
- return Promise.reject(MPError.create(JSON.parse(err.message)));
230
- });
231
- }
232
-
233
- /**
234
- * Get the general zoom from value.
235
- *
236
- * @public
237
- * @async
238
- * @returns {Promise<number>}
239
- */
240
- public async getZoomFrom(): Promise<number> {
241
- return DisplayRule.getZoomFrom(this.id,).catch((err: Error) => {
242
- return Promise.reject(MPError.create(JSON.parse(err.message)));
243
- });
244
- }
245
-
246
- /**
247
- * Set the general zoom from value.
248
- *
249
- * @public
250
- * @async
251
- * @param {number} zoomFrom
252
- * @returns {Promise<void>}
253
- */
254
- public async setZoomFrom(zoomFrom: number): Promise<void> {
255
- if (zoomFrom == null) {
256
- zoomFrom = -1;
257
- }
258
- return DisplayRule.setZoomFrom(this.id, zoomFrom).catch((err: Error) => {
259
- return Promise.reject(MPError.create(JSON.parse(err.message)));
260
- });
261
- }
262
-
263
- /**
264
- * Get the general zoom to value.
265
- *
266
- * @public
267
- * @async
268
- * @returns {Promise<number>}
269
- */
270
- public async getZoomTo(): Promise<number> {
271
- return DisplayRule.getZoomTo(this.id,).catch((err: Error) => {
272
- return Promise.reject(MPError.create(JSON.parse(err.message)));
273
- });
274
- }
275
-
276
- /**
277
- * Set the general zoom to value.
278
- *
279
- * @public
280
- * @async
281
- * @param {number} zoomTo
282
- * @returns {Promise<void>}
283
- */
284
- public async setZoomTo(zoomTo: number): Promise<void> {
285
- if (zoomTo == null) {
286
- zoomTo = -1;
287
- }
288
- return DisplayRule.setZoomTo(this.id, zoomTo).catch((err: Error) => {
289
- return Promise.reject(MPError.create(JSON.parse(err.message)));
290
- });
291
- }
292
-
293
- /**
294
- * Get the icon's URL.
295
- *
296
- * @public
297
- * @async
298
- * @returns {Promise<string>}
299
- */
300
- public async getIconUrl(): Promise<string> {
301
- return DisplayRule.getIconUrl(this.id,).catch((err: Error) => {
302
- return Promise.reject(MPError.create(JSON.parse(err.message)));
303
- });
304
- }
305
-
306
- /**
307
- * Set the icon's URL.
308
- *
309
- * @public
310
- * @async
311
- * @param {string} iconUrl
312
- * @returns {Promise<void>}
313
- */
314
- public async setIcon(iconUrl: string): Promise<void> {
315
- return DisplayRule.setIcon(this.id, iconUrl).catch((err: Error) => {
316
- return Promise.reject(MPError.create(JSON.parse(err.message)));
317
- });
318
- }
319
-
320
- /**
321
- * Get the icon's size.
322
- *
323
- * @public
324
- * @async
325
- * @returns {Promise<MPIconSize>}
326
- */
327
- public async getIconSize(): Promise<MPIconSize> {
328
- //TODO: handle rejection propagation
329
- let iconSize = await DisplayRule.getIconSize(this.id).catch((err: Error) => {
330
- return Promise.reject(MPError.create(JSON.parse(err.message)));
331
- });
332
- return Promise.resolve(MPIconSize.create(JSON.parse(iconSize))).catch((err: Error) => {
333
- return Promise.reject(MPError.create(JSON.parse(err.message)));
334
- });
335
- }
336
-
337
- /**
338
- * Set the icon's size.
339
- *
340
- * @public
341
- * @async
342
- * @param {MPIconSize} iconSize
343
- * @returns {Promise<void>}
344
- */
345
- public async setIconSize(iconSize: MPIconSize): Promise<void> {
346
- return DisplayRule.setIconSize(this.id, JSON.stringify(iconSize)).catch((err: Error) => {
347
- return Promise.reject(MPError.create(JSON.parse(err.message)));
348
- });
349
- }
350
-
351
- /**
352
- * Get the label string.
353
- *
354
- * @public
355
- * @async
356
- * @returns {Promise<string>}
357
- */
358
- public async getLabel(): Promise<string> {
359
- return DisplayRule.getLabel(this.id,).catch((err: Error) => {
360
- return Promise.reject(MPError.create(JSON.parse(err.message)));
361
- });
362
- }
363
-
364
- /**
365
- * Set the label string.
366
- *
367
- * @public
368
- * @async
369
- * @param {string} label
370
- * @returns {Promise<void>}
371
- */
372
- public async setLabel(label: string): Promise<void> {
373
- return DisplayRule.setLabel(this.id, label).catch((err: Error) => {
374
- return Promise.reject(MPError.create(JSON.parse(err.message)));
375
- });
376
- }
377
-
378
- /**
379
- * Get the label's zoom from value.
380
- *
381
- * @public
382
- * @async
383
- * @returns {Promise<number>}
384
- */
385
- public async getLabelZoomFrom(): Promise<number> {
386
- return DisplayRule.getLabelZoomFrom(this.id,).catch((err: Error) => {
387
- return Promise.reject(MPError.create(JSON.parse(err.message)));
388
- });
389
- }
390
-
391
- /**
392
- * Set the label's zoom from value.
393
- *
394
- * @public
395
- * @async
396
- * @param {number} zoomFrom
397
- * @returns {Promise<void>}
398
- */
399
- public async setLabelZoomFrom(zoomFrom: number): Promise<void> {
400
- if (zoomFrom == null) {
401
- zoomFrom = -1;
402
- }
403
- return DisplayRule.setLabelZoomFrom(this.id, zoomFrom).catch((err: Error) => {
404
- return Promise.reject(MPError.create(JSON.parse(err.message)));
405
- });
406
- }
407
-
408
- /**
409
- * Get the label's zoom to value.
410
- *
411
- * @public
412
- * @async
413
- * @returns {Promise<number>}
414
- */
415
- public async getLabelZoomTo(): Promise<number> {
416
- return DisplayRule.getLabelZoomTo(this.id,).catch((err: Error) => {
417
- return Promise.reject(MPError.create(JSON.parse(err.message)));
418
- });
419
- }
420
-
421
- /**
422
- * Set the label's zoom to value.
423
- *
424
- * @public
425
- * @async
426
- * @param {number} zoomTo
427
- * @returns {Promise<void>}
428
- */
429
- public async setLabelZoomTo(zoomTo: number): Promise<void> {
430
- if (zoomTo == null) {
431
- zoomTo = -1;
432
- }
433
- return DisplayRule.setLabelZoomTo(this.id, zoomTo).catch((err: Error) => {
434
- return Promise.reject(MPError.create(JSON.parse(err.message)));
435
- });
436
- }
437
-
438
- /**
439
- * Get the label's max width value.
440
- *
441
- * @public
442
- * @async
443
- * @returns {Promise<number>}
444
- */
445
- public async getLabelMaxWidth(): Promise<number> {
446
- return DisplayRule.getLabelMaxWidth(this.id,).catch((err: Error) => {
447
- return Promise.reject(MPError.create(JSON.parse(err.message)));
448
- });
449
- }
450
-
451
- /**
452
- * Set the label's max width value.
453
- *
454
- * @public
455
- * @async
456
- * @param {number} labelMaxWidth
457
- * @returns {Promise<void>}
458
- */
459
- public async setLabelMaxWidth(labelMaxWidth: number): Promise<void> {
460
- if (labelMaxWidth == null) {
461
- labelMaxWidth = -1;
462
- }
463
- return DisplayRule.setLabelMaxWidth(this.id, labelMaxWidth).catch((err: Error) => {
464
- return Promise.reject(MPError.create(JSON.parse(err.message)));
465
- });
466
- }
467
-
468
- /**
469
- * Get the plygon's zoom from value.
470
- *
471
- * @public
472
- * @async
473
- * @returns {Promise<number>}
474
- */
475
- public async getPolygonZoomFrom(): Promise<number> {
476
- return DisplayRule.getPolygonZoomFrom(this.id,).catch((err: Error) => {
477
- return Promise.reject(MPError.create(JSON.parse(err.message)));
478
- });
479
- }
480
-
481
- /**
482
- * Get the plygon's zoom from value.
483
- *
484
- * @public
485
- * @async
486
- * @param {number} polygonZoomFrom
487
- * @returns {Promise<void>}
488
- */
489
- public async setPolygonZoomFrom(polygonZoomFrom: number): Promise<void> {
490
- if (polygonZoomFrom == null) {
491
- polygonZoomFrom = -1;
492
- }
493
- return DisplayRule.setPolygonZoomFrom(this.id, polygonZoomFrom).catch((err: Error) => {
494
- return Promise.reject(MPError.create(JSON.parse(err.message)));
495
- });
496
- }
497
-
498
- /**
499
- * Get the polygon's zoom to value.
500
- *
501
- * @public
502
- * @async
503
- * @returns {Promise<number>}
504
- */
505
- public async getPolygonZoomTo(): Promise<number> {
506
- return DisplayRule.getPolygonZoomTo(this.id,).catch((err: Error) => {
507
- return Promise.reject(MPError.create(JSON.parse(err.message)));
508
- });
509
- }
510
-
511
- /**
512
- * Set the polygon's zoom to value.
513
- *
514
- * @public
515
- * @async
516
- * @param {number} polygonZoomTo
517
- * @returns {Promise<void>}
518
- */
519
- public async setPolygonZoomTo(polygonZoomTo: number): Promise<void> {
520
- if (polygonZoomTo == null) {
521
- polygonZoomTo = -1;
522
- }
523
- return DisplayRule.setPolygonZoomFrom(this.id, polygonZoomTo).catch((err: Error) => {
524
- return Promise.reject(MPError.create(JSON.parse(err.message)));
525
- });
526
- }
527
-
528
- /**
529
- * Get the polygon's stroke width value.
530
- *
531
- * @public
532
- * @async
533
- * @returns {Promise<number>}
534
- */
535
- public async getPolygonStrokeWidth(): Promise<number> {
536
- return DisplayRule.getPolygonStrokeWidth(this.id,).catch((err: Error) => {
537
- return Promise.reject(MPError.create(JSON.parse(err.message)));
538
- });
539
- }
540
-
541
- /**
542
- * Set the polygon's stroke width value.
543
- *
544
- * @public
545
- * @async
546
- * @param {number} strokeWidth
547
- * @returns {Promise<void>}
548
- */
549
- public async setPolygonStrokeWidth(strokeWidth: number): Promise<void> {
550
- if (strokeWidth == null) {
551
- strokeWidth = -1;
552
- }
553
- return DisplayRule.setPolygonStrokeWidth(this.id, strokeWidth).catch((err: Error) => {
554
- return Promise.reject(MPError.create(JSON.parse(err.message)));
555
- });
556
- }
557
-
558
- /**
559
- * Get the polygon's stroke color value.
560
- *
561
- * @public
562
- * @async
563
- * @returns {Promise<string>}
564
- */
565
- public async getPolygonStrokeColor(): Promise<string> {
566
- return DisplayRule.getPolygonStrokeColor(this.id,).catch((err: Error) => {
567
- return Promise.reject(MPError.create(JSON.parse(err.message)));
568
- });
569
- }
570
-
571
- /**
572
- * Set the polygon's stroke color value.
573
- *
574
- * @public
575
- * @async
576
- * @param {string} strokeColor
577
- * @returns {Promise<void>}
578
- */
579
- public async setPolygonStrokeColor(strokeColor: string): Promise<void> {
580
- return DisplayRule.setPolygonStrokeColor(this.id, strokeColor).catch((err: Error) => {
581
- return Promise.reject(MPError.create(JSON.parse(err.message)));
582
- });
583
- }
584
-
585
- /**
586
- * Get the polygon's stroke opacity value.
587
- *
588
- * @public
589
- * @async
590
- * @returns {Promise<number>}
591
- */
592
- public async getPolygonStrokeOpacity(): Promise<number> {
593
- return DisplayRule.getPolygonStrokeOpacity(this.id,).catch((err: Error) => {
594
- return Promise.reject(MPError.create(JSON.parse(err.message)));
595
- });
596
- }
597
-
598
- /**
599
- * Set the polygon's stroke opacity value.
600
- *
601
- * @public
602
- * @async
603
- * @param {number} strokeOpacity
604
- * @returns {Promise<void>}
605
- */
606
- public async setPolygonStrokeOpacity(strokeOpacity: number): Promise<void> {
607
- if (strokeOpacity == null) {
608
- strokeOpacity = -1;
609
- }
610
- return DisplayRule.setPolygonStrokeOpacity(this.id, strokeOpacity).catch((err: Error) => {
611
- return Promise.reject(MPError.create(JSON.parse(err.message)));
612
- });
613
- }
614
-
615
- /**
616
- * Get the polygon's fill opacity value.
617
- *
618
- * @public
619
- * @async
620
- * @returns {Promise<number>}
621
- */
622
- public async getPolygonFillOpacity(): Promise<number> {
623
- return DisplayRule.getPolygonFillOpacity(this.id,).catch((err: Error) => {
624
- return Promise.reject(MPError.create(JSON.parse(err.message)));
625
- });
626
- }
627
-
628
- /**
629
- * Set the polygon's fill opacity value.
630
- *
631
- * @public
632
- * @async
633
- * @param {number} fillOpacity
634
- * @returns {Promise<void>}
635
- */
636
- public async setPolygonFillOpacity(fillOpacity: number): Promise<void> {
637
- if (fillOpacity == null) {
638
- fillOpacity = -1;
639
- }
640
- return DisplayRule.setPolygonFillOpacity(this.id, fillOpacity).catch((err: Error) => {
641
- return Promise.reject(MPError.create(JSON.parse(err.message)));
642
- });
643
- }
644
-
645
- /**
646
- * Get the polygon's fill color value.
647
- *
648
- * @public
649
- * @async
650
- * @returns {Promise<string>}
651
- */
652
- public async getPolygonFillColor(): Promise<string> {
653
- return DisplayRule.getPolygonFillColor(this.id,).catch((err: Error) => {
654
- return Promise.reject(MPError.create(JSON.parse(err.message)));
655
- });
656
- }
657
-
658
- /**
659
- * Set the polygon's fill color value.
660
- *
661
- * @public
662
- * @async
663
- * @param {string} fillColor
664
- * @returns {Promise<void>}
665
- */
666
- public async setPolygonFillColor(fillColor: string): Promise<void> {
667
- return DisplayRule.setPolygonFillColor(this.id, fillColor).catch((err: Error) => {
668
- return Promise.reject(MPError.create(JSON.parse(err.message)));
669
- });
670
- }
671
-
672
- /**
673
- * Get the wall's color value.
674
- *
675
- * @public
676
- * @async
677
- * @returns {Promise<string>}
678
- */
679
- public async getWallColor(): Promise<string> {
680
- return DisplayRule.getWallColor(this.id,).catch((err: Error) => {
681
- return Promise.reject(MPError.create(JSON.parse(err.message)));
682
- });
683
- }
684
-
685
- /**
686
- * Set the wall's color value.
687
- *
688
- * @public
689
- * @async
690
- * @param {string} wallColor
691
- * @returns {Promise<void>}
692
- */
693
- public async setWallColor(wallColor: string): Promise<void> {
694
- return DisplayRule.setWallColor(this.id, wallColor).catch((err: Error) => {
695
- return Promise.reject(MPError.create(JSON.parse(err.message)));
696
- });
697
- }
698
-
699
- /**
700
- * Get the wall's height value.
701
- *
702
- * @public
703
- * @async
704
- * @returns {Promise<number>}
705
- */
706
- public async getWallHeight(): Promise<number> {
707
- return DisplayRule.getWallHeight(this.id,).catch((err: Error) => {
708
- return Promise.reject(MPError.create(JSON.parse(err.message)));
709
- });
710
- }
711
-
712
- /**
713
- * Set the wall's height value.
714
- *
715
- * @public
716
- * @async
717
- * @param {number} wallHeight
718
- * @returns {Promise<void>}
719
- */
720
- public async setWallHeight(wallHeight: number): Promise<void> {
721
- if (wallHeight == null) {
722
- wallHeight = -1;
723
- }
724
- return DisplayRule.setWallHeight(this.id, wallHeight).catch((err: Error) => {
725
- return Promise.reject(MPError.create(JSON.parse(err.message)));
726
- });
727
- }
728
-
729
- /**
730
- * Get the wall's zoom from value.
731
- *
732
- * @public
733
- * @async
734
- * @returns {Promise<number>}
735
- */
736
- public async getWallZoomFrom(): Promise<number> {
737
- return DisplayRule.getWallZoomFrom(this.id,).catch((err: Error) => {
738
- return Promise.reject(MPError.create(JSON.parse(err.message)));
739
- });
740
- }
741
-
742
- /**
743
- * Set the wall's zoom from value.
744
- *
745
- * @public
746
- * @async
747
- * @param {number} wallZoomFrom
748
- * @returns {Promise<void>}
749
- */
750
- public async setWallZoomFrom(wallZoomFrom: number): Promise<void> {
751
- if (wallZoomFrom == null) {
752
- wallZoomFrom = -1;
753
- }
754
- return DisplayRule.setWallZoomFrom(this.id, wallZoomFrom).catch((err: Error) => {
755
- return Promise.reject(MPError.create(JSON.parse(err.message)));
756
- });
757
- }
758
-
759
- /**
760
- * Get the wall's zoom to value.
761
- *
762
- * @public
763
- * @async
764
- * @returns {Promise<number>}
765
- */
766
- public async getWallZoomTo(): Promise<number> {
767
- return DisplayRule.getWallZoomTo(this.id,).catch((err: Error) => {
768
- return Promise.reject(MPError.create(JSON.parse(err.message)));
769
- });
770
- }
771
-
772
- /**
773
- * Set the wall's zoom to value.
774
- *
775
- * @public
776
- * @async
777
- * @param {number} wallZoomTo
778
- * @returns {Promise<void>}
779
- */
780
- public async setWallZoomTo(wallZoomTo: number): Promise<void> {
781
- if (wallZoomTo == null) {
782
- wallZoomTo = -1;
783
- }
784
- return DisplayRule.setWallZoomTo(this.id, wallZoomTo).catch((err: Error) => {
785
- return Promise.reject(MPError.create(JSON.parse(err.message)));
786
- });
787
- }
788
-
789
- /**
790
- * Get the extrusion's color value.
791
- *
792
- * @public
793
- * @async
794
- * @returns {Promise<string>}
795
- */
796
- public async getExtrusionColor(): Promise<string> {
797
- return DisplayRule.getExtrusionColor(this.id,).catch((err: Error) => {
798
- return Promise.reject(MPError.create(JSON.parse(err.message)));
799
- });
800
- }
801
-
802
- /**
803
- * Set the extrusion's color value.
804
- *
805
- * @public
806
- * @async
807
- * @param {string} extrusionColor
808
- * @returns {Promise<void>}
809
- */
810
- public async setExtrusionColor(extrusionColor: string): Promise<void> {
811
- return DisplayRule.setExtrusionColor(this.id, extrusionColor).catch((err: Error) => {
812
- return Promise.reject(MPError.create(JSON.parse(err.message)));
813
- });
814
- }
815
-
816
- /**
817
- * Get the extrusion's height value.
818
- *
819
- * @public
820
- * @async
821
- * @returns {Promise<number>}
822
- */
823
- public async getExtrusionHeight(): Promise<number> {
824
- return DisplayRule.getExtrusionHeight(this.id,).catch((err: Error) => {
825
- return Promise.reject(MPError.create(JSON.parse(err.message)));
826
- });
827
- }
828
-
829
- /**
830
- * Set the extrusion's height value.
831
- *
832
- * @public
833
- * @async
834
- * @param {number} extrusionHeight
835
- * @returns {Promise<void>}
836
- */
837
- public async setExtrusionHeight(extrusionHeight: number): Promise<void> {
838
- if (extrusionHeight == null) {
839
- extrusionHeight = -1;
840
- }
841
- return DisplayRule.setExtrusionHeight(this.id, extrusionHeight).catch((err: Error) => {
842
- return Promise.reject(MPError.create(JSON.parse(err.message)));
843
- });
844
- }
845
-
846
- /**
847
- * Get the extrusion's zoom from value.
848
- *
849
- * @public
850
- * @async
851
- * @returns {Promise<number>}
852
- */
853
- public async getExtrusionZoomFrom(): Promise<number> {
854
- return DisplayRule.getExtrusionZoomFrom(this.id,).catch((err: Error) => {
855
- return Promise.reject(MPError.create(JSON.parse(err.message)));
856
- });
857
- }
858
-
859
- /**
860
- * Set the extrusion's zoom from value.
861
- *
862
- * @public
863
- * @async
864
- * @param {number} extrusionZoomFrom
865
- * @returns {Promise<void>}
866
- */
867
- public async setExtrusionZoomFrom(extrusionZoomFrom: number): Promise<void> {
868
- if (extrusionZoomFrom == null) {
869
- extrusionZoomFrom = -1;
870
- }
871
- return DisplayRule.setExtrusionZoomFrom(this.id, extrusionZoomFrom).catch((err: Error) => {
872
- return Promise.reject(MPError.create(JSON.parse(err.message)));
873
- });
874
- }
875
-
876
- /**
877
- * Get the extrusion's zoom to value.
878
- *
879
- * @public
880
- * @async
881
- * @returns {Promise<number>}
882
- */
883
- public async getExtrusionZoomTo(): Promise<number> {
884
- return DisplayRule.getExtrusionZoomTo(this.id,).catch((err: Error) => {
885
- return Promise.reject(MPError.create(JSON.parse(err.message)));
886
- });
887
- }
888
-
889
- /**
890
- * Get the extrusion's zoom to value.
891
- *
892
- * @public
893
- * @async
894
- * @param {number} extrusionZoomTo
895
- * @returns {Promise<void>}
896
- */
897
- public async setExtrusionZoomTo(extrusionZoomTo: number): Promise<void> {
898
- if (extrusionZoomTo == null) {
899
- extrusionZoomTo = -1;
900
- }
901
- return DisplayRule.setExtrusionZoomTo(this.id, extrusionZoomTo).catch((err: Error) => {
902
- return Promise.reject(MPError.create(JSON.parse(err.message)));
903
- });
904
- }
905
-
906
- /**
907
- * Get the 2D model's zoom from value.
908
- *
909
- * @public
910
- * @async
911
- * @returns {Promise<number>}
912
- */
913
- public async getModel2DZoomFrom(): Promise<number> {
914
- return DisplayRule.getModel2DZoomFrom(this.id).catch((err: Error) => {
915
- return Promise.reject(MPError.create(JSON.parse(err.message)));
916
- });
917
- }
918
-
919
- /**
920
- * Set the 2D model's zoom from value.
921
- *
922
- * @public
923
- * @async
924
- * @param {number} zoomFrom
925
- * @returns {Promise<void>}
926
- */
927
- public async setModel2DZoomFrom(zoomFrom: number): Promise<void> {
928
- if (zoomFrom == null) {
929
- zoomFrom = -1;
930
- }
931
- return DisplayRule.setModel2DZoomFrom(this.id, zoomFrom).catch((err: Error) => {
932
- return Promise.reject(MPError.create(JSON.parse(err.message)));
933
- });
934
- }
935
-
936
- /**
937
- * Get the 2D model's zoom to value.
938
- *
939
- * @public
940
- * @async
941
- * @returns {Promise<number>}
942
- */
943
- public async getModel2DZoomTo(): Promise<number> {
944
- return DisplayRule.getModel2DZoomTo(this.id).catch((err: Error) => {
945
- return Promise.reject(MPError.create(JSON.parse(err.message)));
946
- });
947
- }
948
-
949
- /**
950
- * Set the 2D model's zoom to value.
951
- *
952
- * @public
953
- * @async
954
- * @param {number} zoomTo
955
- * @returns {Promise<void>}
956
- */
957
- public async setModel2DZoomTo(zoomTo: number): Promise<void> {
958
- if (zoomTo == null) {
959
- zoomTo = -1;
960
- }
961
- return DisplayRule.setModel2DZoomTo(this.id, zoomTo).catch((err: Error) => {
962
- return Promise.reject(MPError.create(JSON.parse(err.message)));
963
- });
964
- }
965
-
966
- /**
967
- * Get the 2D model's URL.
968
- *
969
- * @public
970
- * @async
971
- * @returns {Promise<string>}
972
- */
973
- public async getModel2DModel(): Promise<string> {
974
- return DisplayRule.getModel2DModel(this.id).catch((err: Error) => {
975
- return Promise.reject(MPError.create(JSON.parse(err.message)));
976
- });
977
- }
978
-
979
- /**
980
- * Set the 2D model's URL.
981
- *
982
- * @public
983
- * @async
984
- * @param {string} url
985
- * @returns {Promise<void>}
986
- */
987
- public async setModel2DModel(url: string): Promise<void> {
988
- return DisplayRule.setModel2DModel(this.id, url).catch((err: Error) => {
989
- return Promise.reject(MPError.create(JSON.parse(err.message)));
990
- });
991
- }
992
-
993
- /**
994
- * Get the 2D model's width in meters.
995
- *
996
- * @public
997
- * @async
998
- * @returns {Promise<number>}
999
- */
1000
- public async getModel2DWidthMeters(): Promise<number> {
1001
- return DisplayRule.getModel2DWidthMeters(this.id).catch((err: Error) => {
1002
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1003
- });
1004
- }
1005
-
1006
- /**
1007
- * Set the 2D model's width in meters.
1008
- *
1009
- * @public
1010
- * @async
1011
- * @param {number} width
1012
- * @returns {Promise<void>}
1013
- */
1014
- public async setModel2DWidthMeters(width: number): Promise<void> {
1015
- if (width == null) {
1016
- width = -1;
1017
- }
1018
- return DisplayRule.setModel2DWidthMeters(this.id, width).catch((err: Error) => {
1019
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1020
- });
1021
- }
1022
-
1023
- /**
1024
- * Get the 2D model's height in meters.
1025
- *
1026
- * @public
1027
- * @async
1028
- * @returns {Promise<number>}
1029
- */
1030
- public async getModel2DHeightMeters(): Promise<number> {
1031
- return DisplayRule.getModel2DHeightMeters(this.id).catch((err: Error) => {
1032
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1033
- });
1034
- }
1035
-
1036
- /**
1037
- * Set the 2D model's height in meters.
1038
- *
1039
- * @public
1040
- * @async
1041
- * @param {number} height
1042
- * @returns {Promise<void>}
1043
- */
1044
- public async setModel2DHeightMeters(height: number): Promise<void> {
1045
- if (height == null) {
1046
- height = -1;
1047
- }
1048
- return DisplayRule.setModel2DHeightMeters(this.id, height).catch((err: Error) => {
1049
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1050
- });
1051
- }
1052
-
1053
- /**
1054
- * Get the 2D model's bearing value.
1055
- *
1056
- * @public
1057
- * @async
1058
- * @returns {Promise<number>}
1059
- */
1060
- public async getModel2DBearing(): Promise<number> {
1061
- return DisplayRule.getModel2DBearing(this.id).catch((err: Error) => {
1062
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1063
- });
1064
- }
1065
-
1066
- /**
1067
- * Get the 2D model's bearing value.
1068
- *
1069
- * @public
1070
- * @async
1071
- * @param {number} bearing
1072
- * @returns {Promise<void>}
1073
- */
1074
- public async setModel2DBearing(bearing: number): Promise<void> {
1075
- if (bearing == null) {
1076
- bearing = -1;
1077
- }
1078
- return DisplayRule.setModel2DBearing(this.id, bearing).catch((err: Error) => {
1079
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1080
- });
1081
- }
1082
-
1083
- /**
1084
- * Get the scale value of the icon.
1085
- * @returns Promise<number>
1086
- */
1087
- public async getIconScale(): Promise<number> {
1088
- return DisplayRule.getIconScale(this.id).catch((err: Error) => {
1089
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1090
- });
1091
- }
1092
-
1093
- /**
1094
- * Set the scale value of the icon.
1095
- * @returns Promise<void>
1096
- */
1097
- public async setIconScale(iconScale: number): Promise<void> {
1098
- if (iconScale == null) {
1099
- iconScale = -1;
1100
- }
1101
- return DisplayRule.setIconScale(this.id, iconScale).catch((err: Error) => {
1102
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1103
- });
1104
- }
1105
-
1106
- /**
1107
- * Get the icon's anchor value.
1108
- * @returns Promise<MPIconAnchor>
1109
- */
1110
- public async getIconPlacement(): Promise<MPIconPlacement> {
1111
- return DisplayRule.getIconPlacement(this.id).catch((err: Error) => {
1112
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1113
- });
1114
- }
1115
-
1116
- /**
1117
- * Set the icon's anchor value.
1118
- * @returns Promise<void>
1119
- */
1120
- public async setIconPlacement(iconPlacement: MPIconPlacement): Promise<void> {
1121
- if (iconPlacement == null) {
1122
- return DisplayRule.setIconPlacement(this.id, -1).catch((err: Error) => {
1123
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1124
- });
1125
- }else {
1126
- return DisplayRule.setIconPlacement(this.id, iconPlacement.valueOf()).catch((err: Error) => {
1127
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1128
- });
1129
- }
1130
- }
1131
-
1132
- /**
1133
- * Get the type of the label.
1134
- * @returns Promise<MPLabelType>
1135
- */
1136
- public async getLabelType(): Promise<MPLabelType> {
1137
- return DisplayRule.getLabelType(this.id).catch((err: Error) => {
1138
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1139
- });
1140
- }
1141
-
1142
- /**
1143
- * Set the type of the label.
1144
- * @returns Promise<void>
1145
- */
1146
- public async setLabelType(labelType: MPLabelType): Promise<void> {
1147
- if (labelType == null) {
1148
- return DisplayRule.setLabelType(this.id, -1).catch((err: Error) => {
1149
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1150
- });
1151
- }else {
1152
- return DisplayRule.setLabelType(this.id, labelType.valueOf()).catch((err: Error) => {
1153
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1154
- });
1155
- }
1156
- }
1157
-
1158
- /**
1159
- * Get the label's text size.
1160
- * @returns Promise<number>
1161
- */
1162
- public async getLabelStyleTextSize(): Promise<number> {
1163
- return DisplayRule.getLabelStyleTextSize(this.id).catch((err: Error) => {
1164
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1165
- });
1166
- }
1167
-
1168
- /**
1169
- * Set the label's text size.
1170
- * @returns Promise<void>
1171
- */
1172
- public async setLabelStyleTextSize(textSize: number): Promise<void> {
1173
- if (textSize == null) {
1174
- textSize = -1;
1175
- }
1176
- return DisplayRule.setLabelStyleTextSize(this.id, textSize).catch((err: Error) => {
1177
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1178
- });
1179
- }
1180
-
1181
- /**
1182
- * Get the label's text color
1183
- * @returns Promise<string>
1184
- */
1185
- public async getLabelStyleTextColor(): Promise<string> {
1186
- return DisplayRule.getLabelStyleTextColor(this.id).catch((err: Error) => {
1187
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1188
- });
1189
- }
1190
-
1191
- /**
1192
- * Set the label's text color
1193
- * @returns Promise<void>
1194
- */
1195
- public async setLabelStyleTextColor(textColor: String): Promise<void> {
1196
- return DisplayRule.setLabelStyleTextColor(this.id, textColor).catch((err: Error) => {
1197
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1198
- });
1199
- }
1200
-
1201
- /**
1202
- * Get the label's text opacity
1203
- * @returns Promise<number>
1204
- */
1205
- public async getLabelStyleTextOpacity(): Promise<number> {
1206
- return DisplayRule.getLabelStyleTextOpacity(this.id).catch((err: Error) => {
1207
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1208
- });
1209
- }
1210
-
1211
- /**
1212
- * Set the label's text opacity
1213
- * @returns Promise<void>
1214
- */
1215
- public async setLabelStyleTextOpacity(textOpacity: number): Promise<void> {
1216
- if (textOpacity == null) {
1217
- textOpacity = -1;
1218
- }
1219
- return DisplayRule.setLabelStyleTextOpacity(this.id, textOpacity).catch((err: Error) => {
1220
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1221
- });
1222
- }
1223
-
1224
- /**
1225
- * Get the label's halo color
1226
- * @returns Promise<string>
1227
- */
1228
- public async getLabelStyleHaloColor(): Promise<string> {
1229
- return DisplayRule.getLabelStyleHaloColor(this.id).catch((err: Error) => {
1230
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1231
- });
1232
- }
1233
-
1234
- /**
1235
- * Set the label's halo color
1236
- * @returns Promise<void>
1237
- */
1238
- public async setLabelStyleHaloColor(color: string): Promise<void> {
1239
- return DisplayRule.setLabelStyleHaloColor(this.id, color).catch((err: Error) => {
1240
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1241
- });
1242
- }
1243
-
1244
- /**
1245
- * Get the label's halo width
1246
- * @returns Promise<number>
1247
- */
1248
- public async getLabelStyleHaloWidth(): Promise<number> {
1249
- return DisplayRule.getLabelStyleHaloWidth(this.id).catch((err: Error) => {
1250
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1251
- });
1252
- }
1253
-
1254
- /**
1255
- * Set the label's halo width
1256
- * @returns Promise<void>
1257
- */
1258
- public async setLabelStyleHaloWidth(haloWidth: number): Promise<void> {
1259
- if (haloWidth == null) {
1260
- haloWidth = -1;
1261
- }
1262
- return DisplayRule.setLabelStyleHaloWidth(this.id, haloWidth).catch((err: Error) => {
1263
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1264
- });
1265
- }
1266
-
1267
- /**
1268
- * Get the label's halo blur
1269
- * @returns Promise<number>
1270
- */
1271
- public async getLabelStyleHaloBlur(): Promise<number> {
1272
- return DisplayRule.getLabelStyleHaloBlur(this.id).catch((err: Error) => {
1273
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1274
- });
1275
- }
1276
-
1277
- /**
1278
- * Set the label's halo blur
1279
- * @returns Promise<void>
1280
- */
1281
- public async setLabelStyleHaloBlur(haloBlur: number): Promise<void> {
1282
- if (haloBlur == null) {
1283
- haloBlur = -1;
1284
- }
1285
- return DisplayRule.setLabelStyleHaloBlur(this.id, haloBlur).catch((err: Error) => {
1286
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1287
- });
1288
- }
1289
-
1290
- /**
1291
- * Get the label's bearing
1292
- * @returns Promise<number>
1293
- */
1294
- public async getLabelStyleBearing(): Promise<number> {
1295
- return DisplayRule.getLabelStyleBearing(this.id).catch((err: Error) => {
1296
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1297
- });
1298
- }
1299
-
1300
- /**
1301
- * Set the label's bearing
1302
- * @returns Promise<void>
1303
- */
1304
- public async setLabelStyleBearing(bearing: number): Promise<void> {
1305
- if (bearing == null) {
1306
- bearing = -1;
1307
- }
1308
- return DisplayRule.setLabelStyleBearing(this.id, bearing).catch((err: Error) => {
1309
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1310
- });
1311
- }
1312
-
1313
- /**
1314
- * Get the label's position
1315
- * @returns Promise<MPLabelPosition>
1316
- */
1317
- public async getLabelStylePosition(): Promise<MPLabelPosition> {
1318
- return DisplayRule.getLabelStylePosition(this.id).catch((err: Error) => {
1319
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1320
- });
1321
- }
1322
-
1323
- /**
1324
- * Set the label's position
1325
- * @param position MPLabelPosition
1326
- * @returns Promise<void>
1327
- */
1328
- public async setLabelStylePosition(position: MPLabelPosition): Promise<void> {
1329
- return DisplayRule.setLabelStylePosition(this.id, position.valueOf()).catch((err: Error) => {
1330
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1331
- });
1332
- }
1333
-
1334
- /**
1335
- * Set the label's Graphic style
1336
- * @param graphicLabel MPLabelGraphic
1337
- * @returns Promise<void>
1338
- */
1339
- public async setLabelStyleGraphic(graphicLabel: MPLabelGraphic): Promise<void> {
1340
- return DisplayRule.setLabelStyleGraphic(this.id, JSON.stringify(graphicLabel)).catch((err: Error) => {
1341
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1342
- });
1343
- }
1344
-
1345
- /**
1346
- * Get the label's Graphic style
1347
- * @returns Promise<MPLabelGraphic>
1348
- */
1349
- public async getLabelStyleGraphic(): Promise<MPLabelGraphic> {
1350
- return DisplayRule.getLabelStyleGraphic(this.id).catch((err: Error) => {
1351
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1352
- });
1353
- }
1354
-
1355
- /**
1356
- * Get the polygon's lightness factor.
1357
- * @returns Promise<number>
1358
- */
1359
- public async getPolygonLightnessFactor(): Promise<number> {
1360
- return DisplayRule.getPolygonLightnessFactor(this.id).catch((err: Error) => {
1361
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1362
- });
1363
- }
1364
-
1365
- /**
1366
- * Set the polygon's lightness factor.
1367
- * @returns Promise<void>
1368
- */
1369
- public async setPolygonLightnessFactor(lightnessFactor: number): Promise<void> {
1370
- if (lightnessFactor == null) {
1371
- lightnessFactor = -2;
1372
- }
1373
- return DisplayRule.setPolygonLightnessFactor(this.id, lightnessFactor).catch((err: Error) => {
1374
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1375
- });
1376
- }
1377
-
1378
- /**
1379
- * Get the wall's lightness factor.
1380
- * @returns Promise<number>
1381
- */
1382
- public async getWallLightnessFactor(): Promise<number> {
1383
- return DisplayRule.getWallLightnessFactor(this.id).catch((err: Error) => {
1384
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1385
- });
1386
- }
1387
-
1388
- /**
1389
- * Set the wall's lightness factor.
1390
- * @returns Promise<void>
1391
- */
1392
- public async setWallLightnessFactor(lightnessFactor: number): Promise<void> {
1393
- if (lightnessFactor == null) {
1394
- lightnessFactor = -2;
1395
- }
1396
- return DisplayRule.setWallLightnessFactor(this.id, lightnessFactor).catch((err: Error) => {
1397
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1398
- });
1399
- }
1400
-
1401
- /**
1402
- * Get the extrusion's lightness factor.
1403
- * @returns Promise<number>
1404
- */
1405
- public async getExtrusionLightnessFactor(): Promise<number> {
1406
- return DisplayRule.getExtrusionLightnessFactor(this.id).catch((err: Error) => {
1407
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1408
- });
1409
- }
1410
-
1411
- /**
1412
- * Set the extrusion's lightness factor.
1413
- * @returns Promise<void>
1414
- */
1415
- public async setExtrusionLightnessFactor(lightnessFactor: number): Promise<void> {
1416
- if (lightnessFactor == null) {
1417
- lightnessFactor = -2;
1418
- }
1419
- return DisplayRule.setExtrusionLightnessFactor(this.id, lightnessFactor).catch((err: Error) => {
1420
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1421
- });
1422
- }
1423
-
1424
- /**
1425
- * Get the badge's visibility.
1426
- * @returns Promise<boolean>
1427
- */
1428
- public async isBadgeVisible(): Promise<boolean> {
1429
- return DisplayRule.isBadgeVisible(this.id).catch((err: Error) => {
1430
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1431
- });
1432
- }
1433
-
1434
- /**
1435
- * Set the badge's visibility.
1436
- * @returns Promise<void>
1437
- */
1438
- public async setBadgeVisible(visible: boolean): Promise<void> {
1439
- return DisplayRule.setBadgeVisible(this.id, JSON.stringify(visible)).catch((err: Error) => {
1440
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1441
- });
1442
- }
1443
-
1444
- /**
1445
- * Get the badge's Zoom From value.
1446
- * @returns Promise<number>
1447
- */
1448
- public async getBadgeZoomFrom(): Promise<number> {
1449
- return DisplayRule.getBadgeZoomFrom(this.id).catch((err: Error) => {
1450
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1451
- });
1452
- }
1453
-
1454
- /**
1455
- * Set the badge's Zoom From value.
1456
- * @returns Promise<void>
1457
- */
1458
- public async setBadgeZoomFrom(zoomFrom: number): Promise<void> {
1459
- if (zoomFrom == null) {
1460
- zoomFrom = -1;
1461
- }
1462
- return DisplayRule.setBadgeZoomFrom(this.id, zoomFrom).catch((err: Error) => {
1463
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1464
- });
1465
- }
1466
-
1467
- /**
1468
- * Get the badge's Zoom To value.
1469
- * @returns Promise<number>
1470
- */
1471
- public async getBadgeZoomTo(): Promise<number> {
1472
- return DisplayRule.getBadgeZoomTo(this.id).catch((err: Error) => {
1473
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1474
- });
1475
- }
1476
-
1477
- /**
1478
- * Set the badge's Zoom To value.
1479
- * @returns Promise<void>
1480
- */
1481
- public async setBadgeZoomTo(zoomTo: number): Promise<void> {
1482
- if (zoomTo == null) {
1483
- zoomTo = -1;
1484
- }
1485
- return DisplayRule.setBadgeZoomTo(this.id, zoomTo).catch((err: Error) => {
1486
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1487
- });
1488
- }
1489
-
1490
- /**
1491
- * Get the badge's radius.
1492
- * @returns Promise<number>
1493
- */
1494
- public async getBadgeRadius(): Promise<number> {
1495
- return DisplayRule.getBadgeRadius(this.id).catch((err: Error) => {
1496
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1497
- });
1498
- }
1499
-
1500
- /**
1501
- * Set the badge's radius.
1502
- * @returns Promise<void>
1503
- */
1504
- public async setBadgeRadius(radius: number): Promise<void> {
1505
- if (radius == null) {
1506
- radius = -1;
1507
- }
1508
- return DisplayRule.setBadgeRadius(this.id, radius).catch((err: Error) => {
1509
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1510
- });
1511
- }
1512
-
1513
- /**
1514
- * Get the badge's stroke width.
1515
- * @returns Promise<number>
1516
- */
1517
- public async getBadgeStrokeWidth(): Promise<number> {
1518
- return DisplayRule.getBadgeStrokeWidth(this.id).catch((err: Error) => {
1519
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1520
- });
1521
- }
1522
-
1523
- /**
1524
- * Set the badge's stroke width.
1525
- * @returns Promise<void>
1526
- */
1527
- public async setBadgeStrokeWidth(strokeWidth: number): Promise<void> {
1528
- if (strokeWidth == null) {
1529
- strokeWidth = -1;
1530
- }
1531
- return DisplayRule.setBadgeStrokeWidth(this.id, strokeWidth).catch((err: Error) => {
1532
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1533
- });
1534
- }
1535
-
1536
- /**
1537
- * Get the badge's stroke color.
1538
- * @returns Promise<string>
1539
- */
1540
- public async getBadgeStrokeColor(): Promise<string> {
1541
- return DisplayRule.getBadgeStrokeColor(this.id).catch((err: Error) => {
1542
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1543
- });
1544
- }
1545
-
1546
- /**
1547
- * Set the badge's stroke color.
1548
- * @returns Promise<void>
1549
- */
1550
- public async setBadgeStrokeColor(strokeColor: string): Promise<void> {
1551
- return DisplayRule.setBadgeStrokeColor(this.id, strokeColor).catch((err: Error) => {
1552
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1553
- });
1554
- }
1555
-
1556
- /**
1557
- * Get the badge's fill color.
1558
- * @returns Promise<string>
1559
- */
1560
- public async getBadgeFillColor(): Promise<string> {
1561
- return DisplayRule.getBadgeFillColor(this.id).catch((err: Error) => {
1562
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1563
- });
1564
- }
1565
-
1566
- /**
1567
- * Set the badge's fill color.
1568
- * @returns Promise<void>
1569
- */
1570
- public async setBadgeFillColor(fillColor: string): Promise<void> {
1571
- return DisplayRule.setBadgeFillColor(this.id, fillColor).catch((err: Error) => {
1572
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1573
- });
1574
- }
1575
-
1576
- /**
1577
- * Get the badge's scale.
1578
- * @returns Promise<number>
1579
- */
1580
- public async getBadgeScale(): Promise<number> {
1581
- return DisplayRule.getBadgeScale(this.id).catch((err: Error) => {
1582
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1583
- });
1584
- }
1585
-
1586
- /**
1587
- * Set the badge's scale.
1588
- * @returns Promise<void>
1589
- */
1590
- public async setBadgeScale(badgeScale: number): Promise<void> {
1591
- if (badgeScale == null) {
1592
- badgeScale = -1;
1593
- }
1594
- return DisplayRule.setBadgeScale(this.id, badgeScale).catch((err: Error) => {
1595
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1596
- });
1597
- }
1598
-
1599
- /**
1600
- * Get the badge's position.
1601
- * @returns Promise<MPBadgePosition>
1602
- */
1603
- public async getBadgePosition(): Promise<MPBadgePosition> {
1604
- return DisplayRule.getBadgePosition(this.id).catch((err: Error) => {
1605
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1606
- });
1607
- }
1608
-
1609
- /**
1610
- * Set the badge's position.
1611
- * @returns Promise<void>
1612
- */
1613
- public async setBadgePosition(badgePosition: MPBadgePosition): Promise<void> {
1614
- if (badgePosition == null) {
1615
- return DisplayRule.setBadgePosition(this.id, -1).catch((err: Error) => {
1616
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1617
- });
1618
- }else {
1619
- return DisplayRule.setBadgePosition(this.id, badgePosition.valueOf()).catch((err: Error) => {
1620
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1621
- });
1622
- }
1623
- }
1624
-
1625
- /**
1626
- * Get the 3D model's URL.
1627
- * @returns Promise<string>
1628
- */
1629
- public async getModel3DModel(): Promise<string> {
1630
- return DisplayRule.getModel3DModel(this.id).catch((err: Error) => {
1631
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1632
- });
1633
- }
1634
-
1635
- /**
1636
- * Set the 3D model's URL.
1637
- * @param url string
1638
- * @returns Promise<void>
1639
- */
1640
- public async setModel3DModel(url: string): Promise<void> {
1641
- return DisplayRule.setModel3DModel(this.id, url).catch((err: Error) => {
1642
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1643
- });
1644
- }
1645
-
1646
- /**
1647
- * Get the 3D model's rotation X.
1648
- * @returns Promise<number>
1649
- */
1650
- public async getModel3DRotationX(): Promise<number> {
1651
- return DisplayRule.getModel3DRotationX(this.id).catch((err: Error) => {
1652
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1653
- });
1654
- }
1655
-
1656
- /**
1657
- * Set the 3D model's rotation X.
1658
- * @param rotationX number
1659
- * @returns Promise<void>
1660
- */
1661
- public async setModel3DRotationX(rotationX: number): Promise<void> {
1662
- if (rotationX == null) {
1663
- rotationX = -1;
1664
- }
1665
- return DisplayRule.setModel3DRotationX(this.id, rotationX).catch((err: Error) => {
1666
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1667
- });
1668
- }
1669
-
1670
- /**
1671
- * Get the 3D model's rotation Y.
1672
- * @returns Promise<number>
1673
- */
1674
- public async getModel3DRotationY(): Promise<number> {
1675
- return DisplayRule.getModel3DRotationY(this.id).catch((err: Error) => {
1676
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1677
- });
1678
- }
1679
-
1680
- /**
1681
- * Set the 3D model's rotation Y.
1682
- * @param rotationY number
1683
- * @returns Promise<void>
1684
- */
1685
- public async setModel3DRotationY(rotationY: number): Promise<void> {
1686
- if (rotationY == null) {
1687
- rotationY = -1;
1688
- }
1689
- return DisplayRule.setModel3DRotationY(this.id, rotationY).catch((err: Error) => {
1690
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1691
- });
1692
- }
1693
-
1694
- /**
1695
- * Get the 3D model's rotation Z.
1696
- * @returns Promise<number>
1697
- */
1698
- public async getModel3DRotationZ(): Promise<number> {
1699
- return DisplayRule.getModel3DRotationZ(this.id).catch((err: Error) => {
1700
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1701
- });
1702
- }
1703
-
1704
- /**
1705
- * Set the 3D model's rotation Z.
1706
- * @param rotationZ number
1707
- * @returns Promise<void>
1708
- */
1709
- public async setModel3DRotationZ(rotationZ: number): Promise<void> {
1710
- if (rotationZ == null) {
1711
- rotationZ = -1;
1712
- }
1713
- return DisplayRule.setModel3DRotationZ(this.id, rotationZ).catch((err: Error) => {
1714
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1715
- });
1716
- }
1717
-
1718
- /**
1719
- * Get the 3D model's scale.
1720
- * @returns Promise<number>
1721
- */
1722
- public async getModel3DScale(): Promise<number> {
1723
- return DisplayRule.getModel3DScale(this.id).catch((err: Error) => {
1724
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1725
- });
1726
- }
1727
-
1728
- /**
1729
- * Set the 3D model's scale.
1730
- * @param scale number
1731
- * @returns Promise<void>
1732
- */
1733
- public async setModel3DScale(scale: number): Promise<void> {
1734
- if (scale == null) {
1735
- scale = -1;
1736
- }
1737
- return DisplayRule.setModel3DScale(this.id, scale).catch((err: Error) => {
1738
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1739
- });
1740
- }
1741
-
1742
- /**
1743
- * Get the 3D model's zoom from value.
1744
- * @returns Promise<number>
1745
- */
1746
- public async getModel3DZoomFrom(): Promise<number> {
1747
- return DisplayRule.getModel3DZoomFrom(this.id).catch((err: Error) => {
1748
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1749
- });
1750
- }
1751
-
1752
- /**
1753
- * Set the 3D model's zoom from value.
1754
- * @param zoomFrom number
1755
- * @returns Promise<void>
1756
- */
1757
- public async setModel3DZoomFrom(zoomFrom: number): Promise<void> {
1758
- if (zoomFrom == null) {
1759
- zoomFrom = -1;
1760
- }
1761
- return DisplayRule.setModel3DZoomFrom(this.id, zoomFrom).catch((err: Error) => {
1762
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1763
- });
1764
- }
1765
-
1766
- /**
1767
- * Get the 3D model's zoom to value.
1768
- * @returns Promise<number>
1769
- */
1770
- public async getModel3DZoomTo(): Promise<number> {
1771
- return DisplayRule.getModel3DZoomTo(this.id).catch((err: Error) => {
1772
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1773
- });
1774
- }
1775
-
1776
- /**
1777
- * Set the 3D model's zoom to value.
1778
- * @param zoomTo number
1779
- * @returns Promise<void>
1780
- */
1781
- public async setModel3DZoomTo(zoomTo: number): Promise<void> {
1782
- if (zoomTo == null) {
1783
- zoomTo = -1;
1784
- }
1785
- return DisplayRule.setModel3DZoomTo(this.id, zoomTo).catch((err: Error) => {
1786
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1787
- });
1788
- }
1789
-
1790
- /**
1791
- * Get the 3D model's visibility.
1792
- * @returns Promise<boolean>
1793
- */
1794
- public async isModel3DVisible(): Promise<boolean> {
1795
- return DisplayRule.isModel3DVisible(this.id).catch((err: Error) => {
1796
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1797
- });
1798
- }
1799
-
1800
- /**
1801
- * Set the 3D model's visibility.
1802
- * @param visible boolean
1803
- * @returns Promise<void>
1804
- */
1805
- public async setModel3DVisible(visible: boolean): Promise<void> {
1806
- return DisplayRule.setModel3DVisible(this.id, JSON.stringify(visible)).catch((err: Error) => {
1807
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1808
- });
1809
- }
1810
-
1811
- /**
1812
- * Resets the display rule to its default state.
1813
- *
1814
- * @public
1815
- * @async
1816
- * @returns {Promise<void>}
1817
- */
1818
- public async reset(): Promise<void> {
1819
- return DisplayRule.reset(this.id).catch((err: Error) => {
1820
- return Promise.reject(MPError.create(JSON.parse(err.message)));
1821
- });
1822
- }
1823
- }