国家/城市字号再调大;城市最大距离增至2.5e6

This commit is contained in:
2026-09-19 17:32:07 +08:00
parent 52b09f5049
commit d0732a9ac3
+4 -4
View File
@@ -555,7 +555,7 @@ export class CesiumGlobe {
let cname = props.NAME_ZH || props.NAME;
if (cname === '中华民国') cname = '中国台湾';
if (cname && props.LABEL_X != null && props.LABEL_Y != null) {
const fontSize = areaKm2 > 5e6 ? 26 : areaKm2 > 1.5e6 ? 19 : areaKm2 > 3e5 ? 16 : 14;
const fontSize = areaKm2 > 5e6 ? 28 : areaKm2 > 1.5e6 ? 21 : areaKm2 > 3e5 ? 18 : 16;
countryLabels.add({
position: Cesium.Cartesian3.fromDegrees(props.LABEL_X, props.LABEL_Y),
text: cname,
@@ -607,8 +607,8 @@ export class CesiumGlobe {
const scene = this.viewer.scene;
const textGold = Cesium.Color.fromCssColorString('#e0c46a');
const black = Cesium.Color.fromCssColorString('#14100d');
const ddc = new Cesium.DistanceDisplayCondition(0, 2e6);
const tdc = new Cesium.NearFarScalar(1e6, 1.0, 2e6, 0.0);
const ddc = new Cesium.DistanceDisplayCondition(0, 2.5e6);
const tdc = new Cesium.NearFarScalar(1.25e6, 1.0, 2.5e6, 0.0);
let cities = [];
try {
@@ -638,7 +638,7 @@ export class CesiumGlobe {
labels.add({
position,
text: c.name,
font: 'bold 15px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif',
font: 'bold 17px "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif',
fillColor: textGold,
outlineColor: black,
outlineWidth: 2,