AnsweredAssumed Answered

legend overflow

Question asked by silgib on Feb 24, 2015

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

Outcomes