<?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 get layer orders displayed and layers in proper order in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262447#M24329</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try explicitly setting the layer index using the optional 'index' property in the addLayer(layer, index?) method. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Andy&lt;BR /&gt;Esri Developer Network&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems no matter what I do the kml layer stays on top.&amp;nbsp; I tried using the index and it still had the kml layer on top.&amp;nbsp; I added another graphics layer and was able to reorder them with reorderLayer fine.&amp;nbsp; When I try to reorder the kml layer it refuses to change position.&amp;nbsp; I added another dynamictiled layer and that reordered with the graphics layers just fine, but still the KML layer was on top and would not move.&amp;nbsp; Is this a bug with the kml layer perhaps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jan 2012 17:20:34 GMT</pubDate>
    <dc:creator>DanRicketts</dc:creator>
    <dc:date>2012-01-13T17:20:34Z</dc:date>
    <item>
      <title>How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262445#M24327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am adding three layers to a map in this order:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL); map.addLayer(basemap);&amp;nbsp; kml = new esri.layers.KMLLayer(kmlUrl);&amp;nbsp; map.addLayer(kml);&amp;nbsp; dataLayer = new esri.layers.GraphicsLayer(); map.addLayer(dataLayer);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I print the layer.id for each I get the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dataLayer = graphicsLayer2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;kml = layer1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;basemap = layer0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want my dataLayer to be the top layer but it seems no matter what I do the kml layer is on top.&amp;nbsp; I tried reorderLayer and put the graphics layer in index 2 and still same result.&amp;nbsp; How can I display the real order of all layers in a map and get my dataLayer on top?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 13:19:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262445#M24327</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2012-01-12T13:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262446#M24328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try explicitly setting the layer index using the optional 'index' property in the addLayer(layer, index?) method. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Esri Developer Network&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 21:49:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262446#M24328</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2012-01-12T21:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262447#M24329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try explicitly setting the layer index using the optional 'index' property in the addLayer(layer, index?) method. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Andy&lt;BR /&gt;Esri Developer Network&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems no matter what I do the kml layer stays on top.&amp;nbsp; I tried using the index and it still had the kml layer on top.&amp;nbsp; I added another graphics layer and was able to reorder them with reorderLayer fine.&amp;nbsp; When I try to reorder the kml layer it refuses to change position.&amp;nbsp; I added another dynamictiled layer and that reordered with the graphics layers just fine, but still the KML layer was on top and would not move.&amp;nbsp; Is this a bug with the kml layer perhaps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 17:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262447#M24329</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2012-01-13T17:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262448#M24330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It seems no matter what I do the kml layer stays on top.&amp;nbsp; I tried using the index and it still had the kml layer on top.&amp;nbsp; I added another graphics layer and was able to reorder them with reorderLayer fine.&amp;nbsp; When I try to reorder the kml layer it refuses to change position.&amp;nbsp; I added another dynamictiled layer and that reordered with the graphics layers just fine, but still the KML layer was on top and would not move.&amp;nbsp; Is this a bug with the kml layer perhaps?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending on what's in your KML file, the resulting KML Layer can contain one or more additional layers. We touch on this in the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_aboutKML.html"&gt;Working with KML Layers conceptual help topic&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to reorder layers from a KML Layer, use the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/kmllayer.htm#getLayers"&gt;KMLLayer's getLayers method&lt;/A&gt;&lt;SPAN&gt;. Once you have the layers that make up your KMLLayer, you can reorder them using map.reorderLayer().&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 20:33:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262448#M24330</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-13T20:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262449#M24331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Depending on what's in your KML file, the resulting KML Layer can contain one or more additional layers. We touch on this in the &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_aboutKML.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Working with KML Layers conceptual help topic&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;If you need to reorder layers from a KML Layer, use the &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/kmllayer.htm#getLayers" rel="nofollow noopener noreferrer" target="_blank"&gt;KMLLayer's getLayers method&lt;/A&gt;. Once you have the layers that make up your KMLLayer, you can reorder them using map.reorderLayer().&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the response.&amp;nbsp; I tried getting the kml layers as noted in the above links but the array seems to be empty...&amp;nbsp; I tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;console.log(kml.getLayers);&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and got&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;function (){var _13=[];if(this._groundLyr){_13.push(this._groundLyr);}if(this._fLayers){_13=_13.concat(this._fLayers);}if(this._links){_4.forEach(this._links,function(_14){if(_14.declaredClass){_13.push(_14);}});}return _13;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I tried to get the length of the array with &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var kmlLayers = kml.getLayers();
