Browse Source

水下地形 水深点标注字号修改为自定义10

sbj 10 months ago
parent
commit
6f018ce11c
2 changed files with 15 additions and 0 deletions
  1. 1 0
      src/utils/map/ArcgisUtil.js
  2. 14 0
      src/utils/map/Layer.js

+ 1 - 0
src/utils/map/ArcgisUtil.js

@@ -443,6 +443,7 @@ export function addGraphic(datas){
             "data": datas.data,
             "attributes": datas.attributes,
             "symbol": datas.symbol,
+            "textSymbol": datas.textSymbol,
             "title": datas.title
         }
     };

+ 14 - 0
src/utils/map/Layer.js

@@ -727,6 +727,20 @@ function getDeepthPoints(data){
                         color: [255, 255, 255],
                         size: 5
                     },
+                    "textSymbol":{
+                        type: "text",
+                        color: "white", //[255, 255, 255]
+                        // haloColor: "black",
+                        // haloSize: "15px",
+                        // text: title,  // 用上面data传入的值填充
+                        xoffset: 0,
+                        yoffset: 0,
+                        font: {
+                            size: 10,
+                            //family: "Microsoft Yahei",
+                            weight: "bold"
+                        }
+                    },
                     "title": null
                 })
             }else{