The Create Legend wizard lets you save default settings that are unique to a map layer. The Create Legend wizard uses legend frame defaults for title, subtitle, and symbol, which are set as Legend Designer window preferences (on the PRO tab, click Options, and Legend Window). You can override these settings for a map layer in the Create Legend - Frame Properties screen where you have the option to specify unique attributes for title, subtitle, label style, and label values. You can save these unique attributes as metadata keys to the table, so that they become defaults for the map layer. The next time you create a legend that includes the map layer, its metadata keys are read and applied to the map layer's legend.
When there are no metadata keys in the underlying table, which can be different for each layer, then the legend frame defaults that are set as preferences for the Legend Designer window are used.
To save unique attribute settings to a table's metadata:
- Make the Map window active.
- From the MAP tab, select Add Legend and make your selections in each screen as described under Creating a Map Legend until you get to the step 3.
- In the Create Legend Frame Properties screen, select a map layer from the Legend Frames list and then apply settings for the map layer as described under Create Legend: Setting Frame Properties.
- Click the Save frame settings to Metadata button. This saves the attribute settings you made for the map layer to its table. Your settings become the new metadata defaults for the map layer's legend frame.
- Repeat Steps 3 and 4 for each map layer that you wish to save unique attributes for.
- Click Finish to create the legend in a Legend Designer window.
The legend frames for those map layers that you selected to apply unique attributes for display with those attributes. The next time you generate a legend with these map layers, their legend frames will display with the attributes saved as metadata. The following example shows the use of metadata keys.
The metadata keys are:
"\Legend" = ""
"\Legend\Title" = "a string value"
"\Legend\Subtitle" = "a string value"
"\Legend\Column" = "a column identifier"
For example:
"\Legend" = ""
"\Legend\Title" = "Legend"
"\Legend\Subtitle" = ""
"\Legend\Column" = "object"
"\Legend\StylesFrom" = "MapStyles"
"\Legend\Label" = "Ucase$(type)"
If there is no metadata for \legend\column, the default is:
Styles from = unique map styles (e.g., the object column)
If there is no metadata for \legend\label, the default in the is:
Label styles with = <Style Name>
The current value of Style Name from Create Legend Legend Default Properties is used to generate legend text, based upon legend preferences. If there is no metadata for \legend\title or \legend\subtitle, then the default will be based on the Title and Subtitle text defined in legend preferences.