<?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 How to detect if a layer was draw completely? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-detect-if-a-layer-was-draw-completely/m-p/68362#M5986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a feature layer with many features, and when I load on map viewer (Portal for Arcgis), I receive a message that 'Layer did not draw completely'. This is ok, because this layer don't have any visible range configured and have many features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, when I try to use this feature layer on ArcGIS API for Javascript, the layer don't draw completely too, but I don't know how detect if this layer was draw completely or not (to show a message for the user).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tried the 'update-end' event of feature layer, but this event don't show any error, even when the layer was not draw completely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;var featureLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fserver%2Facgis%2Frest%2Fservices%2FServiceTest%2FFeatureServer%2F0" target="_blank"&gt;http://server/acgis/rest/services/ServiceTest/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;
&amp;nbsp; mode: FeatureLayer.MODE_ONDEMAND,
&amp;nbsp; outFields: ["*"]
});


featureLayer.on("update-end", function(e) {
&amp;nbsp; console.log(e);
});


map.addLayer(featureLayer);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:37:15 GMT</pubDate>
    <dc:creator>RobertoOliveira</dc:creator>
    <dc:date>2021-12-10T22:37:15Z</dc:date>
    <item>
      <title>How to detect if a layer was draw completely?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-detect-if-a-layer-was-draw-completely/m-p/68362#M5986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a feature layer with many features, and when I load on map viewer (Portal for Arcgis), I receive a message that 'Layer did not draw completely'. This is ok, because this layer don't have any visible range configured and have many features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, when I try to use this feature layer on ArcGIS API for Javascript, the layer don't draw completely too, but I don't know how detect if this layer was draw completely or not (to show a message for the user).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tried the 'update-end' event of feature layer, but this event don't show any error, even when the layer was not draw completely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;var featureLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fserver%2Facgis%2Frest%2Fservices%2FServiceTest%2FFeatureServer%2F0" target="_blank"&gt;http://server/acgis/rest/services/ServiceTest/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;
&amp;nbsp; mode: FeatureLayer.MODE_ONDEMAND,
&amp;nbsp; outFields: ["*"]
});


featureLayer.on("update-end", function(e) {
&amp;nbsp; console.log(e);
});


map.addLayer(featureLayer);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-detect-if-a-layer-was-draw-completely/m-p/68362#M5986</guid>
      <dc:creator>RobertoOliveira</dc:creator>
      <dc:date>2021-12-10T22:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect if a layer was draw completely?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-detect-if-a-layer-was-draw-completely/m-p/68363#M5987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I founded (I think):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This information was not on 'error' property, but in 'info' property!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;featureLayer.on("update-end", function(e) {
&amp;nbsp; if (e != undefined &amp;amp;&amp;amp; e.info != undefined &amp;amp;&amp;amp; e.info.queryLimitExceeded) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("Layer did not draw completely");
&amp;nbsp; }
});&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#events" title="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#events" rel="nofollow noopener noreferrer" target="_blank"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript&lt;/A&gt;, on update-end event, the Event Object has a '&lt;STRONG&gt;error&lt;/STRONG&gt;' property and a '&lt;STRONG&gt;info&lt;/STRONG&gt;' property, and looking at documentation, the info property has the following information:&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 Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; background-color: #fafafa;"&gt;Optional object that may have a boolean &lt;/SPAN&gt;&lt;STRONG&gt;&lt;CODE&gt;queryLimitExceeded&lt;/CODE&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; background-color: #fafafa;"&gt; property. &lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;CODE&gt;queryLimitExceeded&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; background-color: #fafafa;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt; will be true if the feature layer could not draw all features&lt;/STRONG&gt;&lt;/SPAN&gt; due to a &lt;/SPAN&gt;&lt;CODE&gt;maxRecordCount&lt;/CODE&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; background-color: #fafafa;"&gt; limitation on the query operation. &lt;/SPAN&gt;&lt;EM style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px;"&gt;As of v2.8&lt;/EM&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>Fri, 10 Dec 2021 22:37:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-detect-if-a-layer-was-draw-completely/m-p/68363#M5987</guid>
      <dc:creator>RobertoOliveira</dc:creator>
      <dc:date>2021-12-10T22:37:17Z</dc:date>
    </item>
  </channel>
</rss>

