Select to view content in your preferred language

javascript api 3.13 geometryEngine.geodesicBuffer error

4614
1
Jump to solution
04-07-2015 08:07 AM
BryanWestphal
Deactivated User

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

0 Kudos
1 Solution

Accepted Solutions
BjornSvensson
Esri Regular Contributor

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.

View solution in original post

1 Reply
BjornSvensson
Esri Regular Contributor

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.