AnsweredAssumed Answered

Textsymbol while adding to marker its takes long time to execute and show on map in arcgis 3.9

Question asked by vnrj1995 on Jun 9, 2017

Here is the below code which i am facing the for loop execute taking more than 10min for the textsymbol. Why I am getting this time to execute this much time i dont know. after execution only the markers is displayed on map. Near to marker associated lables will be displayed.

var labelArray=[];

var schTextSymbol = new TextSymbol();
schTextSymbol.setAlign(TextSymbol.ALIGN_MIDDLE);
schTextSymbol.setOffset(0, 13);
schTextSymbol.setText(parseInt(numb));
schTextSymbol.font.setSize("10pt");
schTextSymbol.font.setFamily("Courier");
count =0;
var graphic = new Graphic(new Point(parseFloat(stnX),
parseFloat(stnY), wgs),schTextSymbol);
var countyLayer = new GraphicsLayer();
countyLayer.add(graphicAnno);
countyLayer.setMaxScale(0);
countyLayer.setMinScale(288895.277144);
labelArray.push(countyLayer);

for ( var j = 0; j < labelArray.length; j++) {
map.addLayer(labelArray[j]);
}

Outcomes