Geoenrichment - Sample - Multiple Ring or Drive Time Report?

2720
1
03-31-2014 04:19 PM
AmyWright_Webber
New Contributor III
Hello,

I am attempting to request a report with a multiple ring buffer or drive time depending on user selection.  If I submit the request with an array holding a single value, everything works perfectly. 

However if I submit an array of 3 numerical values (as I could with the BAO API), then I get " Error ID 110023. Required 'StudyAreas' parameter doesn't have valid elements." sometimes and sometimes I get the report but only with the first value.

Example:

geoStudyArea.options = new RingBuffer([3,5,7], RingBuffer.MILES);


or if I put the each value in a numeric variable and then list the numeric variables in the array - it just takes the first value.  So theoptions below get a report with a two mile radius

Example:

var distance1:Number = 2 
var distance2:Number = 4 
var distance3:Number = 6 
geoStudyArea.options = new RingBuffer([distance1, distance2, distance3], RingBuffer.MILES);



The help reference lists an array as the input, so it seems like this should be valid - any ideas or suggestions are welcome!

https://developers.arcgis.com/flex/api-reference/com/esri/ags/tasks/geoEnrichmentClasses/RingBuffer....
https://developers.arcgis.com/flex/api-reference/com/esri/ags/tasks/geoEnrichmentClasses/DriveBuffer...


Thanks!

Amy
Tags (2)
0 Kudos
1 Reply
AmyWright_Webber
New Contributor III
Hello - just an update but not a resolution yet.  Spent some time online with ESRI technical support today.  No resolution yet but they are checking into it further as the REST api has the option in the createreport function so the Flex API should be able to accept an array of values as well ....  The link and the info towards the bottom of the page are shown below.

http://http://help.arcgis.com/en/businessanalyst/apis/geoenrichment/index.html


Like the Enrich method, the GeoEnrichment service has a single method to create reports for all types of study areas. You can use the studyAreas and studyAreasOptions parameters to produce reports for rings, drive-times service areas, custom polygons and standard geography features. The example below illustrates how you can create a 3, 5 and 7-minute service area buffer around a point and create a report

GeoEnrichment Example: Create a 1-3-5-minute drive-time service area and create a report
In the GeoEnrichment service, the study area type can be defined in the studyAreasOptions parameter:

Request

http://geoenrich.arcgis.com/arcgis/rest/services/World/GeoEnrichmentserver/GeoEnrichment/CreateRepor...[{"geometry":{"x":-117.1956,"y":34.0572}}]&studyAreasOptions={"areaType":"DriveTimeBuffer","bufferUnits":"esriDriveTimeUnitsMinutes","bufferRadii":[3,5,7]}&report=dandi&f=bin&token=...
0 Kudos