I'm creating a map with ArcGIS Desktop v10.2.2, showing museums as points. The museums layer has no symbol and the labels are made of a circle filled with color with the ID inside, taken from the [ID]
field.
I want to add the entire list of museums in the layout map legend, having a list of my symbols with their IDs and the description (their name) taken from the [LABEL]
field, without creating it manually.
I know that a possible manual solution would be to set the layer symbology to "Unique values", then add all values (more than 100!) and set once for each point the same label symbology. But I hope there's a better solution!
Take a look at my map below.
The layer is "Musei" (Museums) and as you can see on the legend on the left, it has no symbol. On the right you can see the descripted legend symbology, a Dark gray circle with Red text inside taken from the [ID]
field. I want to add to my layout a column containing all the circles with IDs and the corresponding label.
-- UPDATE --
This is the Field Calculator settings I used following the solution proposed by @FelixIP.
But the points are not positioned in vertical align as I expect. Instead they're moved a bit here and there. I also tried using different step values: 10, 100, 1000, 10000.
Answer
To get this:
I've used 2 dataframes:
STEPS:
a) Create a copy of your museums shapefile; b)Note xMean, yMax of the points and c) Run this field calculator expression multiple times changing step on Shape field until you happy with interval between vertical points
def vertical(fid, shp,xMean,yMax,step):
y=yMax-step*fid
pNew=arcpy.Point(xMean,y)
return pNew
Using
vertical( !FID!, !Shape!, 1563910,5177655,100)
It will create vertical chain of your points to be displayed and labelled in 2nd dataframe === legend
Update: average longitude of the points i used is 1563910, maximum longitude 5177655
No comments:
Post a Comment