<?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 Loop through FeatureLayer setDefinitionExpression results in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267661#M24714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a FeatureServer service with the FeatureLayer set to MODE_SNAPSHOT.&amp;nbsp;&amp;nbsp; After doing a setdefinitionsexpression, the map updates itself to only show those features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I now want to be able to loop through these newly identified features and label each one with some custom text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is how does one loop through them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;featureLayerpoint = new esri.layers.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://xyz/webadaptor_test/rest/services/TIPdataonly/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://xyz/webadaptor_test/rest/services/TIPdataonly/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;", {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoTemplate: popupTemplate,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; outFields: ["*"] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;......&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(featureLayerpoint);&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featureLayerpoint.setDefinitionExpression(setdefinitionstring);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AT this point the map is updated.....how do I now work with the contents of the featureLayerpoint?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Mar 2013 18:12:47 GMT</pubDate>
    <dc:creator>p_thibault</dc:creator>
    <dc:date>2013-03-18T18:12:47Z</dc:date>
    <item>
      <title>Loop through FeatureLayer setDefinitionExpression results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267661#M24714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a FeatureServer service with the FeatureLayer set to MODE_SNAPSHOT.&amp;nbsp;&amp;nbsp; After doing a setdefinitionsexpression, the map updates itself to only show those features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I now want to be able to loop through these newly identified features and label each one with some custom text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is how does one loop through them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;featureLayerpoint = new esri.layers.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://xyz/webadaptor_test/rest/services/TIPdataonly/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://xyz/webadaptor_test/rest/services/TIPdataonly/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;", {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; infoTemplate: popupTemplate,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; outFields: ["*"] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;......&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(featureLayerpoint);&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featureLayerpoint.setDefinitionExpression(setdefinitionstring);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AT this point the map is updated.....how do I now work with the contents of the featureLayerpoint?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 18:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267661#M24714</guid>
      <dc:creator>p_thibault</dc:creator>
      <dc:date>2013-03-18T18:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through FeatureLayer setDefinitionExpression results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267662#M24715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;featureLayerpoint.graphics &lt;/STRONG&gt;&lt;SPAN&gt;will give you a pointer to the features in that layer. See &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/featurelayer.html#FeatureLayer/graphics"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/featurelayer.html#FeatureLayer/graphics&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 22:45:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267662#M24715</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-03-18T22:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through FeatureLayer setDefinitionExpression results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267663#M24716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also, is there a reason you don't set the definition expression before adding it to the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll probably want to work with the data in the layer within the map's onLayerAdd event. If you try immediately after the map.addLayer then you won't get anything.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 13:34:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267663#M24716</guid>
      <dc:creator>MattLane</dc:creator>
      <dc:date>2013-03-19T13:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through FeatureLayer setDefinitionExpression results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267664#M24717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the set definition is done afterward to allow the users to "sort" through data and see only their matches.&amp;nbsp; So with a drop down menu they can find all the point that are related to certain government departments.&amp;nbsp; This part works well. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still can not find a way to loop through the contents of featurePointlayer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I should be able to with the graphic... when I do a tooltip evt on them, I can retrieve the attributes...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; var tipContent = "&amp;lt;b&amp;gt;PIN&amp;lt;/b&amp;gt;: " + evt.graphic.attributes.PIN ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am just having a very brain-dead moment!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 15:08:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-through-featurelayer-setdefinitionexpression/m-p/267664#M24717</guid>
      <dc:creator>p_thibault</dc:creator>
      <dc:date>2013-03-19T15:08:28Z</dc:date>
    </item>
  </channel>
</rss>

