How can labels be stacked? The data has multiple points stacked at the same point location. All of the labels from all of the points at one location need to be stacked in a list next to the "group" point.
3 Answers
between field values you can use
&vbnewline&
More solutions for arcmap 9.x
Labelstacker
Mapperz has some links in this answer Place overlapping
this answer may also show some helpful concepts. labeling by class
I recently built a complex label for multiple points (stacked on top or close proximity) using maplex.
It will take some time to layout but if you are interested I will post and edit this later.
- 17,412
- 2
- 42
- 68
I'm not sure about the script in the link, but vbnewline won't work here if I understand the question correctly. Yorkmapper is looking to stack labels from different points in a layer that happen to share the same coordinates, not stacking fields or text in a label from a single point feature. I don't know of a way to automate it in a nice list way w/o doing so manually, although again, maybe the linked script can do it. My apologies if I'm misunderstanding the question.
- 179
- 1
- 6
-
no apology necessary, OP hasn't mentioned the software we have all been assuming ESRI. many ways to inturpret stacked labels. – Brad Nesom Mar 03 '11 at 05:59
(Assuming you have access to ArcGIS) Bert Granberg over at the Utah GIS Portal put a pretty lengthy label expression together that looks to fit the bill.
Original post can be found here: Utah GIS Portal
Function FindLabel ( [Name] )
Dim strArray
Dim outStr
Dim x
Dim maxWordLength
Dim minLengthLength
Dim everyother
Dim isFirst
Dim lastWordLong
lastWordLong = false
maxWordLength = 10
minWordLength = 3
everyother = False
isFirst = True
strArray = Split( [Name], " ")
For x = 0 To UBound(strArray)
If ((Not isFirst) And (Len(strArray(x)) <= minWordLength)) Then
'keep short word on existing line
outStr = outStr & " " & strArray(x)
everyother = False
ElseIf (everyother) Then
'word x is slated to be second word on line
If (Len(strArray(x)) > maxWordLength) Then
outStr = outStr & vbNewLine & strArray(x)
everyother = False
Else
outStr = outStr & " " & strArray(x)
everyother = False
End If
Else
'word x is slated to be first word on line
If (isFirst) Then
outStr = strArray(x)
everyother = True
isFirst = False
Else
If (Len(strArray(x)) > maxWordLength) Then
lastWordLong = True
everyother = False
Else
lastWordLong = False
everyother = True
End If
outStr = outStr & vbNewLine & strArray(x)
End If
End If
Next
FindLabel = outStr
End Function
- 367
- 3
- 10
-
Just noticed that your post mentioned multiple points at a single location. The solution I've offered is appropriate for a large text string of a single feature to be parsed in code... – J Graham Mar 03 '11 at 05:37