Select to view content in your preferred language

Why can't I geodesic buffer a simple point geometry?

385
3
Jump to solution
06-13-2023 02:03 PM
MikeDolbow
New Contributor III

I have a need to take a point geometry, such as what's taken from a search widget, and buffer it with the geometry engine. I can't seem to figure out how. I've set up a CodePen to demonstrate my issue - a simplified version of the Sample Code on geodesic buffer. Check out my code and the "Instructions" in the JS pane: https://codepen.io/Mike-Dolbow/pen/XWymPWx

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Frequent Contributor II

GeometryEngine won't autocast your point object to a Point instance. Try creating a "new Point()" and see if that works.

View solution in original post

0 Kudos
3 Replies
LefterisKoumis
Regular Contributor II
0 Kudos
ReneRubalcava
Frequent Contributor II

GeometryEngine won't autocast your point object to a Point instance. Try creating a "new Point()" and see if that works.

0 Kudos
MikeDolbow
New Contributor III

Thanks Rene! I thought of that on my run yesterday, forehead slap. Another way of saying this: my code is just creating a plain old object that happens to have a type of "point" and lat/long values, not an actual full-blown point geometry object that the geodesic buffer requires. I'll update the code pen to demonstrate this.

0 Kudos