<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use Transparency Settings from a Map Service in a Web App in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686707#M63911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Spencer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could use the &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#setvisiblelayers" rel="nofollow noopener noreferrer" target="_blank"&gt;setVisibleLayers&lt;/A&gt;&lt;SPAN&gt; method to query which layers to add.&amp;nbsp; You could apply transparency to the polygons, and display the other layers with no transparency.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//transparency applied
var lyrUSA = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer", {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opacity : 0.5
});

lyrUSA.setVisibleLayers([0,2]);&amp;nbsp;&amp;nbsp;&amp;nbsp; 
map.addLayer(lyrUSA);

//no transparency
var lyrUSA2 = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer");

lyrUSA2.setVisibleLayers([1,3]);
map.addLayer(lyrUSA2);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:53:20 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-12T04:53:20Z</dc:date>
    <item>
      <title>Use Transparency Settings from a Map Service in a Web App</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686704#M63908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am currently working on getting a map service I have published to display in a web app using the js API. I currently have 24 layers within the service, 4 of which are polygons that I want to have a slight transparency. I have set the transparency for those layers in the .mxd and was wondering how to carry that over to my web app. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I load the service as a DynamicMapServiceLayer I am able to display my data but the transparency does not work. I can see a transparency value when I look at the individual layers in the service directory. I also noticed that if I pull my service into an arcgis.com map that the transparency is applied correctly for my 4 polygon layers. My service was published using desktop 10.2 to a 10.2 server instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have done quite a bit of digging and have not been able to find an answer.&amp;nbsp; Based on the nature of the app I'd rather not break the service into multiple smaller services. Essentially I am looking for a way to use the transparency setting that is visible in the service in order to have transparency on individual layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry if this has been asked before. I have not been able to find an answer that worked for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 03:08:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686704#M63908</guid>
      <dc:creator>SpencerV</dc:creator>
      <dc:date>2014-03-12T03:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use Transparency Settings from a Map Service in a Web App</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686705#M63909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Spencer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when you add the layer to your map you can always specify its transparency, via code, in its properties. See &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#opacity"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 11:06:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686705#M63909</guid>
      <dc:creator>TimWitt</dc:creator>
      <dc:date>2014-03-12T11:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use Transparency Settings from a Map Service in a Web App</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686706#M63910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tim,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the response. Setting the opacity on the dynamic layer its self would make all the layers in the service transparent, correct? If so, I would like to only have the 4 polygon layers to be transparent while the remaining point layers are completely visible. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Spencer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 11:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686706#M63910</guid>
      <dc:creator>SpencerV</dc:creator>
      <dc:date>2014-03-12T11:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use Transparency Settings from a Map Service in a Web App</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686707#M63911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Spencer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could use the &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#setvisiblelayers" rel="nofollow noopener noreferrer" target="_blank"&gt;setVisibleLayers&lt;/A&gt;&lt;SPAN&gt; method to query which layers to add.&amp;nbsp; You could apply transparency to the polygons, and display the other layers with no transparency.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//transparency applied
var lyrUSA = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer", {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opacity : 0.5
});

lyrUSA.setVisibleLayers([0,2]);&amp;nbsp;&amp;nbsp;&amp;nbsp; 
map.addLayer(lyrUSA);

//no transparency
var lyrUSA2 = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer");

lyrUSA2.setVisibleLayers([1,3]);
map.addLayer(lyrUSA2);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:53:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686707#M63911</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-12T04:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Use Transparency Settings from a Map Service in a Web App</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686708#M63912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jake,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no way to utilize that transparency setting like the arcgis.com map does? Thanks for the response, looks like I will utilize the way you spoke of.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Spencer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 12:13:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686708#M63912</guid>
      <dc:creator>SpencerV</dc:creator>
      <dc:date>2014-03-12T12:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Use Transparency Settings from a Map Service in a Web App</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686709#M63913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To set transparency for an individual layer, I had to &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;enable support for dynamic layer on the map service in ArcGIS Server, &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;set the image format to PNG32 for the dynamic layer --&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;layer.setImageFormat('png32'); &lt;STRONG&gt;There should be an easier way...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The problem with &lt;A href="https://community.esri.com/migrated-users/8586"&gt;Jake Skinner's&lt;/A&gt;​ answer is that it will cause 2 requests to the map service every time the user pans, zooms, etc. If you have 24 layers with 24 different transparencies, this can quickly overwhelm a service.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 14:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-transparency-settings-from-a-map-service-in-a/m-p/686709#M63913</guid>
      <dc:creator>BrandonFlessner</dc:creator>
      <dc:date>2016-07-19T14:33:55Z</dc:date>
    </item>
  </channel>
</rss>

