Can mapserver draw only the legend?

Steve Lime Steve.Lime at DNR.STATE.MN.US
Mon Apr 10 18:24:20 PDT 2006


CGI MapServer has a mode=legend that will return just the legend image. Mapscript has something similar. The mapObj has a drawLegend method.

Steve

>>> "Sears, Jeremy" <Jeremy.Sears at CCRS.NRCAN.GC.CA> 04/06/06 3:34 PM >>>
Hi All,
Im wondering if its possible to have mapserver draw only a legend, not its
associated map...
Im looking at the mapscript documentation on maptools.org regarding the
LegendObj Class, it says:

"Instances of legendObj are always are always embedded inside the mapObj."

So Im starting with code like:

// draw ledgend ...
$legend = ms_newMapObj($mapfileloc);
..

And Id like to get to the point where I write:

$legend_image = $legend->draw();



But Im not sure how to specify to only draw a legend.. Is it possible?


Thanks
Jeremy



 



More information about the MapServer-users mailing list