pthibault

Loop through FeatureLayer setDefinitionExpression results

Discussion created by pthibault on Mar 18, 2013
Latest reply on Mar 19, 2013 by pthibault
I am using a FeatureServer service with the FeatureLayer set to MODE_SNAPSHOT.   After doing a setdefinitionsexpression, the map updates itself to only show those features.

However, I now want to be able to loop through these newly identified features and label each one with some custom text.

My question is how does one loop through them?


.....
featureLayerpoint = new esri.layers.FeatureLayer("http://xyz/webadaptor_test/rest/services/TIPdataonly/FeatureServer/0", {         
mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,         
infoTemplate: popupTemplate,        
outFields: ["*"]
  });
......
map.addLayer(featureLayerpoint);  
.....
featureLayerpoint.setDefinitionExpression(setdefinitionstring);

AT this point the map is updated.....how do I now work with the contents of the featureLayerpoint?

Outcomes