[mapserver-users] Legend Icon with Raster Layer

Thomas Haechler thaechl at geo.unizh.ch
Tue Jun 25 09:52:39 PDT 2002


hi all

I try to create a dynamic legend in mapscript with the
createLegendIcon() method. this works fine for point/line/polygon
layers, but raster layers don't appear in the legend at all. so I added
a class with just a name to that layer. the name is displayed properly,
but the icon is just white. I tried with a pixmap-symbol, but it only
gets drawn as a legend icon, if the color in the class object is set.
but unfortunately, this leads into another problem: the layer is drawn
in this color in the main map. the same also happens with the
drawLegend() method.

what am I missing, or is it not possible?
thanks,

thomy


--- Layer definition in mapfile: ---
LAYER
  NAME dhm25
  DATA dhm25.tif
  TYPE RASTER
  STATUS ON
  MINSCALE 25000
#  MAXSCALE 200000
  CLASS
        NAME "DHM 25"
        SYMBOL 16
#       SIZE 8
        COLOR 0 0 0
  END #Class
END #Layer

--- Symbol definition: ---
#16
Symbol
Type PIXMAP
# FILLED TRUE
IMAGE "../images/icon_dhm25.png"
END


-- 

THOMAS HAECHLER

Geographic Information Systems Division
Institute of Geography
University of Zurich
Switzerland

thomas.haechler at geo.unizh.ch



More information about the MapServer-users mailing list