@mapsindoors/react-native-maps-indoors-mapbox 1.3.2 → 2.0.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.
- package/README.md +48 -1
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.idea/compiler.xml +1 -1
- package/android/.idea/gradle.xml +1 -1
- package/android/.idea/misc.xml +2 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/mapsindoorsrn/MapboxMapView.java +12 -2
- package/android/src/main/java/com/mapsindoorsrn/MapsIndoorsViewManager.java +5 -1
- package/android/src/main/java/com/mapsindoorsrn/core/DirectionsRendererModule.java +3 -0
- package/android/src/main/java/com/mapsindoorsrn/core/MPDisplayRuleModule.java +172 -0
- package/android/src/main/java/com/mapsindoorsrn/core/MapControlModule.java +80 -0
- package/android/src/main/java/com/mapsindoorsrn/core/UtilsModule.java +39 -0
- package/app.plugin.js +280 -0
- package/index.ts +12 -1
- package/ios/MapsIndoorsViewManager.swift +21 -4
- package/ios/core/DirectionsRendererModule.swift +2 -0
- package/ios/core/LabelGraphic.swift +15 -0
- package/ios/core/MPDisplayRuleBridge.m +81 -0
- package/ios/core/MPDisplayRuleModule.swift +191 -0
- package/ios/core/MapControlBridge.m +21 -0
- package/ios/core/MapControlModule.swift +83 -1
- package/ios/core/RCMapView.swift +1 -1
- package/ios/core/UtilsBridge.m +4 -0
- package/ios/core/UtilsModule.swift +21 -0
- package/package.json +3 -2
- package/react-native-maps-indoors-mapbox.podspec +2 -2
- package/src/core/MPCameraViewFitMode.ts +4 -0
- package/src/core/MPDirectionsRenderer.ts +6 -1
- package/src/core/MPDisplayRule.ts +296 -89
- package/src/core/MPFeatureTypes.ts +8 -0
- package/src/core/MPLabelGraphic.ts +24 -0
- package/src/core/MPLabelType.ts +1 -0
- package/src/core/MPLocation.ts +20 -0
- package/src/core/MPLocationSettings.ts +40 -0
- package/src/core/MPMapConfig.ts +36 -0
- package/src/core/MPPOIType.ts +43 -0
- package/src/core/MPPropertyData.ts +10 -1
- package/src/core/MPSelectionMode.ts +4 -0
- package/src/core/MPSolution.ts +9 -0
- package/src/core/MPSolutionConfig.ts +18 -0
- package/src/core/MPUtils.ts +5 -0
- package/src/core/MapControl.ts +54 -0
|
@@ -3,6 +3,7 @@ import { MPError, MPIconSize } from "../../index";
|
|
|
3
3
|
import { MPIconPlacement } from './MPIconPlacement';
|
|
4
4
|
import { MPLabelType } from './MPLabelType';
|
|
5
5
|
import { MPBadgePosition } from './MPBadgePosition';
|
|
6
|
+
import MPLabelGraphic from './MPLabelGraphic';
|
|
6
7
|
const { DisplayRule } = NativeModules;
|
|
7
8
|
|
|
8
9
|
|
|
@@ -1079,8 +1080,8 @@ export default class MPDisplayRule {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
|
|
1081
1082
|
/**
|
|
1082
|
-
*
|
|
1083
|
-
* @returns
|
|
1083
|
+
* Get the scale value of the icon.
|
|
1084
|
+
* @returns Promise<number>
|
|
1084
1085
|
*/
|
|
1085
1086
|
public async getIconScale(): Promise<number> {
|
|
1086
1087
|
return DisplayRule.getIconScale(this.id).catch((err: Error) => {
|
|
@@ -1089,8 +1090,8 @@ export default class MPDisplayRule {
|
|
|
1089
1090
|
}
|
|
1090
1091
|
|
|
1091
1092
|
/**
|
|
1092
|
-
*
|
|
1093
|
-
* @returns
|
|
1093
|
+
* Set the scale value of the icon.
|
|
1094
|
+
* @returns Promise<void>
|
|
1094
1095
|
*/
|
|
1095
1096
|
public async setIconScale(iconScale: number): Promise<void> {
|
|
1096
1097
|
if (iconScale == null) {
|
|
@@ -1102,8 +1103,8 @@ export default class MPDisplayRule {
|
|
|
1102
1103
|
}
|
|
1103
1104
|
|
|
1104
1105
|
/**
|
|
1105
|
-
*
|
|
1106
|
-
* @returns
|
|
1106
|
+
* Get the icon's anchor value.
|
|
1107
|
+
* @returns Promise<MPIconAnchor>
|
|
1107
1108
|
*/
|
|
1108
1109
|
public async getIconPlacement(): Promise<MPIconPlacement> {
|
|
1109
1110
|
return DisplayRule.getIconPlacement(this.id).catch((err: Error) => {
|
|
@@ -1112,8 +1113,8 @@ export default class MPDisplayRule {
|
|
|
1112
1113
|
}
|
|
1113
1114
|
|
|
1114
1115
|
/**
|
|
1115
|
-
*
|
|
1116
|
-
* @returns
|
|
1116
|
+
* Set the icon's anchor value.
|
|
1117
|
+
* @returns Promise<void>
|
|
1117
1118
|
*/
|
|
1118
1119
|
public async setIconPlacement(iconPlacement: MPIconPlacement): Promise<void> {
|
|
1119
1120
|
if (iconPlacement == null) {
|
|
@@ -1128,8 +1129,8 @@ export default class MPDisplayRule {
|
|
|
1128
1129
|
}
|
|
1129
1130
|
|
|
1130
1131
|
/**
|
|
1131
|
-
*
|
|
1132
|
-
* @returns
|
|
1132
|
+
* Get the type of the label.
|
|
1133
|
+
* @returns Promise<MPLabelType>
|
|
1133
1134
|
*/
|
|
1134
1135
|
public async getLabelType(): Promise<MPLabelType> {
|
|
1135
1136
|
return DisplayRule.getLabelType(this.id).catch((err: Error) => {
|
|
@@ -1138,8 +1139,8 @@ export default class MPDisplayRule {
|
|
|
1138
1139
|
}
|
|
1139
1140
|
|
|
1140
1141
|
/**
|
|
1141
|
-
*
|
|
1142
|
-
* @returns
|
|
1142
|
+
* Set the type of the label.
|
|
1143
|
+
* @returns Promise<void>
|
|
1143
1144
|
*/
|
|
1144
1145
|
public async setLabelType(labelType: MPLabelType): Promise<void> {
|
|
1145
1146
|
if (labelType == null) {
|
|
@@ -1150,13 +1151,12 @@ export default class MPDisplayRule {
|
|
|
1150
1151
|
return DisplayRule.setLabelType(this.id, labelType.valueOf()).catch((err: Error) => {
|
|
1151
1152
|
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1152
1153
|
});
|
|
1153
|
-
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
/**
|
|
1158
|
-
*
|
|
1159
|
-
* @returns
|
|
1158
|
+
* Get the label's text size.
|
|
1159
|
+
* @returns Promise<number>
|
|
1160
1160
|
*/
|
|
1161
1161
|
public async getLabelStyleTextSize(): Promise<number> {
|
|
1162
1162
|
return DisplayRule.getLabelStyleTextSize(this.id).catch((err: Error) => {
|
|
@@ -1165,8 +1165,8 @@ export default class MPDisplayRule {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
1167
|
/**
|
|
1168
|
-
*
|
|
1169
|
-
* @returns
|
|
1168
|
+
* Set the label's text size.
|
|
1169
|
+
* @returns Promise<void>
|
|
1170
1170
|
*/
|
|
1171
1171
|
public async setLabelStyleTextSize(textSize: number): Promise<void> {
|
|
1172
1172
|
if (textSize == null) {
|
|
@@ -1178,8 +1178,8 @@ export default class MPDisplayRule {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
|
|
1180
1180
|
/**
|
|
1181
|
-
*
|
|
1182
|
-
* @returns
|
|
1181
|
+
* Get the label's text color
|
|
1182
|
+
* @returns Promise<string>
|
|
1183
1183
|
*/
|
|
1184
1184
|
public async getLabelStyleTextColor(): Promise<string> {
|
|
1185
1185
|
return DisplayRule.getLabelStyleTextColor(this.id).catch((err: Error) => {
|
|
@@ -1188,8 +1188,8 @@ export default class MPDisplayRule {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
|
|
1190
1190
|
/**
|
|
1191
|
-
*
|
|
1192
|
-
* @returns
|
|
1191
|
+
* Set the label's text color
|
|
1192
|
+
* @returns Promise<void>
|
|
1193
1193
|
*/
|
|
1194
1194
|
public async setLabelStyleTextColor(textColor: String): Promise<void> {
|
|
1195
1195
|
return DisplayRule.setLabelStyleTextColor(this.id, textColor).catch((err: Error) => {
|
|
@@ -1198,8 +1198,8 @@ export default class MPDisplayRule {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
1200
|
/**
|
|
1201
|
-
*
|
|
1202
|
-
* @returns
|
|
1201
|
+
* Get the label's text opacity
|
|
1202
|
+
* @returns Promise<number>
|
|
1203
1203
|
*/
|
|
1204
1204
|
public async getLabelStyleTextOpacity(): Promise<number> {
|
|
1205
1205
|
return DisplayRule.getLabelStyleTextOpacity(this.id).catch((err: Error) => {
|
|
@@ -1208,8 +1208,8 @@ export default class MPDisplayRule {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
1210
1210
|
/**
|
|
1211
|
-
*
|
|
1212
|
-
* @returns
|
|
1211
|
+
* Set the label's text opacity
|
|
1212
|
+
* @returns Promise<void>
|
|
1213
1213
|
*/
|
|
1214
1214
|
public async setLabelStyleTextOpacity(textOpacity: number): Promise<void> {
|
|
1215
1215
|
if (textOpacity == null) {
|
|
@@ -1221,8 +1221,8 @@ export default class MPDisplayRule {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
|
|
1223
1223
|
/**
|
|
1224
|
-
*
|
|
1225
|
-
* @returns
|
|
1224
|
+
* Get the label's halo color
|
|
1225
|
+
* @returns Promise<string>
|
|
1226
1226
|
*/
|
|
1227
1227
|
public async getLabelStyleHaloColor(): Promise<string> {
|
|
1228
1228
|
return DisplayRule.getLabelStyleHaloColor(this.id).catch((err: Error) => {
|
|
@@ -1231,8 +1231,8 @@ export default class MPDisplayRule {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1235
|
-
* @returns
|
|
1234
|
+
* Set the label's halo color
|
|
1235
|
+
* @returns Promise<void>
|
|
1236
1236
|
*/
|
|
1237
1237
|
public async setLabelStyleHaloColor(color: string): Promise<void> {
|
|
1238
1238
|
return DisplayRule.setLabelStyleHaloColor(this.id, color).catch((err: Error) => {
|
|
@@ -1241,8 +1241,8 @@ export default class MPDisplayRule {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
|
|
1243
1243
|
/**
|
|
1244
|
-
*
|
|
1245
|
-
* @returns
|
|
1244
|
+
* Get the label's halo width
|
|
1245
|
+
* @returns Promise<number>
|
|
1246
1246
|
*/
|
|
1247
1247
|
public async getLabelStyleHaloWidth(): Promise<number> {
|
|
1248
1248
|
return DisplayRule.getLabelStyleHaloWidth(this.id).catch((err: Error) => {
|
|
@@ -1251,8 +1251,8 @@ export default class MPDisplayRule {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
|
|
1253
1253
|
/**
|
|
1254
|
-
*
|
|
1255
|
-
* @returns
|
|
1254
|
+
* Set the label's halo width
|
|
1255
|
+
* @returns Promise<void>
|
|
1256
1256
|
*/
|
|
1257
1257
|
public async setLabelStyleHaloWidth(haloWidth: number): Promise<void> {
|
|
1258
1258
|
if (haloWidth == null) {
|
|
@@ -1264,8 +1264,8 @@ export default class MPDisplayRule {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
1266
1266
|
/**
|
|
1267
|
-
*
|
|
1268
|
-
* @returns
|
|
1267
|
+
* Get the label's halo blur
|
|
1268
|
+
* @returns Promise<number>
|
|
1269
1269
|
*/
|
|
1270
1270
|
public async getLabelStyleHaloBlur(): Promise<number> {
|
|
1271
1271
|
return DisplayRule.getLabelStyleHaloBlur(this.id).catch((err: Error) => {
|
|
@@ -1274,8 +1274,8 @@ export default class MPDisplayRule {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
|
|
1276
1276
|
/**
|
|
1277
|
-
*
|
|
1278
|
-
* @returns
|
|
1277
|
+
* Set the label's halo blur
|
|
1278
|
+
* @returns Promise<void>
|
|
1279
1279
|
*/
|
|
1280
1280
|
public async setLabelStyleHaloBlur(haloBlur: number): Promise<void> {
|
|
1281
1281
|
if (haloBlur == null) {
|
|
@@ -1287,8 +1287,8 @@ export default class MPDisplayRule {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
|
|
1289
1289
|
/**
|
|
1290
|
-
*
|
|
1291
|
-
* @returns
|
|
1290
|
+
* Get the label's bearing
|
|
1291
|
+
* @returns Promise<number>
|
|
1292
1292
|
*/
|
|
1293
1293
|
public async getLabelStyleBearing(): Promise<number> {
|
|
1294
1294
|
return DisplayRule.getLabelStyleBearing(this.id).catch((err: Error) => {
|
|
@@ -1297,8 +1297,8 @@ export default class MPDisplayRule {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
|
|
1299
1299
|
/**
|
|
1300
|
-
*
|
|
1301
|
-
* @returns
|
|
1300
|
+
* Set the label's bearing
|
|
1301
|
+
* @returns Promise<void>
|
|
1302
1302
|
*/
|
|
1303
1303
|
public async setLabelStyleBearing(bearing: number): Promise<void> {
|
|
1304
1304
|
if (bearing == null) {
|
|
@@ -1310,8 +1310,29 @@ export default class MPDisplayRule {
|
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
1312
|
/**
|
|
1313
|
-
*
|
|
1314
|
-
* @
|
|
1313
|
+
* Set the label's Graphic style
|
|
1314
|
+
* @param graphicLabel MPLabelGraphic
|
|
1315
|
+
* @returns Promise<void>
|
|
1316
|
+
*/
|
|
1317
|
+
public async setLabelStyleGraphic(graphicLabel: MPLabelGraphic): Promise<void> {
|
|
1318
|
+
return DisplayRule.setLabelStyleGraphic(this.id, JSON.stringify(graphicLabel)).catch((err: Error) => {
|
|
1319
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Get the label's Graphic style
|
|
1325
|
+
* @returns Promise<MPLabelGraphic>
|
|
1326
|
+
*/
|
|
1327
|
+
public async getLabelStyleGraphic(): Promise<MPLabelGraphic> {
|
|
1328
|
+
return DisplayRule.getLabelStyleGraphic(this.id).catch((err: Error) => {
|
|
1329
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Get the polygon's lightness factor.
|
|
1335
|
+
* @returns Promise<number>
|
|
1315
1336
|
*/
|
|
1316
1337
|
public async getPolygonLightnessFactor(): Promise<number> {
|
|
1317
1338
|
return DisplayRule.getPolygonLightnessFactor(this.id).catch((err: Error) => {
|
|
@@ -1320,8 +1341,8 @@ export default class MPDisplayRule {
|
|
|
1320
1341
|
}
|
|
1321
1342
|
|
|
1322
1343
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
* @returns
|
|
1344
|
+
* Set the polygon's lightness factor.
|
|
1345
|
+
* @returns Promise<void>
|
|
1325
1346
|
*/
|
|
1326
1347
|
public async setPolygonLightnessFactor(lightnessFactor: number): Promise<void> {
|
|
1327
1348
|
if (lightnessFactor == null) {
|
|
@@ -1333,8 +1354,8 @@ export default class MPDisplayRule {
|
|
|
1333
1354
|
}
|
|
1334
1355
|
|
|
1335
1356
|
/**
|
|
1336
|
-
*
|
|
1337
|
-
* @returns
|
|
1357
|
+
* Get the wall's lightness factor.
|
|
1358
|
+
* @returns Promise<number>
|
|
1338
1359
|
*/
|
|
1339
1360
|
public async getWallLightnessFactor(): Promise<number> {
|
|
1340
1361
|
return DisplayRule.getWallLightnessFactor(this.id).catch((err: Error) => {
|
|
@@ -1343,8 +1364,8 @@ export default class MPDisplayRule {
|
|
|
1343
1364
|
}
|
|
1344
1365
|
|
|
1345
1366
|
/**
|
|
1346
|
-
*
|
|
1347
|
-
* @returns
|
|
1367
|
+
* Set the wall's lightness factor.
|
|
1368
|
+
* @returns Promise<void>
|
|
1348
1369
|
*/
|
|
1349
1370
|
public async setWallLightnessFactor(lightnessFactor: number): Promise<void> {
|
|
1350
1371
|
if (lightnessFactor == null) {
|
|
@@ -1356,8 +1377,8 @@ export default class MPDisplayRule {
|
|
|
1356
1377
|
}
|
|
1357
1378
|
|
|
1358
1379
|
/**
|
|
1359
|
-
*
|
|
1360
|
-
* @returns
|
|
1380
|
+
* Get the extrusion's lightness factor.
|
|
1381
|
+
* @returns Promise<number>
|
|
1361
1382
|
*/
|
|
1362
1383
|
public async getExtrusionLightnessFactor(): Promise<number> {
|
|
1363
1384
|
return DisplayRule.getExtrusionLightnessFactor(this.id).catch((err: Error) => {
|
|
@@ -1366,8 +1387,8 @@ export default class MPDisplayRule {
|
|
|
1366
1387
|
}
|
|
1367
1388
|
|
|
1368
1389
|
/**
|
|
1369
|
-
*
|
|
1370
|
-
* @returns
|
|
1390
|
+
* Set the extrusion's lightness factor.
|
|
1391
|
+
* @returns Promise<void>
|
|
1371
1392
|
*/
|
|
1372
1393
|
public async setExtrusionLightnessFactor(lightnessFactor: number): Promise<void> {
|
|
1373
1394
|
if (lightnessFactor == null) {
|
|
@@ -1379,8 +1400,8 @@ export default class MPDisplayRule {
|
|
|
1379
1400
|
}
|
|
1380
1401
|
|
|
1381
1402
|
/**
|
|
1382
|
-
*
|
|
1383
|
-
* @returns
|
|
1403
|
+
* Get the badge's visibility.
|
|
1404
|
+
* @returns Promise<boolean>
|
|
1384
1405
|
*/
|
|
1385
1406
|
public async isBadgeVisible(): Promise<boolean> {
|
|
1386
1407
|
return DisplayRule.isBadgeVisible(this.id).catch((err: Error) => {
|
|
@@ -1389,8 +1410,8 @@ export default class MPDisplayRule {
|
|
|
1389
1410
|
}
|
|
1390
1411
|
|
|
1391
1412
|
/**
|
|
1392
|
-
*
|
|
1393
|
-
* @returns
|
|
1413
|
+
* Set the badge's visibility.
|
|
1414
|
+
* @returns Promise<void>
|
|
1394
1415
|
*/
|
|
1395
1416
|
public async setBadgeVisible(visible: boolean): Promise<void> {
|
|
1396
1417
|
return DisplayRule.setBadgeVisible(this.id, JSON.stringify(visible)).catch((err: Error) => {
|
|
@@ -1399,8 +1420,8 @@ export default class MPDisplayRule {
|
|
|
1399
1420
|
}
|
|
1400
1421
|
|
|
1401
1422
|
/**
|
|
1402
|
-
*
|
|
1403
|
-
* @returns
|
|
1423
|
+
* Get the badge's Zoom From value.
|
|
1424
|
+
* @returns Promise<number>
|
|
1404
1425
|
*/
|
|
1405
1426
|
public async getBadgeZoomFrom(): Promise<number> {
|
|
1406
1427
|
return DisplayRule.getBadgeZoomFrom(this.id).catch((err: Error) => {
|
|
@@ -1409,8 +1430,8 @@ export default class MPDisplayRule {
|
|
|
1409
1430
|
}
|
|
1410
1431
|
|
|
1411
1432
|
/**
|
|
1412
|
-
*
|
|
1413
|
-
* @returns
|
|
1433
|
+
* Set the badge's Zoom From value.
|
|
1434
|
+
* @returns Promise<void>
|
|
1414
1435
|
*/
|
|
1415
1436
|
public async setBadgeZoomFrom(zoomFrom: number): Promise<void> {
|
|
1416
1437
|
if (zoomFrom == null) {
|
|
@@ -1422,8 +1443,8 @@ export default class MPDisplayRule {
|
|
|
1422
1443
|
}
|
|
1423
1444
|
|
|
1424
1445
|
/**
|
|
1425
|
-
*
|
|
1426
|
-
* @returns
|
|
1446
|
+
* Get the badge's Zoom To value.
|
|
1447
|
+
* @returns Promise<number>
|
|
1427
1448
|
*/
|
|
1428
1449
|
public async getBadgeZoomTo(): Promise<number> {
|
|
1429
1450
|
return DisplayRule.getBadgeZoomTo(this.id).catch((err: Error) => {
|
|
@@ -1432,8 +1453,8 @@ export default class MPDisplayRule {
|
|
|
1432
1453
|
}
|
|
1433
1454
|
|
|
1434
1455
|
/**
|
|
1435
|
-
*
|
|
1436
|
-
* @returns
|
|
1456
|
+
* Set the badge's Zoom To value.
|
|
1457
|
+
* @returns Promise<void>
|
|
1437
1458
|
*/
|
|
1438
1459
|
public async setBadgeZoomTo(zoomTo: number): Promise<void> {
|
|
1439
1460
|
if (zoomTo == null) {
|
|
@@ -1445,8 +1466,8 @@ export default class MPDisplayRule {
|
|
|
1445
1466
|
}
|
|
1446
1467
|
|
|
1447
1468
|
/**
|
|
1448
|
-
*
|
|
1449
|
-
* @returns
|
|
1469
|
+
* Get the badge's radius.
|
|
1470
|
+
* @returns Promise<number>
|
|
1450
1471
|
*/
|
|
1451
1472
|
public async getBadgeRadius(): Promise<number> {
|
|
1452
1473
|
return DisplayRule.getBadgeRadius(this.id).catch((err: Error) => {
|
|
@@ -1455,8 +1476,8 @@ export default class MPDisplayRule {
|
|
|
1455
1476
|
}
|
|
1456
1477
|
|
|
1457
1478
|
/**
|
|
1458
|
-
*
|
|
1459
|
-
* @returns
|
|
1479
|
+
* Set the badge's radius.
|
|
1480
|
+
* @returns Promise<void>
|
|
1460
1481
|
*/
|
|
1461
1482
|
public async setBadgeRadius(radius: number): Promise<void> {
|
|
1462
1483
|
if (radius == null) {
|
|
@@ -1468,8 +1489,8 @@ export default class MPDisplayRule {
|
|
|
1468
1489
|
}
|
|
1469
1490
|
|
|
1470
1491
|
/**
|
|
1471
|
-
*
|
|
1472
|
-
* @returns
|
|
1492
|
+
* Get the badge's stroke width.
|
|
1493
|
+
* @returns Promise<number>
|
|
1473
1494
|
*/
|
|
1474
1495
|
public async getBadgeStrokeWidth(): Promise<number> {
|
|
1475
1496
|
return DisplayRule.getBadgeStrokeWidth(this.id).catch((err: Error) => {
|
|
@@ -1478,8 +1499,8 @@ export default class MPDisplayRule {
|
|
|
1478
1499
|
}
|
|
1479
1500
|
|
|
1480
1501
|
/**
|
|
1481
|
-
*
|
|
1482
|
-
* @returns
|
|
1502
|
+
* Set the badge's stroke width.
|
|
1503
|
+
* @returns Promise<void>
|
|
1483
1504
|
*/
|
|
1484
1505
|
public async setBadgeStrokeWidth(strokeWidth: number): Promise<void> {
|
|
1485
1506
|
if (strokeWidth == null) {
|
|
@@ -1491,8 +1512,8 @@ export default class MPDisplayRule {
|
|
|
1491
1512
|
}
|
|
1492
1513
|
|
|
1493
1514
|
/**
|
|
1494
|
-
*
|
|
1495
|
-
* @returns
|
|
1515
|
+
* Get the badge's stroke color.
|
|
1516
|
+
* @returns Promise<string>
|
|
1496
1517
|
*/
|
|
1497
1518
|
public async getBadgeStrokeColor(): Promise<string> {
|
|
1498
1519
|
return DisplayRule.getBadgeStrokeColor(this.id).catch((err: Error) => {
|
|
@@ -1501,8 +1522,8 @@ export default class MPDisplayRule {
|
|
|
1501
1522
|
}
|
|
1502
1523
|
|
|
1503
1524
|
/**
|
|
1504
|
-
*
|
|
1505
|
-
* @returns
|
|
1525
|
+
* Set the badge's stroke color.
|
|
1526
|
+
* @returns Promise<void>
|
|
1506
1527
|
*/
|
|
1507
1528
|
public async setBadgeStrokeColor(strokeColor: string): Promise<void> {
|
|
1508
1529
|
return DisplayRule.setBadgeStrokeColor(this.id, strokeColor).catch((err: Error) => {
|
|
@@ -1511,8 +1532,8 @@ export default class MPDisplayRule {
|
|
|
1511
1532
|
}
|
|
1512
1533
|
|
|
1513
1534
|
/**
|
|
1514
|
-
*
|
|
1515
|
-
* @returns
|
|
1535
|
+
* Get the badge's fill color.
|
|
1536
|
+
* @returns Promise<string>
|
|
1516
1537
|
*/
|
|
1517
1538
|
public async getBadgeFillColor(): Promise<string> {
|
|
1518
1539
|
return DisplayRule.getBadgeFillColor(this.id).catch((err: Error) => {
|
|
@@ -1521,8 +1542,8 @@ export default class MPDisplayRule {
|
|
|
1521
1542
|
}
|
|
1522
1543
|
|
|
1523
1544
|
/**
|
|
1524
|
-
*
|
|
1525
|
-
* @returns
|
|
1545
|
+
* Set the badge's fill color.
|
|
1546
|
+
* @returns Promise<void>
|
|
1526
1547
|
*/
|
|
1527
1548
|
public async setBadgeFillColor(fillColor: string): Promise<void> {
|
|
1528
1549
|
return DisplayRule.setBadgeFillColor(this.id, fillColor).catch((err: Error) => {
|
|
@@ -1531,8 +1552,8 @@ export default class MPDisplayRule {
|
|
|
1531
1552
|
}
|
|
1532
1553
|
|
|
1533
1554
|
/**
|
|
1534
|
-
*
|
|
1535
|
-
* @returns
|
|
1555
|
+
* Get the badge's scale.
|
|
1556
|
+
* @returns Promise<number>
|
|
1536
1557
|
*/
|
|
1537
1558
|
public async getBadgeScale(): Promise<number> {
|
|
1538
1559
|
return DisplayRule.getBadgeScale(this.id).catch((err: Error) => {
|
|
@@ -1541,8 +1562,8 @@ export default class MPDisplayRule {
|
|
|
1541
1562
|
}
|
|
1542
1563
|
|
|
1543
1564
|
/**
|
|
1544
|
-
*
|
|
1545
|
-
* @returns
|
|
1565
|
+
* Set the badge's scale.
|
|
1566
|
+
* @returns Promise<void>
|
|
1546
1567
|
*/
|
|
1547
1568
|
public async setBadgeScale(badgeScale: number): Promise<void> {
|
|
1548
1569
|
if (badgeScale == null) {
|
|
@@ -1554,8 +1575,8 @@ export default class MPDisplayRule {
|
|
|
1554
1575
|
}
|
|
1555
1576
|
|
|
1556
1577
|
/**
|
|
1557
|
-
*
|
|
1558
|
-
* @returns
|
|
1578
|
+
* Get the badge's position.
|
|
1579
|
+
* @returns Promise<MPBadgePosition>
|
|
1559
1580
|
*/
|
|
1560
1581
|
public async getBadgePosition(): Promise<MPBadgePosition> {
|
|
1561
1582
|
return DisplayRule.getBadgePosition(this.id).catch((err: Error) => {
|
|
@@ -1564,8 +1585,8 @@ export default class MPDisplayRule {
|
|
|
1564
1585
|
}
|
|
1565
1586
|
|
|
1566
1587
|
/**
|
|
1567
|
-
*
|
|
1568
|
-
* @returns
|
|
1588
|
+
* Set the badge's position.
|
|
1589
|
+
* @returns Promise<void>
|
|
1569
1590
|
*/
|
|
1570
1591
|
public async setBadgePosition(badgePosition: MPBadgePosition): Promise<void> {
|
|
1571
1592
|
if (badgePosition == null) {
|
|
@@ -1579,6 +1600,192 @@ export default class MPDisplayRule {
|
|
|
1579
1600
|
}
|
|
1580
1601
|
}
|
|
1581
1602
|
|
|
1603
|
+
/**
|
|
1604
|
+
* Get the 3D model's URL.
|
|
1605
|
+
* @returns Promise<string>
|
|
1606
|
+
*/
|
|
1607
|
+
public async getModel3DModel(): Promise<string> {
|
|
1608
|
+
return DisplayRule.getModel3DModel(this.id).catch((err: Error) => {
|
|
1609
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
/**
|
|
1614
|
+
* Set the 3D model's URL.
|
|
1615
|
+
* @param url string
|
|
1616
|
+
* @returns Promise<void>
|
|
1617
|
+
*/
|
|
1618
|
+
public async setModel3DModel(url: string): Promise<void> {
|
|
1619
|
+
return DisplayRule.setModel3DModel(this.id, url).catch((err: Error) => {
|
|
1620
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* Get the 3D model's rotation X.
|
|
1626
|
+
* @returns Promise<number>
|
|
1627
|
+
*/
|
|
1628
|
+
public async getModel3DRotationX(): Promise<number> {
|
|
1629
|
+
return DisplayRule.getModel3DRotationX(this.id).catch((err: Error) => {
|
|
1630
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
/**
|
|
1635
|
+
* Set the 3D model's rotation X.
|
|
1636
|
+
* @param rotationX number
|
|
1637
|
+
* @returns Promise<void>
|
|
1638
|
+
*/
|
|
1639
|
+
public async setModel3DRotationX(rotationX: number): Promise<void> {
|
|
1640
|
+
if (rotationX == null) {
|
|
1641
|
+
rotationX = -1;
|
|
1642
|
+
}
|
|
1643
|
+
return DisplayRule.setModel3DRotationX(this.id, rotationX).catch((err: Error) => {
|
|
1644
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
/**
|
|
1649
|
+
* Get the 3D model's rotation Y.
|
|
1650
|
+
* @returns Promise<number>
|
|
1651
|
+
*/
|
|
1652
|
+
public async getModel3DRotationY(): Promise<number> {
|
|
1653
|
+
return DisplayRule.getModel3DRotationY(this.id).catch((err: Error) => {
|
|
1654
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
/**
|
|
1659
|
+
* Set the 3D model's rotation Y.
|
|
1660
|
+
* @param rotationY number
|
|
1661
|
+
* @returns Promise<void>
|
|
1662
|
+
*/
|
|
1663
|
+
public async setModel3DRotationY(rotationY: number): Promise<void> {
|
|
1664
|
+
if (rotationY == null) {
|
|
1665
|
+
rotationY = -1;
|
|
1666
|
+
}
|
|
1667
|
+
return DisplayRule.setModel3DRotationY(this.id, rotationY).catch((err: Error) => {
|
|
1668
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Get the 3D model's rotation Z.
|
|
1674
|
+
* @returns Promise<number>
|
|
1675
|
+
*/
|
|
1676
|
+
public async getModel3DRotationZ(): Promise<number> {
|
|
1677
|
+
return DisplayRule.getModel3DRotationZ(this.id).catch((err: Error) => {
|
|
1678
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Set the 3D model's rotation Z.
|
|
1684
|
+
* @param rotationZ number
|
|
1685
|
+
* @returns Promise<void>
|
|
1686
|
+
*/
|
|
1687
|
+
public async setModel3DRotationZ(rotationZ: number): Promise<void> {
|
|
1688
|
+
if (rotationZ == null) {
|
|
1689
|
+
rotationZ = -1;
|
|
1690
|
+
}
|
|
1691
|
+
return DisplayRule.setModel3DRotationZ(this.id, rotationZ).catch((err: Error) => {
|
|
1692
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* Get the 3D model's scale.
|
|
1698
|
+
* @returns Promise<number>
|
|
1699
|
+
*/
|
|
1700
|
+
public async getModel3DScale(): Promise<number> {
|
|
1701
|
+
return DisplayRule.getModel3DScale(this.id).catch((err: Error) => {
|
|
1702
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Set the 3D model's scale.
|
|
1708
|
+
* @param scale number
|
|
1709
|
+
* @returns Promise<void>
|
|
1710
|
+
*/
|
|
1711
|
+
public async setModel3DScale(scale: number): Promise<void> {
|
|
1712
|
+
if (scale == null) {
|
|
1713
|
+
scale = -1;
|
|
1714
|
+
}
|
|
1715
|
+
return DisplayRule.setModel3DScale(this.id, scale).catch((err: Error) => {
|
|
1716
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
/**
|
|
1721
|
+
* Get the 3D model's zoom from value.
|
|
1722
|
+
* @returns Promise<number>
|
|
1723
|
+
*/
|
|
1724
|
+
public async getModel3DZoomFrom(): Promise<number> {
|
|
1725
|
+
return DisplayRule.getModel3DZoomFrom(this.id).catch((err: Error) => {
|
|
1726
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Set the 3D model's zoom from value.
|
|
1732
|
+
* @param zoomFrom number
|
|
1733
|
+
* @returns Promise<void>
|
|
1734
|
+
*/
|
|
1735
|
+
public async setModel3DZoomFrom(zoomFrom: number): Promise<void> {
|
|
1736
|
+
if (zoomFrom == null) {
|
|
1737
|
+
zoomFrom = -1;
|
|
1738
|
+
}
|
|
1739
|
+
return DisplayRule.setModel3DZoomFrom(this.id, zoomFrom).catch((err: Error) => {
|
|
1740
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1741
|
+
});
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Get the 3D model's zoom to value.
|
|
1746
|
+
* @returns Promise<number>
|
|
1747
|
+
*/
|
|
1748
|
+
public async getModel3DZoomTo(): Promise<number> {
|
|
1749
|
+
return DisplayRule.getModel3DZoomTo(this.id).catch((err: Error) => {
|
|
1750
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Set the 3D model's zoom to value.
|
|
1756
|
+
* @param zoomTo number
|
|
1757
|
+
* @returns Promise<void>
|
|
1758
|
+
*/
|
|
1759
|
+
public async setModel3DZoomTo(zoomTo: number): Promise<void> {
|
|
1760
|
+
if (zoomTo == null) {
|
|
1761
|
+
zoomTo = -1;
|
|
1762
|
+
}
|
|
1763
|
+
return DisplayRule.setModel3DZoomTo(this.id, zoomTo).catch((err: Error) => {
|
|
1764
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1765
|
+
});
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* Get the 3D model's visibility.
|
|
1770
|
+
* @returns Promise<boolean>
|
|
1771
|
+
*/
|
|
1772
|
+
public async isModel3DVisible(): Promise<boolean> {
|
|
1773
|
+
return DisplayRule.isModel3DVisible(this.id).catch((err: Error) => {
|
|
1774
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
/**
|
|
1779
|
+
* Set the 3D model's visibility.
|
|
1780
|
+
* @param visible boolean
|
|
1781
|
+
* @returns Promise<void>
|
|
1782
|
+
*/
|
|
1783
|
+
public async setModel3DVisible(visible: boolean): Promise<void> {
|
|
1784
|
+
return DisplayRule.setModel3DVisible(this.id, JSON.stringify(visible)).catch((err: Error) => {
|
|
1785
|
+
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1582
1789
|
/**
|
|
1583
1790
|
* Resets the display rule to its default state.
|
|
1584
1791
|
*
|