SetLegendItemPosition()

Summary

Changes the order of items in a manual legend.

Syntax

SetLegendItemPosition(string map_name, integer old_position, integer new_position)

Argument Contents
map_name The name of the map
old_position The current ordinal position of the item
new_position The desired ordinal position of the item

Notes

  • Items in an automatic legend are shown in their map display order. To change the order of legend items, change their display order in the map.

Error Codes

Error Type Meaning
Error The positions were not within the range of available items or the legend is an automatic legend
NotFound The named map does not exist or has no legend

See Also

Function Summary
SetLegendSettings() Changes the settings for a map legend
AddLegendItem() Adds an item to a manual map legend
DropLegendItem() Drops an item from a manual legend