<?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: Set Opacity of Feature Layer with Javascript API in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523550#M48806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it in the sandbox and it worked for both methods (&lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_print_esri_request" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_print_esri_request"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142857" class="image-1 jive-image" height="205" src="https://community.esri.com/legacyfs/online/142857_pastedImage_0.png" style="max-width: 1200px; max-height: 900px; width: 628px; height: 204.603px;" width="628" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142862" class="image-3 jive-image" height="201" src="https://community.esri.com/legacyfs/online/142862_pastedImage_2.png" style="width: 624px; height: 201.29px;" width="624" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142858" class="image-2 jive-image" height="405" src="https://community.esri.com/legacyfs/online/142858_pastedImage_1.png" style="height: 405px; width: 509.702px;" width="510" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Here's how it looked without setting opacity:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142863" class="jive-image image-4" height="204" src="https://community.esri.com/legacyfs/online/142863_pastedImage_7.png" style="max-width: 1200px; max-height: 900px; width: 709px; height: 204.35px;" width="709" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142864" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/142864_pastedImage_8.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Nov 2015 18:47:28 GMT</pubDate>
    <dc:creator>ChrisSmith7</dc:creator>
    <dc:date>2015-11-13T18:47:28Z</dc:date>
    <item>
      <title>Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523547#M48803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a javascript/HTML5 web application that uses a dynamic mapservice and a feature layer.&amp;nbsp; I have been able to apply opacity to the dynamic mapservice on both the map and the print-out using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var imageParameters = new ImageParameters();&lt;/P&gt;&lt;P&gt;imageParameters.format = "png32";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before loading the dynamic mapservice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then during the loading of the dynamic mapservice I apply the imageParameters and opacity for the mapservice &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynaLayer1 = new ArcGISDynamicMapServiceLayer(Mapserver + DynMapservice, {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "id": "mapper",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opacity: 1.0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "imageParameters": imageParameters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayers([dynaLayer1]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to apply the same logic for a feature layer, but the symbol is solid in the print-out instead of transparent (thus obscuring the underlying layers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus can you control the opacity of a feature layer for a javascript/HTML5 print-out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 17:48:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523547#M48803</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-11-13T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523548#M48804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a FeatureLayer, you should be able to specify the opacity right in the constructor; additionally, per the API, there's a setOpacity() method you can call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html" title="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, does this work in the app, just not in the printout? I had an issue with opacity before with a unique value renderer - the API didn't like how I was constructing the renderer... let me see if I can dig that up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 18:34:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523548#M48804</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-11-13T18:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523549#M48805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/159547"&gt;UniqueValueRenderer - Transparency issue with SimpleMarkerSymbol&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 18:38:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523549#M48805</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-11-13T18:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523550#M48806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it in the sandbox and it worked for both methods (&lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_print_esri_request" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_print_esri_request"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142857" class="image-1 jive-image" height="205" src="https://community.esri.com/legacyfs/online/142857_pastedImage_0.png" style="max-width: 1200px; max-height: 900px; width: 628px; height: 204.603px;" width="628" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142862" class="image-3 jive-image" height="201" src="https://community.esri.com/legacyfs/online/142862_pastedImage_2.png" style="width: 624px; height: 201.29px;" width="624" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142858" class="image-2 jive-image" height="405" src="https://community.esri.com/legacyfs/online/142858_pastedImage_1.png" style="height: 405px; width: 509.702px;" width="510" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Here's how it looked without setting opacity:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142863" class="jive-image image-4" height="204" src="https://community.esri.com/legacyfs/online/142863_pastedImage_7.png" style="max-width: 1200px; max-height: 900px; width: 709px; height: 204.35px;" width="709" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142864" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/142864_pastedImage_8.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 18:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523550#M48806</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-11-13T18:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523551#M48807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you displaying a print-out or just the map on the screen?&amp;nbsp; In my scenario the opacity is being maintained in the map on the screen, but not in the print-out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 18:57:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523551#M48807</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-11-13T18:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523552#M48808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second images with the scalebar in the lower right-hand corner is the printout. You can try it yourself, too, in the sandbox - &lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_print_esri_request" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=widget_print_esri_request"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't make a jsfiddle since it's only a one-line change in the demo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 19:02:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523552#M48808</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-11-13T19:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523553#M48809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris:&lt;/P&gt;&lt;P&gt;Thanks for the code samples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am working on uses a different methodology for adding the feature layer.&amp;nbsp; You add the feature layer at map initialization using MODE_SNAPSHOT, but in the application I'm working with the feature layer gets added to the map dynamically by the user with MODE_ONDEMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you are not assigning a renderer or a selectionSymbol on the feature layer which is done in the web application I am working on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As such when I applied your code to my scenario, it did not fix the opacity issue with the print-out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523553#M48809</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-11-13T20:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Opacity of Feature Layer with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523554#M48810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would look at the renderer/selection symbol, if you haven't already - I posted a thread earlier where I ran into opacity issues... it's possible you may be experiencing a similar scenario. Is it at all possible for you to create a jsfiddle demonstrating the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-opacity-of-feature-layer-with-javascript-api/m-p/523554#M48810</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-11-13T20:23:03Z</dc:date>
    </item>
  </channel>
</rss>

