AnsweredAssumed Answered

drive area

Question asked by AlexBlanco on Aug 7, 2015

i'm trying to try out the drive area feature, and i am getting null features back.  I'm using code from the sample on this:


code snippet:

// default value
double breakValue1 = 2.0, breakValue2 = 5.0, breakValue3 = 10.0;


ServiceAreaParameters sap = new ServiceAreaParameters();

NAFeaturesAsFeature nfaf = new NAFeaturesAsFeature();

// Convert point to EGS (decimal degrees)
Point p = (Point) GeometryEngine

  .project(startLocation, wm, egs);

nfaf.addFeature(new Graphic(p, null));


// Set the service area output SR to our map service's SR



// Set the default break values with our entered values

sap.setDefaultBreaks(new Double[]{breakValue1, breakValue2,



// Create a new service area task pointing to an NAService
// (null credentials -> free service)
ServiceAreaTask sat = new ServiceAreaTask(mDriveAreaServiceURL, mCredentials);


// Solve the service area and retrieve the result.
ServiceAreaResult saResult = sat.solve(sap);

return saResult;