I have this simple code that it displays a graphic. So, geometry is ok. When I attempt to calculate the area of the graphic (line 5) I get this error. Why? Thanks.
var newbuffer = geometryEngine.difference(buffer,polygongeom);
newbuffer.setSpatialReference(new SpatialReference({ wkid: 102110}));
var buffergraphic = new esri.Graphic(newbuffer, bufferSym);
var thebufferarea= geometryEngine.geodesicArea(geometryEngine.simplify(buffergraphic.geometry), 'acres');
console.log(thebufferarea)
bufferGraphicsLayer.add(buffergraphic);
------------
this.map.addLayer(bufferGraphicsLayer)
the root of the error is at line 559, which is line 5 above.
Solved! Go to Solution.
Not implemented isn't a bug, it means it has limitations for its use. It either isn't implemented for graphics or it doesn't like your coordinate system.
For example, the WGS 1984 Web Mercator (Auxiliary Sphere) projection was originally assigned WKID 102100, but was later changed to 3857.
But if is that picky about the renaming, no clue. The python variant of this is similar
This method only works with WGS-84 (wkid: 4326) and Web Mercator (wkid: 3857) spatial references.
esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript 3.26
Not implemented isn't a bug, it means it has limitations for its use. It either isn't implemented for graphics or it doesn't like your coordinate system.
For example, the WGS 1984 Web Mercator (Auxiliary Sphere) projection was originally assigned WKID 102100, but was later changed to 3857.
But if is that picky about the renaming, no clue. The python variant of this is similar
This method only works with WGS-84 (wkid: 4326) and Web Mercator (wkid: 3857) spatial references.
esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript 3.26
Thank you! that was it.
Lefteris,
Thank you. Changing the Wkid to 3857 made it work!
Thank you for saving the day. Projecting to 3857 worked