Skip to content

Commit 39b7501

Browse files
committed
update the Attributes Tables README to correct the queryOptions.
1 parent 599aa34 commit 39b7501

File tree

1 file changed

+69
-64
lines changed

1 file changed

+69
-64
lines changed

widgets/AttributesTable/README.md

+69-64
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ define({
9393
// other instances of attributes table
9494
topicID: 'query',
9595

96-
// parameters for the query
97-
queryParameters: {
98-
// the layer ID and sublayer ID from a layer in your map.
99-
// alternatively you can provide a url to the MapService.
100-
layerID: 'parcels',
101-
sublayerID: 0
96+
queryOptions: {
97+
// parameters for the query
98+
queryParameters: {
99+
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/4',
100+
maxAllowableOffset: 100,
101+
where: 'STATE_FIPS = \'06\' OR STATE_FIPS = \'08\''
102+
},
103+
idProperty: 'ObjectID'
102104
}
103105
}
104106
}
@@ -129,82 +131,85 @@ growl: {
129131
---
130132
##Query Options
131133
``` javascript
132-
queryParameters: {
133-
/*
134-
What type of query:
134+
queryOptions:
135+
// parameters for the query
136+
queryParameters: {
137+
/*
138+
What type of query:
135139
136-
* spatial - search spatial features (FeatureService or layer in MapService)
140+
* spatial - search spatial features (FeatureService or layer in MapService)
137141
138-
* relationship - search records related to spatial features
142+
* relationship - search records related to spatial features
139143
140-
* table - search a non-spatial table. This displays records in the grid but not on the map.
144+
* table - search a non-spatial table. This displays records in the grid but not on the map.
141145
142-
(An additional type `database` will be supported in the future)
143-
*/
144-
type: 'spatial',
146+
(An additional type `database` will be supported in the future)
147+
*/
148+
type: 'spatial',
145149

146-
/*
147-
Default Spatial Reference
148-
*/
149-
outputSpatialReference: 4326,
150+
/*
151+
Default Spatial Reference
152+
*/
153+
outputSpatialReference: 4326,
150154

151-
/*
152-
AGS REST URL to Query
153-
default is null
154-
*/
155-
url: null,
155+
/*
156+
AGS REST URL to Query
157+
default is null
158+
*/
159+
url: null,
156160

157-
/*
158-
If no url provided and the layerID/sublayerID is passed,
159-
the url of the layer will be retrieved from the map.
160-
*/
161-
layerID: null,
162-
sublayerID: null,
161+
/*
162+
If no url provided and the layerID/sublayerID is passed,
163+
the url of the layer will be retrieved from the map.
164+
*/
165+
layerID: null,
166+
sublayerID: null,
167+
168+
/*
169+
Attribute fields to include in the FeatureSet.
170+
default ['*] - returns all fields
171+
*/
172+
outFields: ['*'],
173+
174+
/*
175+
A where clause for the query. default returns all records
176+
*/
177+
where: '1=1',
178+
179+
/*
180+
The geometry to apply to the spatial filter.
181+
*/
182+
geometry: null,
183+
184+
spatialRelationship: Query.SPATIAL_REL_INTERSECTS
185+
186+
},
163187

164188
/*
165-
Attribute fields to include in the FeatureSet.
166-
default ['*] - returns all fields
189+
Provide the url if there is a spatial query linked from a table or database query
167190
*/
168-
outFields: ['*'],
191+
linkedQuery: {
192+
url: null,
193+
idProperty: null,
194+
ids: [] // if linkedQuery, then store the linkedIDs for use in linked query
195+
},
169196

170197
/*
171-
A where clause for the query. default returns all records
198+
Allow a buffer to be performed before a spatial query and then use the buffer geometry in the query
199+
if showOnly = true, the buffer is displayed but the query is not run
172200
*/
173-
where: '1=1',
201+
bufferParameters: {
202+
distance: null,
203+
unit: null,
204+
showOnly: false
205+
},
174206

175207
/*
176-
The geometry to apply to the spatial filter.
208+
default Unique ID
177209
*/
178-
geometry: null,
179-
180-
spatialRelationship: Query.SPATIAL_REL_INTERSECTS
210+
idProperty: 'FID'
181211

182212
},
183-
184-
/*
185-
Provide the url if there is a spatial query linked from a table or database query
186-
*/
187-
188-
linkedQuery: {
189-
url: null,
190-
idProperty: null,
191-
ids: [] // if linkedQuery, then store the linkedIDs for use in linked query
192-
},
193-
194-
/*
195-
Allow a buffer to be performed before a spatial query and then use the buffer geometry in the query
196-
if showOnly = true, the buffer is displayed but the query is not run
197-
*/
198-
bufferParameters: {
199-
distance: null,
200-
unit: null,
201-
showOnly: false
202-
},
203-
204-
/*
205-
default Unique ID
206-
*/
207-
idProperty: 'FID',
208213
```
209214

210215

0 commit comments

Comments
 (0)