I'm trying to draw a buffer around a polyline. I have followed the sample found in the website https://developers.arcgis.com/javascript/jssamples/util_buffergraphic.html. I have done the following code, but its not working:
//draw buffer
var params = new BufferParameters();
params.geometries = [line];
params.distances = [5];
params.unit = GeometryService.UNIT_METER;
params.outSpatialReference = map.spatialReference;
geometryService.buffer(params, showCoverageBuffer);
I have tried the same code for a point and it worked perfectly. Any idea what I'm doing wrong?