I’m looking for some help with the buffer tool in the JavaScript API. I have looked online but with no success. I am getting a Latitude, a Longitude and a buffer distance from the user then attempting to buffer this point. This is a custom widget that I'm creating in the Esri Web AppBuilder Developer Edition.
Here’s my code snippet.
var dblLat = domAttr.get(this.inputLat, 'value');
var dblLong = domAttr.get(this.inputLong, 'value');
if (dblLat =="" || dblLong =="" || isNaN(dblLat) || isNaN(dblLong)) {
new Message({message: this.nls.notANumber});
return;
}
if (this.pointLayer){
//Remove old point layer from map.
this.map.graphics.remove(this.pointLayer);