Composite and Cartographic Line Symbols not returned in Renderer objects

2182
3
10-15-2010 12:00 PM
DanJensen
Occasional Contributor
When attempting to build symbols for a dynamic legend, the composite and cartographic line symbols are drawn incorrectly.  These are the dashed line symbols or the symbols with layers of lines combined to make a single symbol.   For example the standard railroad and county boundary symbols that are commonly  used.  When attempting to determine why, it is evident that the API only returns simple line symbols even though there are compositeSymbol and cartographicLineSymbol objects in the API. 

Is there a setting I can change or a solid work around for this issue?

Thanks,
-Dan
Tags (2)
0 Kudos
3 Replies
DasaPaddock
Esri Regular Contributor
Are you referring to the Symbol.createSwatch() method?
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/symbols/Symbol.html#createSwatch()
"Swatches only work with symbols which are supported in the FeatureService, i.e., swatches are not supported for CompositeSymbol, InfoSymbol and TextSymbol."

It should be working for CartographicLineSymbol. See:
http://forums.arcgis.com/threads/9074-Legend-for-CartographicLineSymbol?p=27861#post27861
0 Kudos
DanJensen
Occasional Contributor
All,

Yes, I am reffering to the createSwatch method.  Here are some pictures I think will more fully describe my issue.  The mxdSymbolProperties shows the properties of the symbol being accessed in Flash Builder 4.  This image indicates that the layer is symbolized with a cartographic dashed line.  The SimpleLineOnly image shows that the renderer object offers this to the programming environmnet as a simpleLineSymbol, which lacks the dashing necessary to correctly create a swatch for a legend.

I was wondering if I need to do something special to make the renderer offer a cartographicLineSymbol for me to create a swatch from?

Thanks,
-Dan
0 Kudos
DasaPaddock
Esri Regular Contributor
The ArcGIS REST API doesn't support returning Cartographic Line symbols. It does support simple line symbols with different dash styles though:
http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/symbol.html#sls

After you've republished your service and cleared the REST cache, you can check to see what the style is in the layer's service directory pager. e.g.,
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/MapServer/6 (style is esriSLSSolid)
0 Kudos