Hello Guys, @RobertScheitlin__GISP @UndralBatsukh
I am going to cut (Split) line FL by polygon or polyline, no matter which one. I know there is a geometryEngine for this, but i could not find any working sample or hint how to use it.
Any help please how to do it.
Thank you and stay well and health
Solved! Go to Solution.
And here's a very basic sample of it in use. I'm using the line to cut the polygon and just printing the resulting geometries to the console.
You can find a sample here that showcases some of the geometryEngines features:
http://ekenes.github.io/esri-js-samples/ge-demo/
and the code can be found here.
https://github.com/ekenes/esri-js-samples/blob/master/ge-demo/index.html
Thank you for replay Robert. Will this code work for 4.x API? I am using latest one. What i will need to change?
Thank you
sorry I do not have a 4.x version link for you.
Not even any small hint how to start, where to go, where to dig? 🤔
@KenBuja Any idea? 😞
Here's a more up-to-date version of the documentation that has a code snippet: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#cut
And here's a very basic sample of it in use. I'm using the line to cut the polygon and just printing the resulting geometries to the console.
Adding to the examples here's one using the sketch widget to interactively draw the polygon and polyline geometries that will be cut:
https://codepen.io/john-grayson/pen/oNWgObw
Thank you everyone for help 😍