<?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: Loop through features in FeatureLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527864#M49215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The Docs are still incomplete and in Beta as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2016 20:07:55 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-03-15T20:07:55Z</dc:date>
    <item>
      <title>Loop through features in FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527861#M49212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I loop through all the features in a FeatureLayer and get/set their attributes in v4 ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 18:33:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527861#M49212</guid>
      <dc:creator>MarcBate</dc:creator>
      <dc:date>2016-03-10T18:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through features in FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527862#M49213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can get the graphics from the layers view:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// Carbon storage of trees in Warren Wilson College.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayer = new FeatureLayer({
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fservices.arcgis.com%2FV6ZHFr6zdgNZuVG0%2Farcgis%2Frest%2Fservices%2FLandscape_Trees%2FFeatureServer%2F0" target="_blank"&gt;https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.on("layer-view-create", function(evt){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //The LayerView for the layer that emitted this event
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.info(evt.layerView);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The layerView has a graphics property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But be aware of this note in the docs:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In this version of the API, geometries and attributes of features in a FeatureLayer cannot be added, deleted, or edited.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527862#M49213</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T22:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through features in FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527863#M49214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. That worked.&amp;nbsp; I didn't see graphics as a property of LayerView in the beta 3 API reference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 20:06:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527863#M49214</guid>
      <dc:creator>MarcBate</dc:creator>
      <dc:date>2016-03-15T20:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through features in FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527864#M49215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The Docs are still incomplete and in Beta as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 20:07:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527864#M49215</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-15T20:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through features in FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527865#M49216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #cc7832; font-weight: bold;"&gt;var &lt;/SPAN&gt;layerView = &lt;SPAN style="color: #9876aa;"&gt;view&lt;/SPAN&gt;.getLayerView(layer)&lt;SPAN style="color: #cc7832;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832; font-weight: bold;"&gt;if &lt;/SPAN&gt;(&lt;SPAN style="color: #cc7832; font-weight: bold;"&gt;typeof &lt;/SPAN&gt;layerView !== &lt;SPAN style="color: #6a8759;"&gt;"undefined"&lt;/SPAN&gt;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; layerView.&lt;SPAN style="color: #9876aa;"&gt;graphics&lt;/SPAN&gt;.&lt;SPAN style="color: #ffc66d;"&gt;forEach&lt;/SPAN&gt;(&lt;SPAN style="color: #cc7832; font-weight: bold;"&gt;function&lt;/SPAN&gt;(graphic) {&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //code here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp; })&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 20:08:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-features-in-featurelayer/m-p/527865#M49216</guid>
      <dc:creator>MarcBate</dc:creator>
      <dc:date>2016-03-15T20:08:54Z</dc:date>
    </item>
  </channel>
</rss>

