<?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: How do I make a graphics layer appear above others in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-make-a-graphics-layer-appear-above-others/m-p/1305644#M81619</link>
    <description>&lt;P&gt;I sorted the layers on the map and it did what I wanted to do.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2023 04:21:03 GMT</pubDate>
    <dc:creator>CalvinLe360</dc:creator>
    <dc:date>2023-07-05T04:21:03Z</dc:date>
    <item>
      <title>How do I make a graphics layer appear above others</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-make-a-graphics-layer-appear-above-others/m-p/1305624#M81618</link>
      <description>&lt;P&gt;Hi, I'm looking to find out how to make a graphics layer appear above others after adding to map.&lt;/P&gt;&lt;P&gt;Let's say that I have two layers, each containing a circle at the same location and size, with the only difference being colour. The first layer will be hidden by the second, but at some point I want the first layer to hide the second instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// layerA appears over layerB because layerB is added earlier
const layerB = new GraphicsLayer();
const layerA = new GraphicsLayer();
map.layers.add(layerB);
map.layers.add(layerA);

// graphic stuff
const geometry = new Circle({
    center: {
        x: 0,
        y: 0,
    },
    radius: 100,
    radiusUnit: 'meters',
});
const symbolA = new SimpleFillSymbol({
    color: [0, 0, 0, 1],
    style: 'solid'
    outline: {
        color: [0, 0, 0, 0],
    },
});
const symbolB = symbolA.clone();
symbolB.g = 255;

layerA.add(new Graphic({
    geometry: geometry,
    symbol: symbolA,
});
layerB.add(new Graphic({
    geometry: geometry,
    symbol: symbolB,
});

// TODO: Make layerB appear over layerA&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Code might not be correct, but I wanted to lay out the form of the problem. If layerB gets put over layerA, then a green circle should appear instead of the black circle. How can I do this?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 00:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-make-a-graphics-layer-appear-above-others/m-p/1305624#M81618</guid>
      <dc:creator>CalvinLe360</dc:creator>
      <dc:date>2023-07-05T00:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make a graphics layer appear above others</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-make-a-graphics-layer-appear-above-others/m-p/1305644#M81619</link>
      <description>&lt;P&gt;I sorted the layers on the map and it did what I wanted to do.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 04:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-make-a-graphics-layer-appear-above-others/m-p/1305644#M81619</guid>
      <dc:creator>CalvinLe360</dc:creator>
      <dc:date>2023-07-05T04:21:03Z</dc:date>
    </item>
  </channel>
</rss>

