<?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: [4.10] How to reliably to determine that KMLLayer is loaded with features? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432363#M39836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Does the loaded property not work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2019 20:09:14 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2019-03-25T20:09:14Z</dc:date>
    <item>
      <title>[4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432362#M39835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried using the "layerview-create" &amp;nbsp;to parse for visible points?&lt;/P&gt;&lt;P&gt;I couldn't see them unless I put some long delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt; let layer = new KMLLayer({ url: "http://quickmap.dot.ca.gov/data/lcs.kml" }); layer.on("layerview-create", event =&amp;gt; { &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp; let layerView = event.layerView; &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp; layerView.when(()=&amp;gt;{ &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; let allVisiblePoints = layerview.allVisiblePoints;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp; &amp;nbsp; debugger;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp; }); &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;}) &lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 18:59:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432362#M39835</guid>
      <dc:creator>JamesTruong</dc:creator>
      <dc:date>2019-03-25T18:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432363#M39836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Does the loaded property not work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 20:09:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432363#M39836</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-03-25T20:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432364#M39837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like with that service, the KML is defined with Icon images, but I think the URLs are invalid now. I get timeouts for images like &lt;EM&gt;&lt;A class="unlinked"&gt;https://quickmap.dot.ca.gov/img/lcs-32x32.png&lt;/A&gt;&lt;/EM&gt;. Once the requests timeout, the API falls back to using regular markers for the symbols instead of the image style URLs in the KML. This is why it takes time for the markers to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: The non-https URL works, but we make all requests over https now. If that subdomain had https enabled, then everything should work as normal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 20:41:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432364#M39837</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2019-03-25T20:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432365#M39838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The kml file was from the example snippet in KMLLayer documentation.&lt;/P&gt;&lt;P&gt;I don't think it ever worked since 4.10 since that sample kml does not enable https and its cors headers are not available.&lt;/P&gt;&lt;P&gt;About the API fallback, it doesn't work if my site hosted using https. On http, it shows them as black dots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try &lt;A class="link-titled" href="http://developers.google.com/kml/documentation/KML_Samples.kml" title="http://developers.google.com/kml/documentation/KML_Samples.kml"&gt;http://developers.google.com/kml/documentation/KML_Samples.kml&lt;/A&gt;&amp;nbsp; instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inspecting the &lt;CODE&gt;layerview.allVisiblePoints&lt;/CODE&gt;, it is empty unless I look again like 4-5 seconds later via setTimeout&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 21:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432365#M39838</guid>
      <dc:creator>JamesTruong</dc:creator>
      <dc:date>2019-03-25T21:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432366#M39839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see now! You need to wait for the LayerView to finish updating.&lt;/P&gt;&lt;P&gt;You can do that like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;whenLayerView&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerView&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  watchUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;whenFalseOnce&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerView&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"updating"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;allVisiblePoints&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the LayerViews have the same behavior. Once they are created they still need to fetch the data so might not be done when you first get it. You can refer to this sample.&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query/index.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query/index.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432366#M39839</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-11T19:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432367#M39840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that didn't work.&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without using the console.log, the layerview.allVisiblePoint, the collection is still empty&lt;/P&gt;&lt;P&gt;The console.log is almost equivalent to using setTimeout as in chrome debugger, I have to manually expand to see the values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 21:57:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432367#M39840</guid>
      <dc:creator>JamesTruong</dc:creator>
      <dc:date>2019-03-25T21:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432368#M39841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got a repro now. This might be a bug, I'll get it to the team, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 22:06:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432368#M39841</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2019-03-25T22:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: [4.10] How to reliably to determine that KMLLayer is loaded with features?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432369#M39842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 22:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-10-how-to-reliably-to-determine-that-kmllayer-is/m-p/432369#M39842</guid>
      <dc:creator>JamesTruong</dc:creator>
      <dc:date>2019-03-25T22:07:24Z</dc:date>
    </item>
  </channel>
</rss>

