Commit 230e181e authored by xinzhedeai's avatar xinzhedeai

add:label 贴地处理、description 自带弹窗提示窗

parent d7c4d6e8
...@@ -79,12 +79,12 @@ export default { ...@@ -79,12 +79,12 @@ export default {
let lat = Number(item.lat); let lat = Number(item.lat);
let height = Number(item.height); let height = Number(item.height);
let position = Cesium.Cartesian3.fromDegrees(lng, lat, height); let position = Cesium.Cartesian3.fromDegrees(lng, lat, height);
console.log(item.name, position); console.log(item.perName, position);
// 创建人员标记 // 创建人员标记
let entity = this.viewer.entities.add({ let entity = this.viewer.entities.add({
position: position, position: position,
label: { label: {
text: "高区管委", text: item.perName,
font: "16px", font: "16px",
backgroundColor: Cesium.Color.fromCssColorString("#173349"), backgroundColor: Cesium.Color.fromCssColorString("#173349"),
showBackground: true, showBackground: true,
...@@ -106,22 +106,22 @@ export default { ...@@ -106,22 +106,22 @@ export default {
// fillColor: Cesium.Color.WHITE, // fillColor: Cesium.Color.WHITE,
// backgroundColor: new Cesium.Color(0.0, 0.486, 0.65, 0.8), // backgroundColor: new Cesium.Color(0.0, 0.486, 0.65, 0.8),
// disableDepthTestDistance: 5, // disableDepthTestDistance: 5,
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
}, },
// billboard: { billboard: {
// image: "/static/images/poi-marker-default.png", image: "/static/images/poi-marker-default.png",
// scale: 0.5, scale: 0.5,
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
// disableDepthTestDistance: 5, disableDepthTestDistance: 5,
// distanceDisplayCondition: new Cesium.DistanceDisplayCondition( distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
// 1.0, 1.0,
// 8000.0 8000.0
// ), ),
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER, horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM, verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// }, },
// description: `<div><h4>${item.name}</h4></div>`, description: `<div><h4>${item.perName}${item.status}</h4></div>`,
// fixedFrame: Cesium.Transforms.eastNorthUpToFixedFrame(position), fixedFrame: Cesium.Transforms.eastNorthUpToFixedFrame(position),
}); });
// entity.info = item; // 添加 info 属性 // entity.info = item; // 添加 info 属性
// // entity.batch = currentBatch; // 标记当前批次 // // entity.batch = currentBatch; // 标记当前批次
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment