[mapserver-users] html legend not working

Raffaele Morelli raffaele.morelli at gmail.com
Mon Aug 3 05:55:48 PDT 2015


On 03/08/15 at 12:26pm, Rahkonen Jukka (MML) wrote:
> Hi,
> 
> By a quick look at http://mapserver.org/ogc/wms_server.html you should probably add text/html as a GetLegendGraphic format:
> wms_getlegendgraphic_formatlist
> 
>     Description: (Optional) A comma-separated list of valid formats for a WMS GetLegendGraphic request.
> 
> and then use &format=text/html in your request. However, I have not tried that myself but this is just my best guess.
> 
> -Jukka Rahkonen-
> 
> Raffaele Morelli wrote:
> 
> > Short story: I can't get html legend to work...
> 
> > legend.html file is in the same directory of the mapfile, as you can see the LABEL block is a verbatim copy from Mapserver documentation.
> 
> > The INCLUDE layer is a point layer with CLASS correctly defined.
> 
> > This my request to test
> http://localhost/cgi-bin/mapserv?MAP=/home/www/geomoose-2.8.0/maps/cen_default//cen_default.map&FORMAT=image/png&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&_OLSALT=0.9622128666378558&SRS=EPSG:3857&SCALE=6933486.650500195&WIDTH=250&STYLE=&LAYER=sostegni
> 
> The legend is returned a png file, just like TEMPLATE statement wasn't taken into account.
> 
> 
> Any hint?
> 

Added, but it doesn't work.
I got this error:

msWMSGetLegendGraphic(): Image handling error. Unsupported output format (text/html).



PS please do not top post


-- 
«My mama said to get things done
You'd better not mess with Major Tom»


More information about the mapserver-users mailing list