AnsweredAssumed Answered

Textsymbol not printing at all

Question asked by Dean.Wilson7232 on Jul 3, 2019
Latest reply on Aug 20, 2019 by NSager-esristaff

I've seen a lot of the textsymbol questions in the forums here and have tried every one of them.  My issue is the textsymbol doesn't show up at all on the print.  It shows on the map as built.  Here's the code as to how I'm putting this together.  I also tried putting this layer together by itself (to take the fact there are multiple graphics layers out of the scenario) and still getting the same issues.  Here's my method:

 

_buildRatioViewerGraphics: function(ratioViewerData){
let features = [];
let textFeatures = [];

arrayUtils.forEach(ratioViewerData, lang.hitch(this, function(ratioFeature){
   let polySymbol = new SimpleFillSymbol(
      SimpleFillSymbol.STYLE_SOLID,
      new SimpleLineSymbol(
         SimpleLineSymbol.STYLE_SOLID,
         new Color(this._ratioColorPicker(ratioFeature.attributes.ratio)),
         0.4
      ),
      new Color(this._ratioColorPicker(ratioFeature.attributes.ratio))
   );
   let featureGraphic = new Graphic(ratioFeature);
   featureGraphic.setSymbol(polySymbol);
   features.push(featureGraphic);

   let textColor = new Color();
   textColor.setColor([0, 0, 0, 1]);

   let textFont = new Font();
   textFont.setSize("12pt");
   textFont.setWeight(Font.WEIGHT_BOLD);
   textFont.setFamily("Arial");

   let textSymbol = new TextSymbol()
      .setText(this._formatRoutingNumberLabel(ratioFeature.attributes.routingNumber))
      .setFont(textFont)
      .setColor(textColor)
      .setAlign(Font.ALIGN_MIDDLE)
      .setAngle(0)
      .setHaloColor(new Color([255, 255, 255, 0.3]))
      .setHaloSize(1);
      textSymbol.horizontalAlignment = "center";
      textSymbol.verticalAlignment = "center";
      let textFeatureGraphic = new Graphic(ratioFeature);
      textFeatureGraphic.setSymbol(textSymbol);
      textFeatures.push(textFeatureGraphic);
   }));

   this.featureLayer.applyEdits(features, null, null);
   this.textFeatureLayer.applyEdits(textFeatures, null, null);

return features;
}

Attachments

Outcomes