Is there any code reference to allow a user to select a line segment and then click a point along that selected line segment to split the line into two pieces? split location is user defined by a click.....
You can use the API's geometry engine, which has a cut method:
esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript
The user will need to draw a line rather than just clicking to create a point, but it works in the same way.
Any working examples of this? or a jsfiddle?
I was trying to example but it looks like it cuts and only keeps the right side? Need both parts kept....
example: Edit fiddle - JSFiddle
I did see your example Wee Yeo...this is doing exactly what I want....although its a polygon...
example: Geometry Engine Showcase
1. does this work for polylines as well?
2. I have not grabbed code from Github before.....it looks like the above exmaple is using the "ge-demo" how do I grab this and bring it to my server?
Any thoughts on my last post...the example did not seem to keep both portions on the line it was splitting....seemed to jsut be cutting it and ditching the other portion.