地球词条标记改为黄色便签样式(黄底黑字)
This commit is contained in:
@@ -56,7 +56,10 @@ function makeRoundedBg(text, fontSize) {
|
||||
ctx.arcTo(0, h, 0, 0, radius);
|
||||
ctx.arcTo(0, 0, w, 0, radius);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = 'rgba(20, 16, 13, 0.88)';
|
||||
ctx.shadowColor = 'rgba(0, 0, 0, 0.22)';
|
||||
ctx.shadowBlur = 6;
|
||||
ctx.shadowOffsetY = 2;
|
||||
ctx.fillStyle = '#FFEB3B';
|
||||
ctx.fill();
|
||||
return { canvas: c, textW };
|
||||
}
|
||||
@@ -187,10 +190,8 @@ export class CesiumGlobe {
|
||||
label: {
|
||||
text: entry.name,
|
||||
font: '19px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif',
|
||||
fillColor: gold,
|
||||
outlineColor: ink,
|
||||
outlineWidth: 3,
|
||||
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
||||
fillColor: ink,
|
||||
style: Cesium.LabelStyle.FILL,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: Cesium.VerticalOrigin.CENTER,
|
||||
pixelOffset: new Cesium.Cartesian2(10, 0),
|
||||
@@ -214,7 +215,7 @@ export class CesiumGlobe {
|
||||
pixelOffset: new Cesium.Cartesian2(10 + bg.textW / 2, 0),
|
||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||
show: false,
|
||||
show: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -383,7 +384,6 @@ export class CesiumGlobe {
|
||||
this.markers.forEach(({ entity, bg, index: i }) => {
|
||||
const on = i === index;
|
||||
entity.point.outlineWidth = on ? 3 : 1; // 选中加粗黑圈,不放大
|
||||
if (bg) bg.show = on;
|
||||
});
|
||||
this.viewer.scene.requestRender();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user