@@ -85,6 +85,7 @@ export function loadGeoJSON(geom, yanse, adata, fun) {
);
entity.label = {
font: "bolder 18px sans-serif",
+ distanceDisplayCondition: new Cesium.DistanceDisplayCondition(100, adata.lab_max || 10000),
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
text: adata.name, //图标名称
fillColor: Cesium.Color.fromCssColorString(yanse),
@@ -219,11 +219,11 @@ export default {
{
isfly: false,
name: res.name,
- lab_height: res.type * 5,
+ lab_max: res.type ? 1000 : 100000,
},
(data) => {
geoSources[ri] = data;
- data.name = res.type = 0 ? "sdqy" : "zzqy";
+ data.name = res.type == 0 ? "sdqy" : "zzqy";
// data.show = false;
// data.entities.values.forEach((entity) => {
// entity.properties = { type: "图斑上图", id: res.id };