<?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: Feature Layer order in map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401861#M36987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jake, that fixed this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if the only way to fix the random re-arranging layers in the Legend dijit can only be fixed by sorting the object before it gets fed to the dijit?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2016 19:49:51 GMT</pubDate>
    <dc:creator>TimWitt2</dc:creator>
    <dc:date>2016-03-11T19:49:51Z</dc:date>
    <item>
      <title>Feature Layer order in map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401859#M36985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you look at the following app &lt;A href="http://timw1984.github.io/toll/" title="http://timw1984.github.io/toll/"&gt;CFX Map &lt;/A&gt; you can see that my point featurelayer is below the line feature layer. How can I get the points on top of the lines?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I noticed when I refresh the app sometimes the layers get re-arranged my legend, I guess depending on how the layers load. How could I have a set order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 19:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401859#M36985</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2016-03-11T19:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer order in map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401860#M36986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the points to draw on top of the other services you will need to update the addLayers method and specify the point service last.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14577253873579614 jive_text_macro" data-renderedposition="112_8_1332_16" jivemacro_uid="_14577253873579614"&gt;&lt;P&gt;map.addLayers([cfx,cfxprop,turn, tollLayer]);&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 19:43:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401860#M36986</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2016-03-11T19:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer order in map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401861#M36987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jake, that fixed this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if the only way to fix the random re-arranging layers in the Legend dijit can only be fixed by sorting the object before it gets fed to the dijit?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 19:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401861#M36987</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2016-03-11T19:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer order in map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401862#M36988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you may have to sort the object before it's sent to the legendDijit constructor.&amp;nbsp; For example, if you want to order the legend by title in ascending order you could use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;layerInfo = layerInfo.sort(function(a, b){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return a.title &amp;lt; b.title;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401862#M36988</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T18:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer order in map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401863#M36989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, that's what I thought.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Jake for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 20:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-order-in-map/m-p/401863#M36989</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2016-03-11T20:20:04Z</dc:date>
    </item>
  </channel>
</rss>

