[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(
        "name",
        //"http://"+serverIp+"/cgi-bin/mapserv?",
        "http://localhost:8080/service?",
        {
            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):
  File
"/home/andrea/mapproxy/lib/python2.6/site-packages/mapproxy/wsgiapp.py",
line 159, in __call__
    resp = self.handlers[handler_name].handle(req)
  File
"/home/andrea/mapproxy/lib/python2.6/site-packages/mapproxy/service/ows.py",
line 38, in handle
    return self.services[service].handle(req)
  File
"/home/andrea/mapproxy/lib/python2.6/site-packages/mapproxy/service/base.py",
line 30, in handle
    return handler(parsed_req)
  File
"/home/andrea/mapproxy/lib/python2.6/site-packages/mapproxy/service/wms.py",
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
Andrea
-------------- 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