[Mapserver-users] Create a legend using PHPMapscript

Frank Broniewski Frank.Broniewski at mnha.etat.lu
Wed May 26 09:24:30 EDT 2004


Dear List

I'm still a beginner with MapServer, so I have trouble understanding the
process of creating a legend using php-mapscript. Maybe a reader may
send me on the right path.

I've done so far this tutorial
   http://mapserver.gis.umn.edu/doc/phpmapscript-byexample-howto.html
And the tutorials found here
   http://terrasip.gis.umn.edu/projects/tutorial/
Which provide quite some background

But when it comes to creating the legend dynamically, I can't seem to
find any helpful source. And I must admit, that I'm not capable of
understanding the information provided here:
   http://mapserver.gis.umn.edu/doc/phpmapscript-class-guide.html#legend

As far as I understand inherits the legend object from the mapobject. So
I thought it might be a good idea to create the legend in the same
manner as the scalebar, which I could figure out myself :-)
To provide a little more information on my work, here is the code I
used:
  $legend = $map->legend();
  $legend_url = $legend->saveWebImage();
Am I missing vital parameters or something else? I'm currently
displaying one shapefile only in my map.

Thanks a lot in advance of your help and kind greetings from Luxembourg

                                                      
Frank Broniewski
Musée National d'Histoire et d'Art
Section Préhistoire / Projet EPC
    Tél: +352 260 281-21
241, Rue de Luxembourg
L-8077 Bertrange





More information about the mapserver-users mailing list