publish transparent layer as map services

3242
5
Jump to solution
04-23-2014 03:27 PM
dancheng
New Contributor II
Hi there,

i have a mxd which i set the transparency of one of the layers to be 40%, so i published it as a map service and add it to my web application usingArcGISDynamicMapServiceLayer , however, its not set up as transparent as it should be in my web map. Any ideas?

Thanks,
Dan
Tags (2)
0 Kudos
1 Solution
5 Replies
WilliamCraft
MVP Regular Contributor
Please provide the version of ArcGIS Server you are using along with any relevant API (e.g., Flex, Javascript, Silverlight).
0 Kudos
dancheng
New Contributor II
ArcGIS Server 10.2, Javascript API

Thanks,
Dan
Please provide the version of ArcGIS Server you are using along with any relevant API (e.g., Flex, Javascript, Silverlight).
0 Kudos
dancheng
New Contributor II
Thank you for the help.

It works for me now after adding this one line of code:

baseMapLayer._params.format = 'png32';
0 Kudos
dancheng
New Contributor II
Hey everyone,

Just out of curiosity, I have a follow-up question. Is this image format thing a problem/bug in the ESRI javascript API?

I did a quick test by publishing raster data and vector data as separate map services with transparency settings/

For raster data:
its working fine on my web map and by dragging the map service into ArcMap (The image format in png32 in service layer properties).

For vector data:
its working in ArcMap (with png as image format) but not on my web map.

so why ArcMap could automatically pick up the transparency settings but why not javascript API?

Thanks in advance!
Dan
0 Kudos