Opened 20 years ago

Closed 20 years ago

#991 closed defect (fixed)

GetLegendGraphic - FORMAT parameter partially ignored

Reported by: havard.tveite@… Owned by: assefa
Priority: high Milestone: 4.4 release
Component: WMS Server Version: 4.2
Severity: normal Keywords:
Cc:

Description

I have tried to use the FORMAT parameter of the GetLegendGraphics
request, but no matter which of the formats listed in the
capabilities report for GetLegendGraphics (image/png, text/html,
image/jpeg, ...), I get a png-image back.

The only way to change the image format is to change the IMAGETYPE
of the map file.

If I specify an image format that is not reported in the capabilities
report for GetLegendGraphics (in my case image/gif), I get a
ServiceException, as expected. So the FORMAT parameter is not
completely ignored.

Some FORMAT examples:
http://gis.nlh.no/cgi-bin/mapserv?map=/users/ikf/ikfht/mapserver/wmsserver/n5000.map&version=1.1.1&request=GetLegendGraphic&layer=n5000arf&SCALE=200000&FORMAT=image/jpeg
http://gis.nlh.no/cgi-bin/mapserv?map=/users/ikf/ikfht/mapserver/wmsserver/n5000.map&version=1.1.1&request=GetLegendGraphic&layer=n5000arf&SCALE=200000&FORMAT=image/png
http://gis.nlh.no/cgi-bin/mapserv?map=/users/ikf/ikfht/mapserver/wmsserver/n5000.map&version=1.1.1&request=GetLegendGraphic&layer=n5000arf&SCALE=200000&FORMAT=image/gif


I have tested Mapserver 4.2.5 on Solaris 2.7:
MapServer version 4.2.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=SDE INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Change History (4)

comment:1 by tomkralidis, 20 years ago

Cc: tom.kralidis@… added

comment:2 by tomkralidis, 20 years ago

*** Bug 984 has been marked as a duplicate of this bug. ***

comment:3 by assefa, 20 years ago

Cc: mapserver-bugs@… added
Milestone: 4.4 release
Owner: changed from mapserverbugs to assefa
looking into this.

comment:4 by assefa, 20 years ago

Resolution: fixed
Status: newclosed
Corrected (mapwms.c r 1.127) : call to function msApplyOutputFormat was missing. 
Note: See TracTickets for help on using tickets.