| | |
| | | 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"; |
| | | |
| | |
| | | |
| | | _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); |
| | |
| | | sh.moveToBack(); |
| | | } |
| | | |
| | | |
| | | |
| | | return this.inherited(arguments); |
| | | }, |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | _graphicMouseOut: function (e) { |
| | | _graphicMouseOut: function (e) {//鼠标进入图片事件 |
| | | |
| | | if (e.graphic.attributes.isFlare) { |
| | | this._hideFlareDetail(); |
| | | } |
| | |
| | | //此函数当前仅适用于不使用预聚集数据的情况 |
| | | //this function currently only applies if not using preclustered data |
| | | // console.log('改变111111111111111') |
| | | |
| | | if (this.preClustered) { |
| | | return; |
| | | } |
| | |
| | | this._createCluster(this.gridClusters[i]); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | _createClusterGrid: function (webExtent) { |
| | |
| | | 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); |
| | |
| | | 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" }) |
| | |
| | | }) |
| | | .setFill("#000") |
| | | .setFont({ |
| | | size: 8,//聚合字体大小 |
| | | size: 8,//聚合字体大小//没效果 |
| | | family: this.textSymbol.font.family, |
| | | weight: this.textSymbol.font.weight |
| | | }); |