[MapServer-users] Raster legend
Martin Album Ytre-Eide
mye at nilu.no
Wed Aug 30 02:02:31 PDT 2023
I am serving rasters through mapserver and the maps look fine. I have managed to include a raser legend by setting:
LEGEND
KEYSIZE 200 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS EMBED
END
My 'Class' inside my 'Layer' looks like:
CLASS
NAME "my_legend_name"
STYLE
RANGEITEM "Band 1"
COLORRANGE 255 255 178 189 0 38
DATARANGE 1700 2000
END
END
This gives me a nice legend. However, it is missing ticks and values. So, there are no clues to what values the different colors represent. How can ticks be added to the embed legend? Is it even possible? I have also called the legend with GetLegendGraphic through openlayers wmsSource.getLegendUrl but without finding a way to set ticks. I would think this would be possible?
Best regards,
Martin Album Ytre-Eide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230830/e503378f/attachment.htm>
More information about the MapServer-users
mailing list