行政区划线加粗、中华民国改为中国台湾
This commit is contained in:
@@ -315,7 +315,8 @@ export class CesiumGlobe {
|
|||||||
const areaKm2 = isPoly ? sphericalAreaKm2(polys) : 0;
|
const areaKm2 = isPoly ? sphericalAreaKm2(polys) : 0;
|
||||||
|
|
||||||
// 国家名(优先中文),落在 NATURAL EARTH 提供的标注点上,字号按国土面积分级
|
// 国家名(优先中文),落在 NATURAL EARTH 提供的标注点上,字号按国土面积分级
|
||||||
const cname = props.NAME_ZH || props.NAME;
|
let cname = props.NAME_ZH || props.NAME;
|
||||||
|
if (cname === '中华民国') cname = '中国台湾';
|
||||||
if (cname && props.LABEL_X != null && props.LABEL_Y != null) {
|
if (cname && props.LABEL_X != null && props.LABEL_Y != null) {
|
||||||
const fontSize = areaKm2 > 5e6 ? 30 : areaKm2 > 1.5e6 ? 19 : areaKm2 > 3e5 ? 15 : 12;
|
const fontSize = areaKm2 > 5e6 ? 30 : areaKm2 > 1.5e6 ? 19 : areaKm2 > 3e5 ? 15 : 12;
|
||||||
this.viewer.entities.add({
|
this.viewer.entities.add({
|
||||||
@@ -341,7 +342,7 @@ export class CesiumGlobe {
|
|||||||
for (const [lng, lat] of ring) flat.push(lng, lat);
|
for (const [lng, lat] of ring) flat.push(lng, lat);
|
||||||
const positions = Cesium.Cartesian3.fromDegreesArray(flat);
|
const positions = Cesium.Cartesian3.fromDegreesArray(flat);
|
||||||
// 行政区划:一根黑线
|
// 行政区划:一根黑线
|
||||||
lines.push(new Cesium.GeometryInstance({ geometry: new Cesium.GroundPolylineGeometry({ positions, width: 2.0 }) }));
|
lines.push(new Cesium.GeometryInstance({ geometry: new Cesium.GroundPolylineGeometry({ positions, width: 2.6 }) }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user