Legend alignment issue

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Thu Oct 21 12:22:16 PDT 2004


Well, it seems that you have to define a LEGEND object in the mapfile for this to work properly.  I was not defining LEGEND in my mapfile because I wasn't creating an application with a legend, just a WMS instance.

If I add a LEGEND object, this works as expected.

..Tom


> -----Original Message-----
> From: Kralidis,Tom [Burlington] 
> Sent: Thursday, 21 October, 2004 15:10
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Cc: 'Valik Solórzano Barboza'
> Subject: Legend alignment issue
> 
> 
> 
> Hi,
> 
> (This was originally thought to be a development bug, but, 
> after much sifting, it looks like something is up with my config)
> 
> Using the itasca demo, asking for a legend image, i.e.:
> 
http://localhost/cgi-bin/mapserv.exe?mode=legend&layer=lakespy2&map=c%3A%2Fms4w%2Fapps%2Fitasca%2Fdemo.map&savequery=true&program=%2Fcgi-bin%2Fmapserv.exe&map_web_imagepath=c%3A%2Fms4w%2Ftmp%2Fms_tmp%2F&map_web_imageurl=%2Fms_tmp/

Gives me back a legend graphic of one layer with graphics/text positioned like:

--------------
|Graphic text|
--------------

For my own apps, etc., when I issue a mode=legend request, i.e.:

http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/ms_ogc_workshop/service/config.map&mode=legend&layer=rivers

...I get back a legend graphic of one layer with graphics/text posotioned like:

--------------
|Graphic     |
|  text      |
--------------

I would like my legend graphics to come out like case 1 (expected results).  Here's the CLASS snippet from my mapfile

  CLASSITEM "NAME"
  CLASS
   EXPRESSION /Great Bear/
   NAME 'Great Bear'
   COLOR 0 0 255
  END
  CLASS
   EXPRESSION /Japura/
   NAME 'Japura'
   COLOR 0 0 255
  END
 END

What is misaligning my legend images?

Cheers

..Tom



More information about the MapServer-users mailing list