AnsweredAssumed Answered

GeometryService.buffer error

Question asked by processing... on Feb 25, 2016
Latest reply on Feb 26, 2016 by processing...

I am trying to add a buffer to a point that I draw on a map. I went with the example shown on this documentation: https://developers.arcgis.com/javascript/jsapi/geometryservice-amd.html#buffer

 

My actual code is:

$('#buttonBufferAdd').click(function (e) {

    var spatialReference = new SpatialReference(item.Geometry.SpatialReference); returns wkid: 102100

    var params = new BufferParameters();

    params.geometries = [new Point(item.Geometry.Point.Coordinate.X, item.Geometry.Point.Coordinate.Y, spatialReference)];

    params.distances = $('#inputBufferRadius').val(); // returns 5

    params.unit = utils.getUnitOfMeasurement(); // returns 9030

    params.bufferSpatialReference = spatialReference;

    params.outSpatialReference = map.spatialReference;

    var geometryService = new GeometryService(geometryService); // url verified

    geometryService.buffer(params);

});

 

I get the following error:
Object doesn't support property or method 'join'.

 

Why?

 

Thanks!

 

p.s. The code block thing crapped out today, please bear with the sloppy code paste.

 

EDIT:
And should I be using GeometryEngine.buffer instead?
And is there a way to change the buffer color?

Outcomes