Opened 16 years ago
Closed 22 months ago
#772 closed defect (fixed)
Multiline text displays within a region as left justification only
Reported by: | zspitzer | Owned by: | jng |
---|---|---|---|
Priority: | medium | Milestone: | 4.0 |
Component: | Rendering Service | Version: | 2.4.0 |
Severity: | minor | Keywords: | |
Cc: | waltweltonlair | External ID: |
Description
Is there any way to set it to default to Centre Justification, this would seem more logical in a region area. In the XML it does seem to be set as ‘CENTRE’.
Attachments (2)
Change History (13)
by , 16 years ago
Attachment: | sample_layer.xml added |
---|
by , 16 years ago
Attachment: | mapguide label justification problem.png added |
---|
comment:1 by , 16 years ago
Cc: | added |
---|
comment:3 by , 15 years ago
For multi-line text there are two types of horizontal alignment. To see this draw a rectangle that fully encompasses the text vertically, and has width equal to the widest line.
- The horizontal and vertical alignment label settings control how the overall rectangle is positioned relative to the computed label position. For example, if the horizontal alignment is left and the vertical alignment is top, then the top-left corner of the rectangle will be positioned at the computed label position.
- Within the rectangle there's the text justification which controls how the different lines of text align relative to each other. Left justification - all text is against the left edge of the rectangle, right justification - the end of each line of text is against the right edge of the rectangle, etc.
The default horizontal and vertical alignments are set to Center and Halfline, but the justification is set to left. What you're asking for is center justification.
For the legacy stylization there's unfortunately no schema setting for justification, so you can't modify your layer to get the effect you want. Note that the enhanced stylization schema does have it.
The good news is that the stylization code already supports the different justifications. It's just a matter of changing the label generation code to specify center justification.
comment:4 by , 15 years ago
Are we safe making this change in the code? It would affect all multi-line labels for polygon features.
comment:5 by , 13 years ago
Version: | 2.0.2 → 2.4.0 |
---|
comment:6 by , 12 years ago
Milestone: | → 2.4 |
---|
comment:7 by , 12 years ago
Milestone: | 2.4 → 2.5 |
---|
comment:8 by , 12 years ago
Milestone: | 2.5 → 2.6 |
---|
Walt, do you know what might be going on here and who to ask about it?