Is it possible to remove the mid-point vertex in SketchViewModel functionality?

404
2
05-21-2020 07:16 PM
Joy_LaurenceSangalang
New Contributor

I'm currently working with POLYLINE, and I want to make a straight line and when I edit that line it shouldn't show 3 vertices. Having mid-point vertex, the user may move that vertex and the line will become polyline. Please help me with this one I am a beginner in ARCGIS javascript. Thank you

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

It cannot be done. However, you can disable the reshape operation while only leaving the transform operation enabled as shown below: 

const sketch = new Sketch({
  layer: layer,
  view: view,
  creationMode: "update",
  defaultUpdateOptions: {
    toggleToolOnClick: false, 
    tool: "transform"
  }
});

Here is a test app shows how it is done: https://codepen.io/U_B_U/pen/ExVBvZK?editors=1000 

Hope this helps,

-Undral

Joy_LaurenceSangalang
New Contributor

Thank you!

0 Kudos