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

Reply via email to