Hello all,
I am hoping to get some clarification around properties and structures of items for this scenario:
I have a Web Map containing a Point Layer, with the symbology based on a field in that layer ("Stop_Number"). By default, the label in the Legend is just the value of the field that determines the symbology, i.e. Stop_Number - so in this case, stops are labeled things like 1, 2, 3, etc.
I want to programmatically change the labels in the Legend to pull values from another field, "Title". From what I have found so far, it should be possible to do this by modifying the renderer portion JSON layer definition using the Python API:
Does this approach seem correct? Do I have my properties and structures figured out correctly? If so, I would deeply appreciate any suggestions for the syntax of making the actual changes - currently my conceptual framework is to iterate through 'values' in the 'classes' of 'uniqueValueGroups' 'headings', then set the value for 'label' to be the dict value whose key corresponds the current 'values' value? How do I implement/save the changes to the JSON item once made?
Apologies for any unclear language used here - I am learning my way around the API and the JSON items. Thanks in advance for any suggestions!