[OpenLayers-Dev] WMS: jpeg override
bartvde at osgis.nl
bartvde at osgis.nl
Thu Mar 12 04:43:27 EDT 2009
Okay, let me give an example why this bothers me.
When reading in a WMC document with layerParams:
var format = new OpenLayers.Format.WMC({layerParams: {transparent:
'TRUE'}, layerOptions: {isBaseLayer: false, singleTile: true, buffer: 0,
ratio: 1, displayOutsideMaxExtent: true}});
I want all WMS overlays to be transparent. But there can be 1 layer at the
bottom of the stack which is a jpeg aerial photograph in the WMC.
So I would need some kind of conditional layerParams, which is currently
not possible and a bit of a hassle to implement.
That's why I am advocating removing the jpeg override.
Best regards,
Bart
> 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
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
More information about the Dev
mailing list