console.log("KML Array Length ="+kmlLayers.length);&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and got&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;KML Array Length =0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I tried&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;console.log(kml.getLayers());&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and got an empty array []&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there are layers in the kml I can't get to them.&amp;nbsp; The kmlurl I am using to construct the kml layer is &lt;/SPAN&gt;&lt;A href="http://geocommons.com/overlays/11433.kml" rel="nofollow noopener noreferrer" target="_blank"&gt;http://geocommons.com/overlays/11433.kml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions would be appreciated.&amp;nbsp; In the meantime I will create a simple shape and export as kml in arcmap and see if I can get layers in that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262449#M24331</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2021-12-11T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262450#M24332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you running the console statements after the kml layer loads? Try something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dojo.connect(kml, "onLoad", function(kmlLayer) {
&amp;nbsp; console.log("Number of layers in kml layer: ", kmlLayer.getLayers().length);
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One other thing- your KML file is ~8MB. We recommend that you don't go over a couple of MB for performance reasons. For me, using JSFiddle, your layer takes 10-15 seconds to show up. Example:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://jsfiddle.net/swingley/JWqHv/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://jsfiddle.net/swingley/JWqHv/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262450#M24332</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-11T12:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262451#M24333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you running the console statements after the kml layer loads? Try something like:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dojo.connect(kml, "onLoad", function(kmlLayer) {
&amp;nbsp; console.log("Number of layers in kml layer: ", kmlLayer.getLayers().length);
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tips.&amp;nbsp; I now wait for the layer to load as above and I get 1 layer.&amp;nbsp; I still can't get the graphics layers on top of the kml layer.&amp;nbsp; It is like the kml layer refuses to reorder.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.connect(kml, 'onLoad', function(kmlLayers) {
&amp;nbsp; console.log("DEBUG: Loaded KML File");
&amp;nbsp; console.log("Number of Kml Layers "+kmlLayers.getLayers().length+" Layer ID = "+kmlLayers.id);
&amp;nbsp; console.log(kmlLayers.getLayers());
&amp;nbsp; map.reorderLayer(kmlLayers, 0);
&amp;nbsp; console.log("Graphics Layers "+map.graphicsLayerIds);
&amp;nbsp; console.log("Layers "+map.layerIds);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeilds this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Number of Kml Layers 1 Layer ID = layer1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Graphics Layers graphicsLayer3,graphicsLayer2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layers layer1,layer0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried putting it in position 1 and calling the layer kml in the reorder as well and it still stays on top.&amp;nbsp; I can reorder the two graphics layers fine but not the KML layer.&amp;nbsp; Any other thoughts on how to get KML layer under the graphics layers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an additional note when I expand the array in the console this is some of the information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;id: "graphicsLayer4"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;indexedFields: undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;infoTemplate: i&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isDataVersioned: undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layerId: undefined&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262451#M24333</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2021-12-11T12:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262452#M24334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're passing your kmlLayer object to map.reorderLayer(). To make this work, you have to pass the actual graphics layer or feature layer to reorderLayer. Here's a working example:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/swingley/BuPYY/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/swingley/BuPYY/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code there does the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-adds a graphics layer with a single graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-adds a kml layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-when the kml loads, get the layers that make up the kml layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-add a listener on the feature layer that makes up the kml layer's graphics onUpdate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-when onUpdate fires, reorder the layers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-disconnect the onUpdate listener after it fires once&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We need to wait for onUpdate because that fires once all the graphics are present.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 16:17:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262452#M24334</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-18T16:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262453#M24335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You're passing your kmlLayer object to map.reorderLayer(). To make this work, you have to pass the actual graphics layer or feature layer to reorderLayer. Here's a working example:&amp;nbsp; &lt;A href="http://jsfiddle.net/swingley/BuPYY/"&gt;http://jsfiddle.net/swingley/BuPYY/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;We need to wait for onUpdate because that fires once all the graphics are present.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Excellent.&amp;nbsp; It is now working and reordering fine.&amp;nbsp; I was not catching the difference between the kml Layer that I added and the graphics layer that was in the kml layer.&amp;nbsp; I was thinking that one layer was one in the same.&amp;nbsp; Thanks for the solution.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a side note, does esri have a different solution if we need these larger kml files?&amp;nbsp; I understand it will take longer to load but if we need the data there is not a way around the larger file.&amp;nbsp; If this is a separate thread that is fine but in case it is a quick explanation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 17:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262453#M24335</guid>
      <dc:creator>DanRicketts</dc:creator>
      <dc:date>2012-01-18T17:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262454#M24336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good stuff, glad it's working. It's a bit confusing but the JS API uses multiple layers to represent features from a KML file. This is necessary due to the diverse of types of features you can put in KML.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding large KML files:&amp;nbsp; ideally you would serve your large data sets using ArcGIS Server, probably as a dynamic map service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 18:24:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262454#M24336</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-18T18:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262455#M24337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are there any plans to correct this behavior? It seems like a bug to me. I need to support an arbitrary number and ordering of KML layers. I suppose I could devise a method for doing the post-load reordering, but it would be nice not to have to... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 11:30:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262455#M24337</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2013-05-06T11:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get layer orders displayed and layers in proper order</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262456#M24338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another thing that would be nice is a way to control the naming of the graphics layers that get created. We use the layerId's to display in a feature navigation widget, and it's confusing to see graphicsLayer8, etc. show up there. Is this possible or will it mess up the parentLayer.Refresh() functionality?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 13:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-layer-orders-displayed-and-layers-in/m-p/262456#M24338</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2013-05-06T13:00:27Z</dc:date>
    </item>
  </channel>
</rss>

