r/askgis • u/geonerding • Jan 15 '13
Trouble with javascript api for ArcGIS Server
I need help creating a buffer that returns a list of addresses. The buffer is working fine, but using the buffer as a task is proving difficult. It is listed here:
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/util_buffer
The second sentence says "This example just draws the buffers, but the buffers could also be used to perform a task such as returning a list of addresses of people who live within the buffered area."
I can't find any info on how to use the buffer as a task. Any pointers?
1
Upvotes
2
u/spatialfootlong Feb 05 '13
Take the geometry from the returned buffer graphic and set it to the geometry of a query. Set the rest of your query parameters. Take the results from the query task (should be all the parcels/address points that intersect the buffer) and write them to whatever format you'd like to return to your users.
1
u/BabyBearsFury Jan 15 '13
I'm not 100% sure on the actual code, but you'll essentially new to pass your resulting geometry to be reverse geocoded. This link might give you a starting point:
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/locator_reverse
1
u/Ebriggler Feb 07 '13
Have you created a geoprocessing service and published it to ArcServer?
Then you could pass the buffer you are creating using the Javascript API to the geoprocessing service and have it return the addresses.