legend overflow

2746
0
02-24-2015 06:50 AM
SilvanaGiberti1
New Contributor

I need to create a print tool that can handle both short and very long legends (up to 300 entries). When the legend is long, I want to print (i.e. create a pdf file) the map plus few entries on one page, and the other entries on subsequent one or more pages. I started by creating two templates, one for the map plus the legend and the other one with just the legend, so that I can create two or more pdf files and then append the subsequent pages to the first one. In the python script, after creating a legend object, I can check if isOverflowing = True, but how can I split the legend onto one or more pages? I thought of printing a predefined number of entries on each page, and calling the ConvertWebMapToMapDocument with a different Web_Map_as_JSON parameter each time, that is, changing the subLayerIds list in legendOptions each time I call it. I haven't tried this yet, and I wonder if there is an easier way to do this.

Thanks,

Silvana

0 Kudos
0 Replies