Im trying to use the new geometryEngine.geodesicBuffer. when passing in my polygon geometry, the api is throwing the following error. (Uncaught TypeError: Cannot read property 'dd' of null) geomtryEngine.js: 519
I believe this is a bug in the new client side geometry engine.
I'm using Web Mercator projection (wkid 102100).
var SelectGraphicsLayer = map.getLayer("SelectGraphicsLayer");
var _geometry;
var _geometries = [];
for (var i = 0; i < SelectGraphicsLayer.graphics.length; i++) {
_geometries.push(SelectGraphicsLayer.graphics.geometry);
}
if (_geometries.length > 1) {
_geometry = GeometryEngine.union(_geometries);
}
else {
_geometry = _geometries[0];
}
//var buffer = GeometryEngine.buffer(_geometry, 330, Units.FEET, true); //THIS ONE WORKS
var buffer = GeometryEngine.geodesicBuffer(_geometry, 330, Units.FEET, true); // THIS ONE DOES NOT
Solved! Go to Solution.
The geodesicBuffer takes a number for the units. Try specify 9002 as the third argument. See https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengine-amd.html#geodesicbuffer which has a link to esriSRUnitType Constants.
While not technically a bug, this syntax is likely to change for the next version.
The geodesicBuffer takes a number for the units. Try specify 9002 as the third argument. See https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengine-amd.html#geodesicbuffer which has a link to esriSRUnitType Constants.
While not technically a bug, this syntax is likely to change for the next version.