Select to view content in your preferred language

Service area widget - accept multipoint input?

1948
1
04-20-2010 05:58 AM
YelenaCummings
Occasional Contributor
I'm attempting to modify the service area tool to accept multiple input locations (supplied by multiple drawEvent's) using a multipoint feature.  I've created a geoprocessing task that accepts the input location parameter as a multipoint.  I've verified that this works by running the published task in ArcMap.  However, the flex application seems to supply only the first point added to the multipoint to the geoprocessing task.  I have verified that the multipoint infact has multiple points by supplying it to a graphic, and displaying this graphic in the flex application. 
Does anyone have experience using multiple input locations?
Here is the related code:

(creating the multipoint)
   
....
    var locPoint:Multipoint;
    locPoint = new Multipoint([firstPoint, SecondPoint]);


(supplying input parameter)

....
    var graphic:Graphic = new Graphic(locPoint, locSym);                 //***graphic displays both points correctly in the app***
    var featureSet:FeatureSet = new FeatureSet([graphic]);
....   
    var params:Object =
    {
         "Input_Facilities": featureSet,
         "Drive_Time_Values":  driveTimes
    };


Any advice would be a help,

Thank you
Tags (2)
0 Kudos
1 Reply
JaySandhu
Esri Regular Contributor
Adding a location from a multi-point for a Service Area Layer only loads in the first point. It does not load all the points in the multi-point. If you need to load multiple points, then load them from a point feature class with multiple point features.

Jay Sandhu
0 Kudos