Hi All,I have a problem with the queryFeatures() method of the featureLayer.First of all i am using flex api 2.5The relevant code is: var points:Array = []; var tol:Number = Settings.Instance.Tolerance * mainMap.extent.width / mainMap.width / 2; var x:Number = event.mapPoint.x; var y:Number = event.mapPoint.y; var numPoints:int = 25; for (var i:int = 0; i < numPoints + 1; i++) // Add 1 extra point (last should equal first) { var p:MapPoint = new MapPoint(x - tol * (Math.sin(i / numPoints * 2 * Math.PI)), y + tol * Math.cos(i / numPoints * 2 * Math.PI), mainMap.spatialReference); points.push(p); } var q:Query = new Query(); q.geometry = new Polygon([ points ], mainMap.spatialReference); q.returnGeometry = false; q.outFields = [ fl.layerDetails.objectIdField]; var fl:FeatureLayer = Utils.featureLayerByName(mainMap, layerDef.layerName);//it's not null so it can find the featureLayer fl.addEventListener(FeatureLayerEvent.QUERY_FEATURES_COMPLETE, featureLayerQueryComplete); fl.queryFeatures(q, null);
The query works and i get the results i need but the problem is that the outfield and return geometry is ignored.So i get back all the fields from the query and it always gives back the geometry.The request that is being sent is:/ArcGIS/rest/services/chs/MapServer/35/query?f=json&geometryType=esriGeometryPolygon&outFields=*&geometry={%22rings%22%3A[[[41347.737278807894%2C397740.771314876]%2C[41314.83761335238%2C397736.61512058787]%2C[41284.00515487394%2C397724.40768669615]%2C[41257.177220132624%2C397704.91605116805]%2C[41236.03950693448%2C397679.364945149]%2C[41221.920175538806%2C397649.35983860056]%2C[41215.70639546447%2C397616.7860627182]%2C[41217.78860136622%2C397583.6903476386]%2C[41228.03596058944%2C397552.15221885784]%2C[41245.804593866975%2C397524.1533329962]%2C[41269.97803262154%2C397501.4529630251]%2C[41299.0373707925%2C397485.47745667596]%2C[41331.156703289795%2C397477.23061376653]%2C[41364.31785432599%2C397477.23061376653]%2C[41396.437186823285%2C397485.47745667596]%2C[41425.49652499425%2C397501.4529630251]%2C[41449.66996374881%2C397524.1533329962]%2C[41467.43859702635%2C397552.15221885784]%2C[41477.68595624957%2C397583.6903476386]%2C[41479.76816215132%2C397616.7860627182]%2C[41473.55438207698%2C397649.35983860056]%2C[41459.435050681306%2C397679.364945149]%2C[41438.29733748316%2C397704.91605116805]%2C[41411.469402741845%2C397724.40768669615]%2C[41380.63694426341%2C397736.61512058787]%2C[41347.737278807894%2C397740.771314876]]]}&returnGeometry=true&inSR=28992&spatialRel=esriSpatialRelIntersects&outSR=28992The return of that request is:{"displayFieldName":"ODB_NR","fieldAliases":{"ODB_NR":"ODB_NR","OBJECTID":"OBJECTID","NR":"NR","CODE":"CODE","COMPLEX":"COMPLEX","GEMEENTE":"GEMEENTE","PLAATS":"PLAATS","STRAAT":"STRAAT","POSTCODE":"POSTCODE","HUISNR":"HUISNR","TOEV":"TOEV","SITUERING":"SITUERING","LOCATIE":"LOCATIE","BEBKOM":"BEBKOM","NAAM":"NAAM","MSP":"MSP","WETSART":"WETSART","BOUWJAARVAN":"BOUWJAAR VAN","BOUWJAARTOT":"BOUWJAAR TOT","VERVALDAT":"VERVALDATUM","KERNDATUM":"KERNDATUM","PERIODEVAN":"PERIODE VAN","PERIODETOT":"PERIODE TOT","STATUS":"STATUS","COMPLEXID":"COMPLEXID","REPORTLINK":"REPORTLINK"},"geometryType":"esriGeometryPoint","spatialReference":{"wkid":28992},"features":[{"attributes":{"ODB_NR":"39103","OBJECTID":10619,"NR":39103,"CODE":"4493PE-00018-01","COMPLEX":"NEE","GEMEENTE":"NOORD-BEVELAND","PLAATS":"GEERSDIJK","STRAAT":"STEKELDIJK","POSTCODE":"4493PE","HUISNR":18,"TOEV" : null,"SITUERING" : null,"LOCATIE" : null,"BEBKOM" : null,"NAAM":"*","MSP":"Nee","WETSART":"Rijksmonument, Art.6/Ingeschreven","BOUWJAARVAN" : null,"BOUWJAARTOT" : null,"VERVALDAT" : null,"KERNDATUM" : null,"PERIODEVAN" : null,"PERIODETOT" : null,"STATUS":"PUBLIEK","COMPLEXID" : null,"REPORTLINK":"/reports/rwservlet?module=CHSMON50TPL.RDF+destype=cache+desformat=pdf+cmdkey=chsmon+RAPID=0+MONSOORT=RIJKSMON+MONNR=39103"},"geometry":{"x":41309,"y":397595}}]}As you can see the result is that all fields are being returned.Any ideas what i am doing wrong?