Select to view content in your preferred language

Text Symbol underline and Linethrough

771
1
08-16-2012 06:34 AM
VIKRANTKRISHNA
Regular Contributor
Can someone tell me how to put text symbol on the map with Linethrough and underline style. I have been trying with this line of code and it doesn't work.

app.symbols.textSymbol = new esri.symbol.TextSymbol(text).setColor(new dojo.Color([128,0,0])).setDecoration('DECORATION_UNDERLINE').setAlign(esri.symbol.Font.ALIGN_START).setAngle(45).setFont(new esri.symbol.Font("12pt");

var labelPointGraphic = new esri.Graphic(labelPoints[0],app.symbols.textSymbol);     
app.map.graphics.add(labelPointGraphic);
0 Kudos
1 Reply
JohnGravois
Deactivated User
I took a look into this and the problem has been reported as [NIM045058: Javascript method setDecoration for TextSymbol Class is being ignored.]

It also looks like setting the property equal to a known constant using the technique below also has no effect.

textSymbol.decoration = "DECORATION_UNDERLINE";


Because decoration properties for text symbols are not supported in many browsers (IE 7, Firefox, Opera 9), I am not sure of the priority of this problem for the team.  If you would like to attach your name to the list of customers affected by the bug, please don't hesitate.

(note: my testing was conducted in Chrome and IE9)
0 Kudos