legend generation

Dolf Andringa dolf.andringa at ELCYION.NL
Thu Dec 21 08:29:55 PST 2006


Thanks Bart and David! I though I had read that the title element was 
the one giving the name in the legend. I guess I misread :) It works now!

Dolf.

Fawcett, David schreef:
> There may be other things wrong, but for a layer or class to show up in
> the legend, that  class needs to have a name.  It appears that neither
> of the classes in your layer have names.
> 
> David.
> 
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Dolf Andringa
> Sent: Thursday, December 21, 2006 9:04 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] legend generation
> 
> 
> Hi People,
> 
> I don't understand legends I think. I have found the mapfile reference 
> and mapscript API reference, but can't get this to work.
> I have got a map file (see below). When I try to create a legend for it 
> with the mapserver legend tool, or by using mapscript 
> (someMapObj.drawLegend().save(filename)), I only get a very small empty 
> image. The map itself is displayed correctly with blue and red points. 
> What is needed to create a legend. What am I doing wrong? I don't know 
> where to look.
> Thanks,
> 
> Dolf.
> 
> EXTENT 132771 447652 134477 451064
>    IMAGECOLOR 255 255 255
>    IMAGETYPE png24
>    SYMBOLSET "symbols2.set"
>    SIZE 600 1200
>    STATUS ON
>    UNITS METERS
>    NAME "HAGIS map"
> 
>    LEGEND
>      KEYSIZE 20 10
>      LABEL
>        SIZE MEDIUM
>        TYPE BITMAP
>        COLOR 0 0 89
>      END
>      STATUS ON
>    END
> 
>    LAYER
>      CONNECTION "PG:*****"
>      CONNECTIONTYPE OGR
>      DATA "promedico_acni_ds.lw"
>      DEBUG ON
>        METADATA
>        END
>      NAME "lw"
>      SIZEUNITS PIXELS
>      STATUS ON
>      TOLERANCEUNITS PIXELS
>      TYPE POINT
>      UNITS METERS
>      CLASS
>        EXPRESSION (([HUISNUMMER]^2 <= 4) OR ( [HUISNUMMER]^2=9 ))
>        METADATA
>        END
>        STYLE
>          ANGLE 360
>          COLOR 255 0 0
>          SYMBOL 2
>        END
>        TITLE "huisnummer <= 3"
>      END
>      CLASS
>        METADATA
>        END
>        STYLE
>          ANGLE 360
>          COLOR 0 0 255
>          SYMBOL 2
>        END
>        TITLE "overig"
>      END
>    END



More information about the MapServer-users mailing list