WMSLayer change transparency in ULR request

4524
5
Jump to solution
02-11-2015 07:34 AM
JoachimNitschke1
New Contributor II

Hi folks,

I'm using ArcGis Runtime for .NET 10.2.04 to display maps from a WMS server. Instead of a colored background our map always has a white background.

When I check the URL that the Esri framework produces using Fiddler, the result is as following:

GET /?SERVICE=WMS&REQUEST=GetMap&WIDTH=1920&HEIGHT=1080&FORMAT=image%2Fpng&LAYERS=ENC
&STYLES=&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&VERSION=1.3.0&CRS=EPSG:3857&
BBOX=1114445.90347981,7073109.69570739,1210966.09652019,7127402.30429261 HTTP/1.1

As you can see, the request sent to the server has set "TRANSPARENT=TRUE". I need to change this to FALSE otherwise the server returns an image with a transparent background. How do I change this property in XAML or code? Setting the opacy property on the layer doesn't change the URL-request.

Kind Regards,

Eugen

0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor

This property is not exposed by the API, so there is unfortunately no mean to change it.

We'll consider that for a future version.

Thanks

View solution in original post

0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor

This property is not exposed by the API, so there is unfortunately no mean to change it.

We'll consider that for a future version.

Thanks

0 Kudos
dotMorten_esri
Esri Notable Contributor

As a workaround you could try and set the format to JPEG which doesn't support transparency. We assume that if you're using PNG that you are interested in using the transparency that format offers.

DominiqueBroux
Esri Frequent Contributor

Great idea

0 Kudos
JoachimNitschke1
New Contributor II

Thanks for the tip! Indeed a nice idea. Sadly it didn't solve the problem. The Jpegs are rendered with a white background according to the request paramter "BGCOLOR=0xFFFFFF".  I guess this parameter isn't exposed by the API either..?

Kind regards

Joachim

0 Kudos
DominiqueBroux
Esri Frequent Contributor

I confirm that it's not exposed by the API either. Sorry.

0 Kudos