Get the symbol renderer information for a dynamic layer

Discussion created by rikke on Feb 9, 2011
Latest reply on Apr 12, 2011 by rikke
Hi there,

This seems like a simple question, but has me stumped! I would like to get a handle to the symbol renderer information for a layer published in a JSAPI application. Exactly what I want to do is shown when viewing a layer in the ArcGIS Services Directory - for point layers, it shows a bitmap of the symbol (marker symbols), for lines and polygons e.g.:

Simple Renderer:
Simple Fill Symbol:
Style: esriSFSSolid, Color: [Undefined]
Simple Line Symbol:
Style: esriSLSSolid, Color: [230, 0, 0, 255], Width: 3

I can see that information is stored as a Renderer object but that is as far as I can tell (a) only exposed to Feature Layers and (b) not seem to have a "get" function of any description.

I need this information to help construct a custom TOC/Legend tool that shows all the information above along with a checkbox for visibility (and an opacity button in future).

Any help would be great!