Hi,I can't seem to get FeatureLayer.queryFeatures() working... Here' s my code (stripped down to the essentials):var q:Query=new Query();
q.geometry=new Polygon([points], mainMap.spatialReference); // this is a small buffer around a clicked point
q.returnGeometry=false;
var fl:FeatureLayer=GetMyFeatureLayer();
fl.outFields=["*"]
fl.useAMF=false;
fl.addEventListener(FeatureLayerEvent.QUERY_FEATURES_COMPLETE, featureLayerQueryComplete);
fl.queryFeatures(q, null);
When the query is executed I use Firebug to examine the actual request. This tells me that
- Outfields is set correctly, also if I specify a subsets of fields, e.g. ["field1", "field2"]
- returnGeometry is always set to true, even if I set it to false
- All requested field values are returned
When I examine the result values in the featureLayerQueryComplete event handler, only the objectid and the display field attributes are set.private function featureLayerQueryComplete(event:FeatureLayerEvent):void
{
var feature:Graphic=event.featureSet.features[0];
Why can't I set returnGeometry to false?Why are some fields not populated?