... this.query.returnGeometry = true; this.query.where = "NUM_RESERVAT_AARE="+id; this.query.outFields=['*']; this.queryTask.execute(this.query, function (results){ if (results.features.length){ areainfluencia.geometry = results.features[0].geometry; } }
.... if (areainfluencia.geometry != null){ selectQuery.geometry = areainfluencia.geometry; } myFeatureLayer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW);
query.where = "ID IN(SELECT A.ID FROM TABLE_POINT A, TABLE POLYGON B WHERE SDE.ST_INTERSECTS(A.SHAPE, B.SHAPE) = 1 AND B.ID_POLYGON = " + ID_POLYGON + ")"