[mapserver-users] Legend graphic output: Nested.

Basques, Bob (CI-StPaul) bob.basques at ci.stpaul.mn.us
Fri Dec 15 07:34:43 PST 2017


Steve,

I think I’m going to need to experiment with dynamic calls in some manner.

I have the sub-list items all coming out now, but the legend is already pretty big:

[http://gis.ci.stpaul.mn.us/datasets/UTILITIES_COMM/SEWERS/storm.map?FORMAT=image/png&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&_OLSALT=0.44218986502012125&SCALE=821.740340641835&WIDTH=250&STYLE=&LAYER=all]

Adding in a color coding for separation to the above will be too much for most browser maps.  So I’m thinking about setting up a method for defining each ownership layer based on a CGI filter.  Seems the easiest to make work.  There are 7 or 8 ownership classifications that would need to be hardcoded.  And if I can set it up to work with multiple filter items in the legend, then I still have the option for generating the really long legend if needed simply by stringing the filter items onto a single call.  Not sure how that’s going to work exactly, or if it can.

bobb



On Dec 15, 2017, at 8:04 AM, Lime, Steve D (MNIT) <steve.lime at state.mn.us<mailto:steve.lime at state.mn.us>> wrote:

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



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



The third-rate mind is only happy when it is thinking with the majority. The second-rate mind is only happy when it is thinking with the minority. The first-rate mind is only happy when it is thinking.
—A. A. Milne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20171215/3b0119fe/attachment.html>


More information about the mapserver-users mailing list