|
@@ -169,7 +169,6 @@ export default {
|
|
|
ghdkmj: obj_kfbjmj_data.data[0].ghdkmj//已入库管控范围
|
|
|
|
|
|
});
|
|
|
- console.log(store.state.cockpit_gkzb, "sadas");
|
|
|
|
|
|
},
|
|
|
async gkzb() {
|
|
@@ -218,19 +217,20 @@ export default {
|
|
|
id: address,
|
|
|
name: name,
|
|
|
}
|
|
|
- // 选中状态
|
|
|
- pickObj.id.polygon._material.color = Cesium.Color.fromCssColorString(that.xzqh_color_click);
|
|
|
- pickObj.id.polygon.extrudedHeight = 850;
|
|
|
+ // pickObj.id.polygon._material.color = Cesium.Color.fromCssColorString(that.xzqh_color_click);
|
|
|
+ // pickObj.id.polygon.extrudedHeight = 850;
|
|
|
|
|
|
- // 恢复其他状态
|
|
|
viewer.entities.values.forEach((res) => {
|
|
|
+ // 恢复其他状态
|
|
|
|
|
|
if (res.properties.name._value != name) {
|
|
|
- // console.log(res.properties.name._value, "其他的");
|
|
|
- // console.log(res);
|
|
|
res.polygon._material.color = Cesium.Color.fromCssColorString(that.xzqh_color)
|
|
|
res.polygon.extrudedHeight = 450;
|
|
|
|
|
|
+ // 选中状态
|
|
|
+ } else {
|
|
|
+ res.polygon._material.color = Cesium.Color.fromCssColorString(that.xzqh_color_click)
|
|
|
+ res.polygon.extrudedHeight = 850;
|
|
|
}
|
|
|
})
|
|
|
that.params.id = address
|
|
@@ -297,53 +297,55 @@ export default {
|
|
|
|
|
|
const twoDArray = item[0];
|
|
|
const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
|
- viewer.entities.add({
|
|
|
- position: Cesium.Cartesian3.fromDegrees(obj.centroid[0], res.properties.centroid[1], 500),
|
|
|
- text: obj.name,
|
|
|
- label: {
|
|
|
- scale: 1.5,
|
|
|
- font: "bolder 16px sans-serif",
|
|
|
- style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
|
- text: res.properties.name,//图标名称
|
|
|
- fillColor: Cesium.Color.fromCssColorString("#ffffff"),
|
|
|
- pixelOffset: new Cesium.Cartesian2(5, -15),
|
|
|
- zIndex: 3,
|
|
|
- // 设置远近裁条件
|
|
|
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(20000, 9999999999.0),
|
|
|
- },
|
|
|
- billboard: {
|
|
|
- // 图像地址,URI或Canvas的属性
|
|
|
- image: "./static/images/overview/htq-f.png",
|
|
|
- height: 60,
|
|
|
- // 宽度(以像素为单位)
|
|
|
- width: 150,
|
|
|
- // 相对于坐标的垂直位置
|
|
|
- // verticalOrigin: Cesium.VerticalOrigin.CENTER,
|
|
|
- // // 相对于坐标的水平位置
|
|
|
- // horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
- scale: 1.0,
|
|
|
- zIndex: 2,
|
|
|
- // 设置远近裁条件
|
|
|
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(20000, 9999999999.0),
|
|
|
- show: true
|
|
|
- },
|
|
|
- properties: obj,
|
|
|
- polygon: {
|
|
|
- zIndex: 1,
|
|
|
- hierarchy: {
|
|
|
- positions: Cesium.Cartesian3.fromDegreesArray(oneDArray),
|
|
|
+ console.log(item, "item");
|
|
|
+
|
|
|
+ viewer.entities.add({
|
|
|
+ position: Cesium.Cartesian3.fromDegrees(obj.centroid[0], res.properties.centroid[1], 500),
|
|
|
+ text: obj.name,
|
|
|
+ label: {
|
|
|
+ scale: 1.5,
|
|
|
+ font: "bolder 16px sans-serif",
|
|
|
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
|
+ text: res.properties.name,//图标名称
|
|
|
+ fillColor: Cesium.Color.fromCssColorString("#ffffff"),
|
|
|
+ pixelOffset: new Cesium.Cartesian2(5, -15),
|
|
|
+ zIndex: 3,
|
|
|
+ // 设置远近裁条件
|
|
|
+ distanceDisplayCondition: new Cesium.DistanceDisplayCondition(20000, 9999999999.0),
|
|
|
},
|
|
|
- // outline: false,
|
|
|
- material: Cesium.Color.fromCssColorString(that.xzqh_color),
|
|
|
- height: 100,
|
|
|
- extrudedHeight: 450,
|
|
|
- outline: true,
|
|
|
- // outlineColor : Cesium.Color.BLACK
|
|
|
- outlineColor: Cesium.Color.fromCssColorString('#55A1E3'),
|
|
|
- // 设置远近裁条件
|
|
|
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(20000, 9999999999.0),
|
|
|
- }
|
|
|
- });
|
|
|
+ billboard: {
|
|
|
+ // 图像地址,URI或Canvas的属性
|
|
|
+ image: "./static/images/overview/htq-f.png",
|
|
|
+ height: 60,
|
|
|
+ // 宽度(以像素为单位)
|
|
|
+ width: 150,
|
|
|
+ // 相对于坐标的垂直位置
|
|
|
+ // verticalOrigin: Cesium.VerticalOrigin.CENTER,
|
|
|
+ // // 相对于坐标的水平位置
|
|
|
+ // horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
+ scale: 1.0,
|
|
|
+ zIndex: 2,
|
|
|
+ // 设置远近裁条件
|
|
|
+ distanceDisplayCondition: new Cesium.DistanceDisplayCondition(20000, 9999999999.0),
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ properties: obj,
|
|
|
+ polygon: {
|
|
|
+ zIndex: 1,
|
|
|
+ hierarchy: {
|
|
|
+ positions: Cesium.Cartesian3.fromDegreesArray(oneDArray),
|
|
|
+ },
|
|
|
+ // outline: false,
|
|
|
+ material: Cesium.Color.fromCssColorString(that.xzqh_color),
|
|
|
+ height: 100,
|
|
|
+ extrudedHeight: 450,
|
|
|
+ outline: true,
|
|
|
+ // outlineColor : Cesium.Color.BLACK
|
|
|
+ outlineColor: Cesium.Color.fromCssColorString('#55A1E3'),
|
|
|
+ // 设置远近裁条件
|
|
|
+ distanceDisplayCondition: new Cesium.DistanceDisplayCondition(20000, 9999999999.0),
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
})
|
|
|
|