Select to view content in your preferred language

Get features symbol

334
2
10-22-2013 08:19 AM
AndrzejMilosz
New Contributor
After querying feature layer I receive FeatureSet. I can get each graphic in FeatureSet. The problem is I can not get symbol of the graphics. It seems to be null. The piece of code is:

private function queryS():void {
    
      queryTaskMain.execute(queryMain, new AsyncResponder(onResult, onFault));
     
      function onResult(featureSet:FeatureSet, token:Object = null):void {
      
            for each(var graphic : Graphic in featureSet.features) {

                          symbs.push(graphic.symbol);
             }  
       }
}


I receive nulls in Array. Is this a correct way to get feature's symbols?
Tags (2)
0 Kudos
2 Replies
Drew
by
Regular Contributor
If you have not defined the symbol, the symbol property will be null.
Your going to have to set it first to your desired symbol (depending on the geometry)

more information on the types of symbols.
https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/symbols/package-detail.html

Drew
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos