Opened 14 years ago

Closed 14 years ago

#1607 closed defect (fixed)

Server renders composite type style correctly.

Reported by: Aleck Owned by: Aleck
Priority: medium Milestone: 2.3
Component: Rendering Service Version: 2.2.0
Severity: trivial Keywords: haspatch
Cc: External ID:

Description

This is an edge case that if a composite style contains only labels, it is not rendered correctly. All the labels are draws in the bottom-left corner.

This happens because when laying out the labels using eight-surrounding algorithm, it calls GetLastSymbolExtent to get the corresponding symbol extent as the base coordinate. However, in the case that this composite type style contains only labels, this LastSymbolExtent was never set. Thus, it'll use (0,0) as base coordinate of the algorithm while it should use the centroid of the geometry.

So I made this change that it'll check the returned value of GetLastSymbolExtent. if this value is zero, we'll use the centroid of the geometry instead.

Attachments (1)

label.patch (860 bytes ) - added by Aleck 14 years ago.
patch file

Download all attachments as: .zip

Change History (4)

by Aleck, 14 years ago

Attachment: label.patch added

patch file

comment:1 by Aleck, 14 years ago

Owner: changed from suna to Aleck

comment:2 by zspitzer, 14 years ago

Keywords: haspatch added

comment:3 by jbirch, 14 years ago

Resolution: fixed
Status: newclosed

This appears to have been applied to trunk at [5569]

Wonder if it's worth a back-port to 2.2 for 2.2.1 release?

Note: See TracTickets for help on using tickets.