[OpenLayers-Users] mapserver layer image type

Christopher Schmidt crschmidt at metacarta.com
Sun Dec 2 21:12:44 EST 2007


On Sun, Dec 02, 2007 at 01:43:29PM -0700, Richard Greenwood wrote:
> On Dec 2, 2007 1:36 PM, Gregor Mosheh <gregor at hostgis.com> wrote:
> > Richard Greenwood wrote:
> > > Is it possible to set a mapserver layer image type to jpeg?
> >
> > Boy, this has come up a few times in the last few days! Mapserver
> > *layers* don't have an image type. Mapserver's output image has a image
> > type. And yes, that can indeed be JPEG.
> >
> > Set the IMAGETYPE to jpeg and, if desired, create a OUTPUTFORMAT block
> > with any JPEG settings such as image quality.
> 
> I'm not referring to the map file, I'm talking about doing it in
> Openlayers. MapServer.js has :
>    map_imagetype: "png"
> which gets put into the image request url AFTER my {layers:
> "LayerName", map_imagetype: "jprg"} thus over riding my attempt to set
> the image type.

That's odd: are you saying that your request had two map_imagetype
parameters? Can you reproduce with minimal changes to one of the examples?
This would definitely be a bug. 

> I changed the image type definition on MapServer.js, but then I get
> nothing, presumably because Openlayers is expecting a PNG.

This definitely isn't the reason: OpenLayers knows nothing about the
actual returned mime type, only the browser knows.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list