<?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 to set the display order of layers? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28588#M667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can add layers to the map specifying their index.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;map.addLayer(layer:&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/Layer.html" style="color: #007ac2; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;Layer&lt;/A&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;, index:int = -1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Oct 2014 16:39:21 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2014-10-29T16:39:21Z</dc:date>
    <item>
      <title>How to set the display order of layers?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28587#M666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a map on which I'm displaying some graphics layers and some WMS layers.&amp;nbsp; Some of the WMS layers seem to be displaying on top of the graphics layers (and blocking the graphics from view). I would like to make the graphics layers display on top of all other layers. Is there a property that I can use to make this happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tried setting the Z value for the layers (set the WMS layers at z=0, and the graphics layers at z=20) and that didn't work. Any other properties that might make this happen for me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 16:09:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28587#M666</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2014-10-29T16:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the display order of layers?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28588#M667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can add layers to the map specifying their index.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;map.addLayer(layer:&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/Layer.html" style="color: #007ac2; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;Layer&lt;/A&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;, index:int = -1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 16:39:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28588#M667</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-10-29T16:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the display order of layers?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28589#M668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply Robert. I have a couple follow up questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does each layer have to have a different index (or can I make a group of them have an index of -1, and the group I want to display on top be index=1)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, how to I specify the index if I'm defining the layer in mxml?&lt;/P&gt;&lt;P&gt;ie. &amp;lt;esri:GraphicsLayer id="myGraphicsLayer" symbol="mySymbol" /&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried adding the index to my graphics layers that I have defined in mxml, and that results in a compile error ("Cannot resolve attribute 'index' for component type com.esri.afg.layers.GraphicsLayer.").&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 17:22:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28589#M668</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2014-10-29T17:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the display order of layers?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28590#M669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you are defining your layers in mxml than the order they are in your mxml sets their index in the map. Using the map.addLayer is only for adding a layer from ActionScript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 17:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28590#M669</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-10-29T17:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the display order of layers?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28591#M670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So my graphics layers are defined in mxml at startup, and I am adding WMS layers during runtime as needed. In this case, should my graphics layers already be showing up on top of the WMS layers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 17:35:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28591#M670</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2014-10-29T17:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the display order of layers?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28592#M671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you are adding the WMS layers in code using map.addLayer&amp;nbsp; and you are not specifying an index in that function then the documentation states:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;public function addLayer(layer:&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/Layer.html" style="color: #007ac2; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;Layer&lt;/A&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;, index:int = -1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;index:int (default = -1) — The location for placing the layer. If index is less than 0 or greater than the total number of layers, the layer will be placed on the top.&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 17:39:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-set-the-display-order-of-layers/m-p/28592#M671</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-10-29T17:39:44Z</dc:date>
    </item>
  </channel>
</rss>

