[MapProxy] error with "image/png; mode=24bit" format string in client requests

Andrea Pogliaghi andrea.pogliaghi at gmail.com
Thu Dec 22 04:10:51 EST 2011

Hi everybody,

I'm using Mapproxy as a caching system between Openlayers and Mapserver and
I'm having troubles dealing with 24-bit png's.
It seems that mapproxy doesn't like the "image/png; mode=24bit" format
string, that is required by mapserver to generate 24bit png's.

In details, in Openlayers I've got a wms layer configured like this:

//layer WMS
    wmsLayer = new OpenLayers.Layer.WMS(
            transparent: 'TRUE',
            layers: myWMSlyr,
            format: "image/png; mode=24bit",
            projection: new OpenLayers.Projection("EPSG:900913"),
            ratio: 1
but Mapproxy is throwing an exception related to  "image/png; mode=24bit"
not being in a correct format.
Here's the stack trace:
Traceback (most recent call last):
line 159, in __call__
    resp = self.handlers[handler_name].handle(req)
line 38, in handle
    return self.services[service].handle(req)
line 30, in handle
    return handler(parsed_req)
line 115, in map
    img_opts = self.image_formats[params.format_mime_type].copy()
KeyError: u'image/png; mode=24bit'

I need to pass the "format=image/png; mode=24bit" to mapserver, is there
some settings I should make to mapproxy and/or change the request in
Openlayers to achieve that?

Any help appreciated
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapproxy/attachments/20111222/f1d69b39/attachment.html

More information about the MapProxy mailing list