<?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 Feature Layer has a dark background color but not in arcgis.com in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-has-a-dark-background-color-but-not/m-p/1201535#M78249</link>
    <description>&lt;P&gt;Hi, I'm having a problem with displaying map layers to a map. Currently, my layer has a darker background and doesn't parse some of the information correctly to the layer on the map, as such:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AIHobart_0-1660160945187.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48307i81E87E3E7746ACDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AIHobart_0-1660160945187.png" alt="AIHobart_0-1660160945187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, on arcgis.com (ie.&amp;nbsp;&lt;A href="https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer" target="_blank"&gt;https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer&lt;/A&gt;), it doesn't actually darken the background. Both applications are on Arcgis JS 4.24 and there is nothing wrong when adding a layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AIHobart_1-1660161285520.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48308i659282D3BDAECE3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AIHobart_1-1660161285520.png" alt="AIHobart_1-1660161285520.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My implementation is simply just creating a new FeatureLayer and adding it to the map, ie:&lt;/P&gt;&lt;P&gt;new FeatureLayer({url:&amp;nbsp;&lt;A href="https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer" target="_blank"&gt;https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer&lt;/A&gt;/6});&lt;/P&gt;&lt;P&gt;Is there something that needs to be done to the Layer before adding it to the map such that the darkening parts of the layer aren't and that the parsing is correct? Or is there some sort of open source code to see mapviewer?&lt;/P&gt;&lt;P&gt;This is the map layer I am trying to add to my map:&amp;nbsp;&lt;A href="https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer" target="_blank"&gt;https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer&lt;/A&gt;/6.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2022 19:54:59 GMT</pubDate>
    <dc:creator>AIHobart</dc:creator>
    <dc:date>2022-08-10T19:54:59Z</dc:date>
    <item>
      <title>Feature Layer has a dark background color but not in arcgis.com</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-has-a-dark-background-color-but-not/m-p/1201535#M78249</link>
      <description>&lt;P&gt;Hi, I'm having a problem with displaying map layers to a map. Currently, my layer has a darker background and doesn't parse some of the information correctly to the layer on the map, as such:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AIHobart_0-1660160945187.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48307i81E87E3E7746ACDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AIHobart_0-1660160945187.png" alt="AIHobart_0-1660160945187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, on arcgis.com (ie.&amp;nbsp;&lt;A href="https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer" target="_blank"&gt;https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer&lt;/A&gt;), it doesn't actually darken the background. Both applications are on Arcgis JS 4.24 and there is nothing wrong when adding a layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AIHobart_1-1660161285520.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48308i659282D3BDAECE3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AIHobart_1-1660161285520.png" alt="AIHobart_1-1660161285520.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My implementation is simply just creating a new FeatureLayer and adding it to the map, ie:&lt;/P&gt;&lt;P&gt;new FeatureLayer({url:&amp;nbsp;&lt;A href="https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer" target="_blank"&gt;https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer&lt;/A&gt;/6});&lt;/P&gt;&lt;P&gt;Is there something that needs to be done to the Layer before adding it to the map such that the darkening parts of the layer aren't and that the parsing is correct? Or is there some sort of open source code to see mapviewer?&lt;/P&gt;&lt;P&gt;This is the map layer I am trying to add to my map:&amp;nbsp;&lt;A href="https://www.arcgis.com/apps/mapviewer/index.html?url=https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer" target="_blank"&gt;https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer&lt;/A&gt;/6.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 19:54:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-has-a-dark-background-color-but-not/m-p/1201535#M78249</guid>
      <dc:creator>AIHobart</dc:creator>
      <dc:date>2022-08-10T19:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer has a dark background color but not in arcgis.com</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-has-a-dark-background-color-but-not/m-p/1201626#M78253</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think the map and feature services are working as expected in this case. Seems like the map service has some advanced cartographic settings that could not be translated into a feature service. So the feature service renderers have different symbols than the map service itself.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The map service legend shows transparent fills here:&amp;nbsp;&lt;A href="https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer/legend" target="_blank"&gt;https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer/legend&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, if you check the service layer rest end point you can see that the simple renderer has a black fill:&amp;nbsp;&lt;A href="https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer/6" target="_blank"&gt;https://hydro.nationalmap.gov/arcgis/rest/services/wbd/MapServer/6&lt;/A&gt;&amp;nbsp;but the layer itself has 55% opacity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you can set the fill color of the layer's renderer to null when the layers load in the app. You can do the following:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.whenLayerView(layer).then(()=&amp;gt; {
  const renderer = layer.renderer;
  renderer.symbol.color = null;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This codepen shows how it works:&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/OJvwYJg?editors=1000" target="_blank"&gt;https://codepen.io/U_B_U/pen/OJvwYJg?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you have questions about why this is happening you can direct your question in this community:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-enterprise/ct-p/arcgis-enterprise" target="_blank"&gt;https://community.esri.com/t5/arcgis-enterprise/ct-p/arcgis-enterprise&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 21:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-has-a-dark-background-color-but-not/m-p/1201626#M78253</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-08-10T21:55:51Z</dc:date>
    </item>
  </channel>
</rss>

