enhance label wrapping functionality
Currently labels can be told to wrap on characters other than newlines by specifying a WRAP parameter in the LABEL block. I think this is mostly used when specifying a ' ' (space) character so that text wraps on breaks between words, but implies that 'every' such character is transformed to a newline.
proposed enhancement: provide the labelObj with a new keyword, for example MINWRAPLENGTH, which will tell mapserver to only replace the WRAP character with a newline if the current line length is over MINWRAPLENGTH. This approach is rather straightforward as it can be done in the same loop as the character replacing function.
A more complicated approach would be to provide a MAXLENGTH keyword to enforce that a label cannot be wider than a given number of characters, but the implementation would be a little bit trickier, as it implies going back into the text string when MAXLENGTH chars have been encountered.
Change History
(10)
Milestone: |
5.2 release → 5.4 release
|
Component: |
MapServer C Library → MapScript-PHP
|
Owner: |
changed from tbonfort to aboudreault
|
Owner: |
changed from aboudreault to tbonfort
|
Component: |
MapScript-PHP → MapServer Documentation
|
Owner: |
changed from tbonfort to jmckenna
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
committed in r7928
passing on to php-mapscript for labelObj getters and setters: ALIGN, MAXLENGTH and MINLENGTH (the latter currently unused)