Hello All,
I am trying to display the labels in the client side using LayerDrawingOptions . My actual requirement is to turn on/off labels in a layer . I believe it is only possible using Label class and LayerDrawingoptions . Below is my code but the label doesn't display. .
When I check the property . labelPlacement is always null . Can anybody tell me what am I missing . Thanks
var textSymbol = new esri.symbol.TextSymbol({
font: new esri.symbol.Font("18", esri.symbol.Font.STYLE_NORMAL, esri.symbol.Font.VARIANT_NORMAL, esri.symbol.Font.WEIGHT_BOLD, "Helvetica"),
color: new esri.Color("#666633")
});
var labelClass = new esri.layers.LabelClass({
labelExpression: "[SeriesID]",
labelPlacement: "above-along",
symbol:textSymbol
});
var layerDrawingOption = new esri.layers.LayerDrawingOptions({
labelingInfo: [labelClass],
showLabels: true,
transparency:50
});
dynamicLayer.setLayerDrawingOptions(layerDrawingOptions, true);