Opened 12 years ago

Last modified 12 years ago

#4104 new defect

Polygon with no fill legend

Reported by: zanollim Owned by: tbonfort
Priority: normal Milestone:
Component: Renderer API Version: 6.0
Severity: normal Keywords:
Cc: sdlime

Description

I have a simple polygon layer with no fill color/pattern, defined as follows:

[...]
TYPE POLYGON
STYLE
  WIDTH 5
  OUTLINECOLOR 0 0 0
END
[...]

If I request the legend through cgi mode=legendicon, the returned image is a line legend icon (see line_legend.png). Why not a polygon legend icon (see polygon_legend.png)? I think that if the layer is TYPE POLYGON, the associated legend has to be a polygon legend.

Attachments (2)

line_legend.png (1.7 KB ) - added by zanollim 12 years ago.
polygon_legend.png (221 bytes ) - added by zanollim 12 years ago.

Download all attachments as: .zip

Change History (4)

by zanollim, 12 years ago

Attachment: line_legend.png added

by zanollim, 12 years ago

Attachment: polygon_legend.png added

comment:1 by tbonfort, 12 years ago

Cc: sdlime added
Component: AGGRenderer API

This behavior was added in r2172. Steve, do you remember what the use-case was for this, do we want to keep it ?

comment:2 by sdlime, 12 years ago

Man, that was a long time ago. My use case was probably public land survey data (townships and sections) which are always polygon data but always rendered as line work. In that context the line legend icon makes more sense. It's still a relevant use case since you want polygon labeling but line rendering so you have to use TYPE POLYGON. I'd argue that the line legend representation is more appropriate in many cases.

Still I can see why we'd want to support both. I've thought it might be nice to support a legendshape in addition to the legendicon. The shape could be given in pecentages 0,0 is UL and 100,100 is LR. That way a user could override the default legend icon shape. Just an idea.

Steve

Note: See TracTickets for help on using tickets.