[mapserver-users] modify legend size at layer level
jorgelopez
jorgelopez.physics at gmail.com
Tue Aug 28 06:56:20 PDT 2012
Hello everyone:
I am struggling with this but I found no way to continue. I have stablished
predefined size of legend image at MAP level in the mapfile like this:
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12 #tamanyo (pixels)
OUTLINECOLOR 0 0 0
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END #end label
TRANSPARENT ON
END #end legend
and it display square boxes accordingly to specified sizes. I have not found
any way to generate an gradient colorbar for a raster file, so I decided to
attach a previosult-generated legend image. But legend images fit to
map-level sizes resulting too small and I would like to make this image
bigger.
I made some probe by modifying
# TO CONSTRUCT THE LEGEND DIRECTLY BY APPENDING AN IMAGE DISPLAYING IT
CLASS
NAME 'COLOUR_RAMP_1'
STYLE
WIDTH 30
# OUTLINECOLOR 255 0 0
SIZE 30
END # end of style object
KEYIMAGE 'gtopo30legend/gtopo30_legend.png'
# KEYSIZE 90 90
END
but no succeed at all. It mantains the same size (18x12).
Could someone tell me how to overwrite this size at layer-level ??
I try to take the generated getLegendGraphic URL by MapServer to see how
legend is sketched. Neither HEIGHT, WIDTH nor RULE are appended, so my image
results in smaller again.
generated:
"http://servername/ogc/wmstest?version=1.1.1&service=WMS&request=GetLegendGraphic&layer=USGS_RASTER_UNIFIED&format=image/png&STYLE=default
desired:
"http://servername/ogc/wmstest?version=1.1.1&service=WMS&request=GetLegendGraphic&layer=USGS_RASTER_UNIFIED&format=image/png&STYLE=default&rule=COLOUR_RAMP_1&WIDTH=30&HEIGHT=30
Does anybody know which params are to be defined in the mapfile to generate
the DESIRED URL.
Thank you in advance
JORGE
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/modify-legend-size-at-layer-level-tp4998327.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list