AnsweredAssumed Answered

Legend Layer Names

Question asked by gipaul on Dec 17, 2014

I'm using the print widget in the Basic Viewer and am trying to modify the print layout.

One of the big issues is getting the legend to display the styled name instead of the name from the layer source. I'm thinking it would be achieved by modifying this block of code:

if (legendNode.checked) {

                            var layers = arcgisUtils.getLegendLayers(this.config.response);

                            var legendLayers = array.map(layers, function (layer) {

                                return {

                                    "layerId": layer.layer.id

                                };

                            });

                            if (legendLayers.length > 0) {

                                layoutOptions.legendLayers = legendLayers;

                            }

                            array.forEach(print.templates, function (template) {

                                template.layoutOptions = layoutOptions;

                            });

                        }

but haven't had any success. I'd also like to insert a graphic and other text, but realize using the Export Web Map Task may be limiting.

Any direction would be appreciated, or if there's a more appropriate place to post this.

Thanks!

Outcomes