[Mapserver-users] MapScript get one legend image of a classified layer

Chuanyun Fei cfei at geoarctic.com
Fri Feb 14 17:21:43 EST 2003


Hello,

I would like to use MapScript to retrieve one legend image of one 
classified layer. The following code can generate each class object's 
legend image:

for($i=0; $i < $layerObj->numclasses; $i++)
{
    $clsObj = $layerObj->getClass($i);
    $img = $clsObj->createLegendIcon(16, 16);
    $img->saveImage("", "MS_GIF", 0, 0, -1);
}

but I want one legend image for all the classes.

Any ideas or thoughts? Thanks in advance.

Chunayun





More information about the mapserver-users mailing list