Good question, let me check the code ... looking at the implementation of
GetMap we have:

                if (!merged) {
                    WMSLayer Layer = new WMSLayer(wms, gt2Layer);
                    Layer.setTitle(wmsLayer.prefixedName());
                    mapContent.addLayer(Layer);
                }

So GeoServer sets a title, but does not set the background color.

Looking at the GeoTools implementation in WMSLayer that does the work ...
it uses transparent by default:

        if(backgroundColor == null) {
            mapRequest.setTransparent(true);
        } else {
            String rgba = Integer.toHexString(backgroundColor.getRGB());
            String rgb = rgba.substring(2, rgba.length());
            mapRequest.setBGColour("0x" + rgb.toUpperCase());
            mapRequest.setTransparent(backgroundColor.getAlpha() < 255);
        }

Expect we need a bug report for this one, I did update the communication
page with handy search boxes if you want to check if the issue is reported
already. http://geoserver.org/comm/



Jody Garnett


On Wed, Jul 30, 2014 at 1:55 PM, Milo van der Linden <[email protected]>
wrote:

> Hello list,
>
> I noticed that geoserver adds BG=0xFFFFFF to the requests when connecting
> to a remote wms service. In my case this is a mapserver service where we
> hardcoded the png outputformat to never be transparent and blue so we get
> the correct ocean-effect.
>
> Is there a way to bypass the BGCOLOR parameter? Or does this require
> enhancements to geoserver itself?
>
> Thanks and kind regards,
>
> Milo
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to