Select to view content in your preferred language

feature layer graphic provider

859
3
Jump to solution
04-23-2012 07:12 AM
MattGiles
Deactivated User
Why does featureLayer.graphicProvider only contain graphics of currently selected features? The same is not true for graphicsLayer.graphicProvider...

In the following code it will not enter the loop unless i do a selection beforehand...
var fl:FeatureLayer = obj.layer;            for each (var graphic:Graphic in fl.graphicProvider){       Alert.show("hello");      }


Can someone explain.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DasaPaddock
Esri Regular Contributor
Make sure it's loaded features first. You can use a tool like HttpFox to see if it's sending query requests and listen for updateEnd events before calling your method:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/Layer.html#event:updateEnd

View solution in original post

0 Kudos
3 Replies
DasaPaddock
Esri Regular Contributor
0 Kudos
MattGiles
Deactivated User
Ive tried both ON_DEMAND and SNAPSHOT modes and no go...
0 Kudos
DasaPaddock
Esri Regular Contributor
Make sure it's loaded features first. You can use a tool like HttpFox to see if it's sending query requests and listen for updateEnd events before calling your method:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/Layer.html#event:updateEnd
0 Kudos