gis-cesium-helper 4.1.2 → 4.1.3
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.
|
@@ -16,6 +16,10 @@ class BaseGraphic {
|
|
|
16
16
|
}
|
|
17
17
|
removeHook(e) {
|
|
18
18
|
}
|
|
19
|
+
setStyle(style) {
|
|
20
|
+
}
|
|
21
|
+
setVisible(visible) {
|
|
22
|
+
}
|
|
19
23
|
initializeOptions(options) {
|
|
20
24
|
const defaultOptions = {
|
|
21
25
|
id: Util.guid()
|
|
@@ -1081,7 +1085,7 @@ const _RadarCircle = class _RadarCircle extends BaseGraphic {
|
|
|
1081
1085
|
color: this.options.axis.color,
|
|
1082
1086
|
depthFail: true
|
|
1083
1087
|
},
|
|
1084
|
-
show: !!this.options.axis
|
|
1088
|
+
show: !!this.options.axis.show
|
|
1085
1089
|
});
|
|
1086
1090
|
this.axisEntity[1] = new gis3d.graphic.PolylineEntity({
|
|
1087
1091
|
positions: [Cesium.Cartesian3.fromDegrees(this.position[0], south[1]), Cesium.Cartesian3.fromDegrees(this.position[0], north[1])],
|
|
@@ -1089,13 +1093,14 @@ const _RadarCircle = class _RadarCircle extends BaseGraphic {
|
|
|
1089
1093
|
color: this.options.axis.color,
|
|
1090
1094
|
depthFail: true
|
|
1091
1095
|
},
|
|
1092
|
-
show: !!this.options.axis
|
|
1096
|
+
show: !!this.options.axis.show
|
|
1093
1097
|
});
|
|
1094
1098
|
this._layer._instance.addGraphic(this.axisEntity[0]);
|
|
1095
1099
|
this._layer._instance.addGraphic(this.axisEntity[1]);
|
|
1096
1100
|
}
|
|
1097
1101
|
initializeScale() {
|
|
1098
1102
|
this.scaleCircleEntity.forEach((entity) => entity.remove());
|
|
1103
|
+
this.labelCircleEntity.forEach((entity) => entity.remove());
|
|
1099
1104
|
for (let i = 1, l = this.options.scale.splitNum; i <= l; i++) {
|
|
1100
1105
|
const radius = this.options.radius * i / l;
|
|
1101
1106
|
if (radius) {
|
|
@@ -1107,7 +1112,7 @@ const _RadarCircle = class _RadarCircle extends BaseGraphic {
|
|
|
1107
1112
|
outline: true,
|
|
1108
1113
|
outlineColor: this.options.scale.lineColor
|
|
1109
1114
|
},
|
|
1110
|
-
show: !!this.options.scale
|
|
1115
|
+
show: !!this.options.scale.show
|
|
1111
1116
|
});
|
|
1112
1117
|
this._layer._instance.addGraphic(this.scaleCircleEntity[i - 1]);
|
|
1113
1118
|
const east = this.scaleCircleEntity[i - 1].outlineCoordinates.max((d) => d[0]);
|
|
@@ -1125,7 +1130,7 @@ const _RadarCircle = class _RadarCircle extends BaseGraphic {
|
|
|
1125
1130
|
distanceDisplayCondition_near: this.options.scale.minDistance,
|
|
1126
1131
|
distanceDisplayCondition_far: this.options.scale.maxDistance
|
|
1127
1132
|
},
|
|
1128
|
-
show: !!this.options.scale
|
|
1133
|
+
show: !!this.options.scale.show
|
|
1129
1134
|
});
|
|
1130
1135
|
this._layer._instance.addGraphic(this.labelCircleEntity[i - 1]);
|
|
1131
1136
|
}
|
|
@@ -1236,12 +1241,13 @@ const _RadarCircle = class _RadarCircle extends BaseGraphic {
|
|
|
1236
1241
|
setStyle(style = {}) {
|
|
1237
1242
|
ObjectUtil.deepAssign(this.options, style);
|
|
1238
1243
|
this.circleEntity.setStyle(this.getCircleStyle());
|
|
1239
|
-
this.axisEntity.forEach(
|
|
1240
|
-
|
|
1244
|
+
this.axisEntity.forEach((entity) => {
|
|
1245
|
+
entity.setStyle({
|
|
1241
1246
|
color: this.options.axis.color,
|
|
1242
1247
|
depthFail: true
|
|
1243
|
-
})
|
|
1244
|
-
|
|
1248
|
+
});
|
|
1249
|
+
entity.show = !!this.options.axis.show;
|
|
1250
|
+
});
|
|
1245
1251
|
this.initializeScale();
|
|
1246
1252
|
this.initializeMaterial();
|
|
1247
1253
|
}
|
|
@@ -1258,15 +1264,17 @@ __publicField(_RadarCircle, "DEFAULT_OPTIONS", {
|
|
|
1258
1264
|
color: "#fff",
|
|
1259
1265
|
diffHeight: 0,
|
|
1260
1266
|
axis: {
|
|
1267
|
+
show: false,
|
|
1261
1268
|
color: "#000"
|
|
1262
1269
|
},
|
|
1263
1270
|
scale: {
|
|
1271
|
+
show: false,
|
|
1264
1272
|
splitNum: 5,
|
|
1265
1273
|
lineColor: "#000",
|
|
1266
1274
|
labelColor: "#000"
|
|
1267
1275
|
},
|
|
1268
1276
|
material: {
|
|
1269
|
-
show:
|
|
1277
|
+
show: false,
|
|
1270
1278
|
type: 0,
|
|
1271
1279
|
color: "#0ff",
|
|
1272
1280
|
speed: 10,
|