So I'm running a buffer tool using the Javascript API v4.9. The following works and does what I need:
But when i try to do the same using BufferParameters, as shown below, it throws an error:
What part of BufferParameters am I missing? My point "pt" is generated from a mouse click on the map (even.mapPoint) and it works fine, so does everything downstream ... using a Query and PopupTemplate showing info on the features within my buffer. So I really don't have to do this using BufferParameters but it sure would be nice to know why it fails 🙂
Solved! Go to Solution.
As described in the help, BufferParameters this is used when calling buffer() method on the GeometryService.
As described in the help, BufferParameters this is used when calling buffer() method on the GeometryService.
Thanks, John. It's hard to see what's right in front of you with the JSAPI sometimes, I find. I did read up on Robert's comparison between GeometryService and GeometryEngine here. Upon further investigation, there is also a code snippet comparison for the buffer case right here. Of course, I was working with the asynchronous version above, in part to celebrate wrapping my brain around promises, in part because I was unable to get the simplest thing to work with the GeometryEngine. Each time I would get a nasty "Uncaught TypeError: Cannot read property '_geVersion' of undefined". I come from the Python world and getting my feet wet with the JSAPI, more so even than vanilla JS, has been quite the trip.