AnsweredAssumed Answered

Layer name in Legend in Print.

Question asked by vpiscitelli on Nov 19, 2012
Latest reply on Nov 20, 2012 by vpiscitelli
I use the PrintService for ArcGIS 10.1. Using the default pre-installed templates.

On the client I create a feature layer using a feature collection.  Is there a know issue with this layer creation method and printing?

The graphics and basemap print perfectly, but I cannot get the name of the layer that I create via the feature collection to display in the legend of the print template.  I always get "polygonLayer" as the title.

I give both a name and description to the featurelayer:
boundaryLayer2 = new esri.layers.FeatureLayer(featureCollection, {                 id: "thematicGraphics",                 mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,                 name: "Starts By Dwelling Type",                 description: "Starts By Dwelling Type"             });

I also give a name to my layerDefinition:
        var layerDefinition = { name: "Starts By Dwelling Type", geometryType: "esriGeometryPolygon", fields: [{ name: "OBJECTID", type: "esriFieldTypeOID", alias: "OBJECTID" }, { name: uidField, type: "esriFieldTypeString", alias: uidField, length: 255 }, { name: "value", type: "esriFieldTypeDouble", alias: "Starts" }] };