A Bug? Halo Blurry and Weird Behavior Around Text when using Text Class/Label Class

533
0
11-06-2017 08:44 AM
IanPeebles
Occasional Contributor III

Good morning.  I recently uncovered what appears to be a bug when attempting to label a feature layer and using a halo around the label.  The behavior is different in all three browsers.  First, here is my code used for producing the halo:

Classes:

  "esri/symbols/TextSymbol",
  "esri/renderers/SimpleRenderer",
  "esri/layers/LabelClass",
  "esri/Color",

and

function(

  TextSymbol,
  SimpleRenderer,
  LabelClass,
  Color,

)

Code for Defining Text and the Halo:

  // Create Renderer for Gracelawn Cemetery Spaces Layer to Override Default Symbology
  var glSpacesColor = new Color([0,0,0]); // Set Text Color to Black
 
  // Create a Text Symbol to Define the Style of the Labels
  var glSpacesLabels = new TextSymbol().setColor(glSpacesColor);
  glSpacesLabels.font.setSize("8pt");
  glSpacesLabels.font.setFamily("arial");
  glSpacesLabels.setHaloSize("2");
  glSpacesLabels.setHaloColor([255,255,255]);
 
  // Label Expression from JSON
  var glSpacesJSON = {
     "labelExpressionInfo": {"value": "{SPACE_}"}
  };
 
  var glSpacesLabelClass = new LabelClass(glSpacesJSON);
  glSpacesLabelClass.symbol = glSpacesLabels;
  gracelawnFL.setLabelingInfo([glSpacesLabelClass]);

The Output:

(see attachment)

You will notice that there are 3 different results with the halo:

0 Kudos
0 Replies