AnsweredAssumed Answered

Unexpected Behaviour in Javascript API Cut Tool

Question asked by abougadi on Nov 28, 2015
Latest reply on Nov 30, 2015 by abougadi

Hi All,

Currently i'm using the latest version of Arcgis JS API Editor | API Reference | ArcGIS API for JavaScript  for our geometric network editing. Everything is going fine until we need to do some splitting on a wire (polyline).

 

The cut tool is working fine for splitting polylines as we needed, but the problem is with the points that are already being snapped to the target polyline to be splitted. Some points below will make the problem clearer to be understood :

 

1.) This picture shows the original condition of the connection. Two poles connected (snapped) with a wire.

Original Connection.PNG

2.) The next step is, We use the cutting tool provided inside esri/dijit/editing/Editor widget to cut the wire, anywhere in the middle. This will split the wire into two objects.

 

3.) Aand.. here's the problematic result, The left pole suddenly dragged to the splitting point :

Condition After Cut.PNG

 

After some checking, it seems like the left pole which previously snapped with the old wire still refer to the old wire's OBJECTID or something for the snapping, so this problem appears. From the second picture above, the right segment of the wire holds the same OBJECTID as the uncut wire (first picture), the left segment is the newly created object after cutting with new OBJECTID.

 

So, Our objective is to split the wire into two parts without affecting other objects that are snapped with the targeted wire to be cut. Actually we need something that behaves like the ArcMap splitting tool, but inside the Arcgis JS API..

 

Is there any workaround regarding this problem?

 

Thanks alot...

Outcomes