Select to view content in your preferred language

Runtime doesn't load layer transparency from Dynamic Map Service

1055
6
01-14-2022 11:39 AM
MikeBingham1
New Contributor

I am creating a map with one layer that has a transparency of 80 and publishing that to ArcGIS Server 10.8.1 and 10.9.1 as a dynamic service. I have tried this with both ArcMap 10.8 and ArcGIS Pro 2.9. This is being accessed from runtime 100.13 using a ArcGISMapImageLayer. The service loads fine using the runtime api but the layer that should have a transparency doesn't. In checking the opacity property for that layer it is still set at 1. So the transparency from the layer in the dynamic service doesn't seem to carry over to the opacity property in ArcGISMapImageLayer.  Any ideas if this should be working or how to get it to work?

0 Kudos
6 Replies
MichaelBranscomb
Esri Frequent Contributor

Perhaps the issue is the image format being requested. I recommend:

0 Kudos
MikeBingham
Emerging Contributor

I checked that image formats supported and I see the following:
PNG32,PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,BMP

I also added a handler for HttpRequestBegin and all I get there is a URL that looks like this:
http://<host>:6080/arcgis/rest/services/<service name>/MapServer?f=json

Is there something specific I am supposed to be looking for here?

0 Kudos
MikkelHylden
Regular Contributor

I'm experiencing the same issue (transparency in published map is not retained in runtime), but using a geodatabase downloaded from a syncable feature service.

@MichaelBranscomb  what are we supposed to be looking for beyond the image formats? This seems be another item in a long list of runtime limitations... 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

When working with map services (MapServer endpoint) via the ArcGISMapImageLayer class, ArcGIS Runtime makes a request to the MapServer/Export operation with the image being rendered on the server-side. The default image format is PNG which will support transparency here (and is therefore not specified/overridden in the request). The `transparent` parameter is included in the request, to set the background of the map as the transparent color in the image. If the image returned is not honoring the transparency defined in the service that might indicate the image being rendered on the server is not respecting the transparency.

Note that the opacity for the ArcGISMapImageLayer itself will be 1, unless you override it because that's the overall map as you published it from Pro. The individual layers are accessed through the Sublayers property - these are where you will see the transparency/opacity property specified and it should match the service definition.

https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Mappin...

https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Mappin...

 

Thanks

0 Kudos
MikkelHylden
Regular Contributor

Thanks for the reply, but that's slightly different from our workflow. We download a .geodatabase file from a syncable feature service. The user is allowed to make edits in that geodatabase for possible sync back to the server, but it gets loaded as a geodatabase and get the symbology from that, rather than downloading an image from the map image layer. I also have a ticket open on this, so it may be determined that this is a limitation of the runtime using a geodatabase. 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

@MikkelHylden 

Yes, your scenario is different from the subject of this post - I recommend starting a new post or awaiting the results of the investigation into the ticket you have open.

 

Thanks

0 Kudos