Select to view content in your preferred language

Legend Layer Names

1355
0
12-17-2014 11:07 AM
PaulHoeffler
Deactivated User

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!

0 Kudos
0 Replies