Opened 16 years ago

Closed 15 years ago

#2383 closed enhancement (fixed)

enhance label wrapping functionality

Reported by: tbonfort Owned by: jmckenna
Priority: normal Milestone: 5.4 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc: sdlime, jmckenna, dmorissette

Description

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)

comment:1 by tbonfort, 16 years ago

Cc: sdlime added

comment:2 by jmckenna, 16 years ago

Cc: jmckenna added

comment:3 by dmorissette, 16 years ago

Cc: dmorissette added

comment:4 by tbonfort, 16 years ago

Milestone: 5.2 release5.4 release

comment:5 by tbonfort, 16 years ago

Component: MapServer C LibraryMapScript-PHP

committed in r7928

passing on to php-mapscript for labelObj getters and setters: ALIGN, MAXLENGTH and MINLENGTH (the latter currently unused)

comment:6 by tbonfort, 16 years ago

Owner: changed from tbonfort to aboudreault

comment:7 by aboudreault, 16 years ago

Owner: changed from aboudreault to tbonfort

Changes in php-mapscript committed in r7930

comment:8 by tbonfort, 15 years ago

Component: MapScript-PHPMapServer Documentation

off to documentation

see http://mapserver.gis.umn.edu/development/rfc/ms-rfc-40/ for the details

comment:9 by dmorissette, 15 years ago

Owner: changed from tbonfort to jmckenna

comment:10 by tbonfort, 15 years ago

Resolution: fixed
Status: newclosed

doc updated

Note: See TracTickets for help on using tickets.