| Package | com.esri.ags.tasks |
| Class | public class Query |
The text property will search the display field of your layer, it is a short hand for a where clause of:
where YourDisplayField like '%SearchText%'.
var query:Query = new Query(); query.where = "STATE_NAME = 'Alaska' AND TYPE = 'city'"; query.returnGeometry = true; query.outFields = ["CITY_NAME","AGE_UNDER5","AGE_5_17","AGE_18_64","AGE_65_UP"];
See also
| Property | Defined by | ||
|---|---|---|---|
| geometry : Geometry
The geometry to apply to the spatial filter.
| Query | ||
| outFields : Array
Attribute fields to include in the FeatureSet.
| Query | ||
| outSpatialReference : SpatialReference
The well-known ID of the spatial reference for the returned geometry.
| Query | ||
| returnGeometry : Boolean
If
true, each feature in the FeatureSet includes the geometry. | Query | ||
| spatialRelationship : String = "esriSpatialRelIntersects"
The spatial relationship to be applied on the input geometry while performing the query.
| Query | ||
| text : String
Shorthand for a literal search text on the display field, equivalent to:
where YourDisplayField like '%SearchText%'. | Query | ||
| where : String
A where clause for the query.
| Query | ||
| Constant | Defined by | ||
|---|---|---|---|
| SPATIAL_REL_CONTAINS : String = "esriSpatialRelContains" [static]
Part or all of a feature from feature class 1 is contained within a feature from feature class 2.
| Query | ||
| SPATIAL_REL_CROSSES : String = "esriSpatialRelCrosses" [static]
The feature from feature class 1 crosses a feature from feature class 2.
| Query | ||
| SPATIAL_REL_ENVELOPEINTERSECTS : String = "esriSpatialRelEnvelopeIntersects" [static]
The envelope of feature class 1 intersects with the envelope of feature class 2.
| Query | ||
| SPATIAL_REL_INDEXINTERSECTS : String = "esriSpatialRelIndexIntersects" [static]
The envelope of the query feature class intersects the index entry for the target feature class.
| Query | ||
| SPATIAL_REL_INTERSECTS : String = "esriSpatialRelIntersects" [static]
Part of a feature from feature class 1 is contained in a feature from feature class 2.
| Query | ||
| SPATIAL_REL_OVERLAPS : String = "esriSpatialRelOverlaps" [static]
Features from feature class 1 overlap features in feature class 2.
| Query | ||
| SPATIAL_REL_TOUCHES : String = "esriSpatialRelTouches" [static]
The feature from feature class 1 touches the border of a feature from feature class 2.
| Query | ||
| SPATIAL_REL_WITHIN : String = "esriSpatialRelWithin" [static]
The feature from feature class 1 is completely enclosed by the feature from feature class 2.
| Query | ||
| geometry | property |
public var geometry:GeometryThe geometry to apply to the spatial filter. The spatial relationship as specified by spatialRelationship is applied to this geometry while performing the query. The valid geometry types are Extent, MapPoint, Multipoint, Polyline, or Polygon.
See also
| outFields | property |
public var outFields:Array
Attribute fields to include in the FeatureSet.
Fields must exist in the map layer.
You must list the actual field names rather than the alias names.
Returned fields are also the actual field names.
However, you are able to use the alias names when you display the results.
For optimal performance, limit the output fields to only those you expect to use.
Each query must have access to the Shape and Objectid fields for a layer, but your list
of fields does not need to include these two fields.
To return all fields, specify the wildcard "*" as the value of this parameter.
In this case, the query results include all the field values.
Note that the wildcard also implicitly implies returnGeometry=true and setting returnGeometry to false will have no effect.
myQuery.outFields = ["CITY_NAME","AGE_UNDER5","AGE_5_17","AGE_18_64","AGE_65_UP"];
myQuery.outFields = ["*"];| outSpatialReference | property |
public var outSpatialReference:SpatialReferenceThe well-known ID of the spatial reference for the returned geometry. If not specified, the geometry is returned in the spatial reference of the map.
| returnGeometry | property |
public var returnGeometry:Boolean
If true, each feature in the FeatureSet includes the geometry.
Since the geometry makes up a significant portion of the response, only use when you plan to use the geometry of the feature, for example, to include them on a map.
By default, this is false.
| spatialRelationship | property |
public var spatialRelationship:String = "esriSpatialRelIntersects"The spatial relationship to be applied on the input geometry while performing the query. See constants below for possible input values.
The default value is SPATIAL_REL_INTERSECTS.
See also
| text | property |
public var text:String
Shorthand for a literal search text on the display field, equivalent to:
where YourDisplayField like '%SearchText%'.
The search text is case sensitive.
This parameter is ignored if the where parameter is specified.
You can determine what the display field is for a layer using the ArcGIS Services Directory.
| where | property |
public var where:String
A where clause for the query.
Any legal SQL where clause operating on the fields in the layer is allowed, for example:
query.where = "POP2000 > 350000".
| SPATIAL_REL_CONTAINS | constant |
public static const SPATIAL_REL_CONTAINS:String = "esriSpatialRelContains"Part or all of a feature from feature class 1 is contained within a feature from feature class 2.
| SPATIAL_REL_CROSSES | constant |
public static const SPATIAL_REL_CROSSES:String = "esriSpatialRelCrosses"The feature from feature class 1 crosses a feature from feature class 2.
| SPATIAL_REL_ENVELOPEINTERSECTS | constant |
public static const SPATIAL_REL_ENVELOPEINTERSECTS:String = "esriSpatialRelEnvelopeIntersects"The envelope of feature class 1 intersects with the envelope of feature class 2.
| SPATIAL_REL_INDEXINTERSECTS | constant |
public static const SPATIAL_REL_INDEXINTERSECTS:String = "esriSpatialRelIndexIntersects"The envelope of the query feature class intersects the index entry for the target feature class.
| SPATIAL_REL_INTERSECTS | constant |
public static const SPATIAL_REL_INTERSECTS:String = "esriSpatialRelIntersects"Part of a feature from feature class 1 is contained in a feature from feature class 2.
| SPATIAL_REL_OVERLAPS | constant |
public static const SPATIAL_REL_OVERLAPS:String = "esriSpatialRelOverlaps"Features from feature class 1 overlap features in feature class 2.
| SPATIAL_REL_TOUCHES | constant |
public static const SPATIAL_REL_TOUCHES:String = "esriSpatialRelTouches"The feature from feature class 1 touches the border of a feature from feature class 2.
| SPATIAL_REL_WITHIN | constant |
public static const SPATIAL_REL_WITHIN:String = "esriSpatialRelWithin"The feature from feature class 1 is completely enclosed by the feature from feature class 2.