Opened 15 years ago

Closed 15 years ago

#2867 closed defect (fixed)

Centring Labels Correctly Where the Label is Longer than the Street

Reported by: nnikolov Owned by: aboudreault
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: 5.2
Severity: normal Keywords: Centring Labels
Cc: aboudreault

Description

There is a bug in Mapserver that causes the label path to be extrapolated wrongly and thus the label to be drawn in the wrong place. This bug causes the incorrect placement of a “follow” label, when the label is longer than the section of the street in which the label is to be placed. The problem is the incorrect calculation of ‘t’ in the case that the label is longer than the line, i.e. if(text_start_length < 0.0). The fix is in file mapprimitive.c in function msPolylineLabelPath().

See the attached file for more detail and the code fix.

Attachments (1)

CentringLabelsCorrectlyWhereLabelLongerThanStreet.doc (29.5 KB ) - added by nnikolov 15 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by sdlime, 15 years ago

Cc: aboudreault added
Milestone: 5.6 release

Alan, might be a good one for you to take since you've been in that code somewhat recently...

Steve

comment:2 by aboudreault, 15 years ago

Owner: changed from sdlime to aboudreault
Status: newassigned

comment:3 by aboudreault, 15 years ago

Resolution: fixed
Status: assignedclosed

I successfully reproduced the bug and the patch is working properly.

Thanks for the patch nnikolov!

Fixed and committed in r9512.

Note: See TracTickets for help on using tickets.