Browse Source

试点区域整治区域上图

maxiaoxiao 7 months ago
parent
commit
6d9b67a1f5
2 changed files with 3 additions and 2 deletions
  1. 1 0
      src/utils/MapHelper/help.js
  2. 2 2
      src/views/LandConsolidation/components/sdgk.vue

+ 1 - 0
src/utils/MapHelper/help.js

@@ -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),

+ 2 - 2
src/views/LandConsolidation/components/sdgk.vue

@@ -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 };