南昌市物联网技防平台-前端
liuyg
2021-04-29 423c2f02ec5284966c69e6266903b9c1c530e72e
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
@@ -75,13 +75,17 @@
      this.singleFlareTooltipProperty = options.singleFlareTooltipProperty || null;
      var defaultTextSymbol = new TextSymbol()//聚合字体
        .setColor(new Color([255, 255, 255]))
        .setAlign(Font.ALIGN_START)
        // .setAlign(Font.ALIGN_START)//被否决
        .setOffset(+100, +10)//偏量
        // .setHaloSize(1)
        .setFont(new Font("15pt").setWeight(Font.WEIGHT_BOLD).setFamily("calibri"))
        .setSize("30")
        // .setOffsetY(-30)
        .setHorizontalAlignment("middle")
        .setVerticalAlignment("middle");
      defaultTextSymbol.font.size = 30;
      defaultTextSymbol.yoffset=100;
      // defaultTextSymbol.line.algin = 30;
      console.log(defaultTextSymbol,2123445453)
      // defaultTextSymbol.font.size = 30;
      // defaultTextSymbol.yoffset = 10;
      // console.log(defaultTextSymbol,2123445453)
      this.textSymbol = options.textSymbol || defaultTextSymbol;
      this.flareShowMode = options.flareShowMode || "mouse";
@@ -732,6 +736,7 @@
    _graphicDraw: function (e) {
      var g = e.graphic;
      if (g.attributes.isCluster) {
        //create the cluster graphics if this is a cluster being drawn
        var cl = this._getClusterFromGraphic(g);
@@ -744,7 +749,7 @@
        sh.moveToBack();
      }
      return this.inherited(arguments);
    },
@@ -769,7 +774,8 @@
      }
    },
    _graphicMouseOut: function (e) {
    _graphicMouseOut: function (e) {//鼠标进入图片事件
      if (e.graphic.attributes.isFlare) {
        this._hideFlareDetail();
      }
@@ -855,6 +861,7 @@
      //此函数当前仅适用于不使用预聚集数据的情况
      //this function currently only applies if not using preclustered data
      // console.log('改变111111111111111')
      if (this.preClustered) {
        return;
      }
@@ -949,7 +956,6 @@
          this._createCluster(this.gridClusters[i]);
        }
      }
    },
    _createClusterGrid: function (webExtent) {
@@ -999,7 +1005,6 @@
      this.singles.push(single);
      delete single.graphic;
      var symbol;
      console.log();
      if(single.tenant_id == undefined){//如果不是业主
        if (single.state != '') {
          symbol = new esri.symbol.PictureMarkerSymbol("./images/by-jingbao.png", 40, 40);
@@ -1241,7 +1246,7 @@
      var conCircleRadius = (center.x - (bbox.x - radius - buffer)) + radius; //get the radius of the circle to contain everything
      var containerCircle = groupShape.createCircle({
        cx: center.x,
        cy: center.y,
        cy: +center.y + 3,
        r: conCircleRadius
      })
        //.setStroke({ width: 1, color: "000" })
@@ -1551,7 +1556,7 @@
        })
          .setFill("#000")
          .setFont({
            size: 8,//聚合字体大小
            size: 8,//聚合字体大小//没效果
            family: this.textSymbol.font.family,
            weight: this.textSymbol.font.weight
          });