<?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: FeatureLayer takes a long time to Load in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594113#M55639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Could it be because of the file size of the layer? There are a lot of fields in the layer.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While there are a lot of fields, you're doing the right thing in terms of limiting them to just the ones you need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

var ftrLyr = new esri.layers.FeatureLayer(result,{
&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
&lt;STRONG&gt;&amp;nbsp; outFields: ["NAME","STATE_NAME"]
&lt;/STRONG&gt;});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the problem is due to the size of the layer - the soil layer is about 2Mb in size, which will take a while to download.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the full scale, you're showing hundreds of tiny polygons which are too small to discern anyway. Is it an option to generalize the layer, and show States rather than Counties (or whatever) at this scale? Then show the more detailed polygons when you zoom in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also try using a Dynamic or Tiled layer - there's nothing in your application which seems to require a Feature layer, which involves downloading the actual vectors to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:31:09 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2021-12-12T01:31:09Z</dc:date>
    <item>
      <title>FeatureLayer takes a long time to Load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594112#M55638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using dijit.form.Select to load featureLayers as per the user selection in the Select box. I am able to successfully load the featureLayer but it takes really long for the Layer to be displayed (around 20+ sec).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea how I can reduce the this time? This is my &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://msgist2011.grd.arizona.edu/project/tp_dock.html" rel="nofollow" target="_blank"&gt;application&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the docked floating pane name "Mapping the Data". When the floating pane opens, change the selection of the Select Combo Box. You will see another select box appear. Select any layer (lyr 0/1/2) and you will see that it takes a bit of time before it appears.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could it be because of the file size of the layer? There are a lot of fields in the layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 15:41:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594112#M55638</guid>
      <dc:creator>SmaranHarihar</dc:creator>
      <dc:date>2012-10-31T15:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer takes a long time to Load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594113#M55639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Could it be because of the file size of the layer? There are a lot of fields in the layer.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While there are a lot of fields, you're doing the right thing in terms of limiting them to just the ones you need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

var ftrLyr = new esri.layers.FeatureLayer(result,{
&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
&lt;STRONG&gt;&amp;nbsp; outFields: ["NAME","STATE_NAME"]
&lt;/STRONG&gt;});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the problem is due to the size of the layer - the soil layer is about 2Mb in size, which will take a while to download.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the full scale, you're showing hundreds of tiny polygons which are too small to discern anyway. Is it an option to generalize the layer, and show States rather than Counties (or whatever) at this scale? Then show the more detailed polygons when you zoom in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also try using a Dynamic or Tiled layer - there's nothing in your application which seems to require a Feature layer, which involves downloading the actual vectors to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:31:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594113#M55639</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-12T01:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer takes a long time to Load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594114#M55640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;While there are a lot of fields, you're doing the right thing in terms of limiting them to just the ones you need.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

var ftrLyr = new esri.layers.FeatureLayer(result,{
&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
&lt;STRONG&gt;&amp;nbsp; outFields: ["NAME","STATE_NAME"]
&lt;/STRONG&gt;});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I think the problem is due to the size of the layer - the soil layer is about 2Mb in size, which will take a while to download.&lt;BR /&gt;&lt;BR /&gt;At the full scale, you're showing hundreds of tiny polygons which are too small to discern anyway. Is it an option to generalize the layer, and show States rather than Counties (or whatever) at this scale? Then show the more detailed polygons when you zoom in.&lt;BR /&gt;&lt;BR /&gt;You could also try using a Dynamic or Tiled layer - there's nothing in your application which seems to require a Feature layer, which involves downloading the actual vectors to the client.&lt;BR /&gt;&lt;BR /&gt;Steve&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply Steve. Initially I did think of using the Dynamic layer but the Soil, Climate that you are seeing are the MXDs and the FeatureLayer is being used for the Layers within it. If I try to use Dynamic layer it gives me a error and I am not able to load it. What I am saying is that if I wish to use Dynamic Layer, doesn't the url need to be &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;http://domain/arcgis/rest/services/Soil/MapServer&lt;/PRE&gt;&lt;SPAN&gt; but I need to use &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;http://domain/arcgis/rest/services/Soil/MapServer/1 or 2 or 3&lt;/PRE&gt;&lt;SPAN&gt; and that gives me a error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to use Dynamic Layer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:31:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594114#M55640</guid>
      <dc:creator>SmaranHarihar</dc:creator>
      <dc:date>2021-12-12T01:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer takes a long time to Load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594115#M55641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it possible to use Dynamic Layer?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm#visibleLayers" rel="nofollow noopener noreferrer" target="_blank"&gt;visibleLayers&lt;/A&gt;&lt;SPAN&gt; property. You'd use something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var educationLayer = &lt;SPAN style="color: #000088; font-family: monospace;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; esri&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;layers&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;ArcGISDynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;
&lt;SPAN style="color:#999999;"&gt;&lt;SPAN&gt;&amp;nbsp; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Demographics/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Demographics/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#000000;"&gt;
&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color:#000000;"&gt;visibleLayers&lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color:#000088;"&gt;[0]&lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;}
);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in order to create a dynamic layer showing only the education (layer 0) dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps try modifying one of the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/samples/map_twodynamic/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;sample dynamic maps&lt;/A&gt;&lt;SPAN&gt; with your own data to verify that it works. Ensure that you include a reference to dynamic layers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#000000;"&gt;dojo&lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color:#000088;"&gt;require&lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color:#999999;"&gt;"esri.layers.agsdynamic"&lt;/SPAN&gt;&lt;SPAN style="color:#666600;"&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594115#M55641</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-12T01:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer takes a long time to Load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594116#M55642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry Steven i thought that would work but it seems to be failing. here is the updated app &lt;/SPAN&gt;&lt;A href="http://msgist2011.grd.arizona.edu/project/tp_dock.html" rel="nofollow"&gt;link&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting this error &lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;CustomError: Error in protected function: !283&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 01:21:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594116#M55642</guid>
      <dc:creator>SmaranHarihar</dc:creator>
      <dc:date>2012-11-01T01:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer takes a long time to Load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594117#M55643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( &amp;nbsp; "http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Demographics/MapServer", &amp;nbsp; {visibleLayers: [0]} );&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Steve&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to get it working making the following changes,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var educationLayer = new esri.layers.ArcGISDynamicMapServiceLayer( &amp;nbsp; "http://domain/ArcGIS/rest/services/webGIS/Demographics/MapServer" ); educationLayer.setVisibleLayers([0]);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2012 16:35:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-takes-a-long-time-to-load/m-p/594117#M55643</guid>
      <dc:creator>SmaranHarihar</dc:creator>
      <dc:date>2012-11-04T16:35:45Z</dc:date>
    </item>
  </channel>
</rss>

