dynamically changing annotation font of map service

2160
0
02-20-2014 07:49 AM
eddiequinlan
Occasional Contributor
I now see that 10.1 allows you to change the default symbols on a given map service.  I've successfully done this for polygon layers in a map service.

Has anyone tried to do this for an annotation layer?  I've been trying a method of using LabelOptions, but I'm not sure if this is the best way, or if dynamically changing the annotation symbol is possible.

Here is the actionscript code i'm using to change the polygon outline color of my map service layer.

var newoptions:LayerDrawingOptions = new LayerDrawingOptions();
var newsym:SimpleFillSymbol = new SimpleFillSymbol;
var newline:SimpleLineSymbol = new SimpleLineSymbol;
var newrend:SimpleRenderer = new SimpleRenderer();
    
newline.color = 592460;
newline.width = 5;
    
newsym.outline = newline;
    
newrend.symbol = newsym;
    
newoptions.layerId = 13;
newoptions.renderer = newrend;
    
drawoptions.push(newoptions);
    
TaxMap.layerDrawingOptions = drawoptions;
TaxMap.refresh();

Sincerely,
Eddie Q.
Tags (2)
0 Kudos
0 Replies