[OpenLayers-Dev] WMS: jpeg override
bartvde at osgis.nl
bartvde at osgis.nl
Thu Mar 12 04:26:58 EDT 2009
Hi list,
currently when using a WMS layer as jpeg and transparent true, OL
"automagically" override the image format to png or gif. This has caused
me quite a few headaches in the past weeks to be honest.
I would rather have that transparent true is just ignored, and that the
image format remains jpeg. In the end, this is what a WMS does when it
receives &format=image/jpeg&transparent=TRUE. So why not leave this up to
the WMS to deal with it, and maybe write a warning message to the console
for the app developer in debug mode?
Btw, I am talking about this piece of code:
// jpegs can never be transparent, so intelligently switch the
// format, depending on teh browser's capabilities
if (this.params.FORMAT == "image/jpeg") {
this.params.FORMAT = OpenLayers.Util.alphaHack() ?
"image/gif"
:
"image/png";
}
What do others think?
Best regards,
Bart
More information about the Dev
mailing list