[mapserver-users] Legend graphic output: Nested.
Lime, Steve D (MNIT)
steve.lime at state.mn.us
Fri Dec 15 06:04:57 PST 2017
You might be able to lay it out as a map (using a mapfile) with a bunch of inline features that you could assign symbols (could be calls to MapServer to get legend icons since a SYMBOL can be a URL) and labels.
The problem is that if this needs to be really dynamic (different layers show/hide) then I think you’d have to lay things out using other tools – MapScript, ImageMagik or something else along those line. MapScript could probably automate much of the layout as a map/mapfile programmatically.
--Steve
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul)
Sent: Thursday, December 14, 2017 10:00 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Legend graphic output: Nested.
Anbyone have any ideas on how to output a nested, or indented legend graphic (as a raster image?)?
Looking for something like this:
Storm
— Fitting (blue)
— Catchbasin (blue)
— Manhole (blue)
— Forcemain (blue)
— Storm Pipe (blue)
Storm, Private
— Fitting (lightblue)
— Catchbasin (lightblue)
— Manhole (lightblue)
— Forcemain (lightblue)
— Storm Pipe (lightblue)
Storm, Saint Paul
— Fitting (purple)
— Catchbasin (purple)
— Manhole (purple)
— Forcemain (purple)
— Storm Pipe (purple)
etc.
Each of the sub list items are a separate layer in the MAPFILE, and the Main headings, would be used to filter on. Do all 15 layers above need to be defined in order to get a line in the legend to appear. This is just an example BTW, I have many more main headings to contend with. I guess it comes down to, how do I grab the filter item and insert it into the Legend graphic, and probably along with the color assignment as well. Maybe I’m thinking about this backwards. I could pass in the color along with the main heading filter . . . but how to get a composite legend. Maybe it needs to be three (or more) different calls.
. . . .
A simpler description of the need, is to display a seamless Sewer network with color coded ownership, but using the same cartography for each sub-heading. Hmm, maybe an INCLUDE . . .
It feels like a Monday today for some reason . . . . :c)
bobb
We learn from history that we do not learn from history.
~ George Wilhelm Hegel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20171215/3ad07f76/attachment.htm>
More information about the MapServer-users
mailing list